real-time collaborative grid where users claim tiles on a shared board. updates are delivered over websockets, persisted in postgres, and broadcast through redis pub/sub.
- go 1.22+
- node 20+
- docker + docker compose
- postgres 18, redis 8 (via compose)
docker-compose up postgres redis -dpsql $DATABASE_URL -f backend/migrations/001_init.up.sqlcd backend && cp .env.example .envcd frontend && cp .env.example .env && pnpm install && pnpm dev- (in another terminal)
cd backend && go run cmd/server/main.go
docker-compose up --build
frontend will be available on http://localhost:5173, backend on http://localhost:8080.
backend/ go server, websocket hub, redis pub/sub, postgres
frontend/ react + typescript + tailwind + motion
all messages use the envelope { "type": "...", "payload": { ... } }.
client -> server
CLAIM_TILE{ tileId: number }PING{}
server -> client
INIT_BOARDTILE_CLAIMEDCLAIM_REJECTEDUSER_JOINEDUSER_LEFTLEADERBOARD_UPDATEERRORPONG
see backend/.env.example and frontend/.env.example.
- backend:
go test ./... - frontend:
pnpm lint && pnpm build