Skip to content
JonasFocusPublic

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Game Time · Family Game Night

A mobile-first web app for family game night: Flip 7, casino tables, Texas Hold'em and party games.

  • Play online: one phone per player, realtime rooms joined by a 6-digit code (up to 10 players, bots optional).
  • Imposter: party game for 3-10 players; one secret imposter, timed clues, majority vote.
  • Scorekeeper: play with real cards and let the app tally each round.

No accounts. Next.js (App Router) frontend, a plain Node ws game server with in-memory rooms, and a pure shared rules engine in lib/engine.

Run locally

Requires Node 24+ and pnpm.

pnpm install
cp .env.example .env.local   # NEXT_PUBLIC_WS_URL=ws://localhost:8787
pnpm dev:server              # game server on :8787
pnpm dev                     # web app on :3000

To test on a phone on the same Wi-Fi, set NEXT_PUBLIC_WS_URL=ws://<your-lan-ip>:8787 and open http://<your-lan-ip>:3000.

Checks: pnpm exec tsc --noEmit -p ., pnpm lint, pnpm test, pnpm build.

Deploy

Game server (Railway). Create a service from this repo. railway.json sets the start command (node server/index.ts), the /health check and restart policy. Railway provides PORT. Rooms live in memory, so run a single instance.

After CI passes on main, the deploy-server job in .github/workflows/ci.yml runs railway up whenever server/, lib/, package.json, pnpm-lock.yaml or railway.json changed. It needs a Railway project token (production environment) saved as the RAILWAY_TOKEN repository secret. If the Railway service is not named server, set its name in the RAILWAY_SERVICE repository variable. Keep Railway's own GitHub autodeploy off so the server doesn't deploy twice.

Frontend (Vercel). Import the repo as a Next.js project and set NEXT_PUBLIC_WS_URL to the Railway public URL with the wss:// scheme, e.g. wss://flip7-server.up.railway.app. Redeploy after changing it, since it is inlined at build time.

Rules

Game rules follow the published Flip 7 rules (94-card deck: numbers 0 to 12, five plus modifiers and x2, Freeze, Flip Three, Second Chance; first to 200 wins). The in-app "How to play" panel summarizes them.

Flip 7 is a trademark of its respective owner. This is an independent family project.

Legacy snapshot

legacy-snapshot/ holds the compiled frontend of the original ChatGPT Sites version (no source). It is kept for reference only and is not part of the build.

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages