Bingo Svelte Themes

Bingo

Turn your events into a life-size game

Bingo

Make your events more fun

Features

  • Create a room / Join a room
  • Synchronised play between players
  • Personalise the bingo squares
  • Customise your game: free centre square (star)
  • Each player receives a uniquely shuffled grid when the game starts
  • PWA available: Open the Website > Android: Tap the three-dot menu then "Install App" or "Add to Home Screen" / iOS with safari: Tap the Share icon > "Add to Home Screen" > The app icon will appear on your home screen. Tap it to open the PWA like a native app

Tech Stack

Client:

Server:

Feedback

Feedback are welcome! Feel free to open an issue or a pull request on the GitHub repository.

Contribute / Run Locally

You will need to have Bun installed.

Clone the project

git clone https://github.com/GautierPicon/Bingo

Go to the project directory

cd bingo

Install dependencies

bun install

Start the server

bun run dev

Supabase setup:

Add a .env.local file based on this template and replace the variables with your own

  PUBLIC_SUPABASE_URL=https://***.supabase.co
  PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY=sb_publishable_***

In SQL Editor, create this query and run it

-- Enable UUID extension
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

-- Rooms table
CREATE TABLE rooms (
  id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
  code VARCHAR(6) UNIQUE NOT NULL,
  use_star BOOLEAN DEFAULT false,
  status VARCHAR DEFAULT 'waiting',
  winner_id UUID
);

-- Players table
CREATE TABLE players (
  id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
  room_id UUID NOT NULL REFERENCES rooms(id) ON DELETE CASCADE,
  name VARCHAR NOT NULL,
  is_host BOOLEAN DEFAULT false,
  profile_picture VARCHAR,
  joined_at TIMESTAMP DEFAULT NOW()
);

-- Grids table
CREATE TABLE grids (
  id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
  room_id UUID NOT NULL REFERENCES rooms(id) ON DELETE CASCADE,
  player_id UUID NOT NULL REFERENCES players(id) ON DELETE CASCADE,
  cells JSONB NOT NULL
);

-- Add winner foreign key
ALTER TABLE rooms ADD CONSTRAINT fk_winner FOREIGN KEY (winner_id) REFERENCES players(id) ON DELETE SET NULL;

-- Enable realtime
ALTER PUBLICATION supabase_realtime ADD TABLE rooms;
ALTER PUBLICATION supabase_realtime ADD TABLE players;
ALTER PUBLICATION supabase_realtime ADD TABLE grids;

Top categories

Loading Svelte Themes