pnpm monorepo with three workspaces: - @sbt/shared: zod ScoreboardState + WebSocket protocol (single source of truth) - @sbt/server: Fastify REST + raw ws WebSocket + Drizzle/Postgres, run via tsx - @sbt/web: React + Vite + Tailwind installable PWA Real-time core: the WebSocket server holds authoritative per-board state in memory, broadcasts to all clients (editors + OBS overlays) instantly, and debounces Postgres saves (~750ms). One useScoreboardSync hook powers the editor, the no-login co-edit control page, and the read-only OBS overlay. Includes email+password auth (JWT cookie), scoreboard CRUD, logo upload, customizable scorebug (characters/stocks/score/subtitles/callout/side-swap/theme), Docker Compose + Caddy/nginx deploy configs, and docs/PLAN.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
12 lines
350 B
Plaintext
12 lines
350 B
Plaintext
# Copy to .env at the repo root and fill in. Used by docker-compose.yml.
|
|
|
|
# Postgres
|
|
POSTGRES_PASSWORD=change-me-strong-password
|
|
POSTGRES_DB=scoreboardtools
|
|
|
|
# Auth — generate with: openssl rand -hex 32
|
|
JWT_SECRET=replace-with-a-long-random-secret
|
|
|
|
# Cookies require HTTPS in production. Keep true behind your TLS reverse proxy.
|
|
COOKIE_SECURE=true
|