Guess whether BTC/USD will be higher or lower 60 seconds from now. Each guess resolves against the Binance price once the delay has elapsed: +1 for a correct call, -1 otherwise. The score persists per (anonymous) player.
- Next.js (App Router) + React + Tailwind + tRPC + Tanstack Query
- Drizzle ORM on libSQL — a local file in dev, Turso in production
- Better Auth with anonymous sessions
- Binance for the live price (client WebSocket) and historical resolution price (REST)
- Install nodejs (>=24) and pnpm
- Rename .env.example to
.env pnpm install --frozen-lockfilepnpm dev— runs pending migrations first, then starts the dev server
pnpm lintpnpm test
- Point
DATABASE_URLat a Turso database and setDATABASE_AUTH_TOKEN - Set
BETTER_AUTH_SECRET(openssl rand -base64 32) andBETTER_AUTH_URL pnpm db:migrate, thenpnpm buildandpnpm start
The server is stateless REST, so it deploys to any serverless target. The live price comes straight from Binance over a client WebSocket — no server stream to keep alive.
- Edit the tables in src/db/schema, then
pnpm db:generate(auth tables managed by better authpnpm auth:generate)