An online multiplayer version of Kadi — play with friends from anywhere.
- Visit the hosted site (GitHub Pages)
- Enter a display name — no sign-up needed (anonymous auth)
- Create a room to get a 6-character room code, or join with a friend's code
- Once 2+ players are in, the host starts the game
- Take turns playing cards — the game syncs in real time via Supabase
| Layer | Technology |
|---|---|
| Frontend | Vanilla JS + CSS, hosted on GitHub Pages |
| Auth | Supabase Anonymous Auth |
| Database | Supabase Postgres (rooms, players, game state) |
| Real-time sync | Supabase Realtime (postgres_changes) |
| Deployment | GitHub Actions → GitHub Pages |
- Go to supabase.com and create a free project
- In Authentication → Providers, enable Anonymous Sign-Ins
- Open the SQL Editor and run the contents of
supabase/schema.sql - Copy your project URL and anon key from Settings → API
Edit config.js and replace the placeholders:
var SUPABASE_URL = 'https://your-project.supabase.co';
var SUPABASE_ANON_KEY = 'your-anon-key-here';The anon key is public by design — Row Level Security policies protect your data.
python3 -m http.server 8000Then visit http://localhost:8000.
The repository includes a GitHub Actions workflow (.github/workflows/deploy.yml) that automatically deploys to GitHub Pages on every push to main.
To enable it:
- Go to Settings → Pages in your GitHub repo
- Set the source to GitHub Actions
- Push to
main— the site will deploy automatically
- 54-card deck (standard + 2 jokers)
- Match by suit or rank to play a card
- Penalty cards: 2 (draw 2), 3 (draw 3), Joker (draw 5) — stackable
- Jump (J): Skip the next player
- Kickback (K): Reverse play direction
- Question (Q/8): Must answer with matching suit/rank or draw
- Ace: Request any suit
- Niko Kadi declaration: Declare immediately after playing when your hand ≤ 2 cards — you can declare even after your turn passes, but you must declare before playing your last card
- Winning cards: Only answer cards (4–10) and question cards (Q/8 with a valid answer) can finish the game. You cannot win by playing A, 2, 3, J, K, or Joker as your last card.
- First player to empty their hand (with declaration + valid winning card) wins the round
node --test