How it works
A quick tour of gameplay, scoring, and the server‑authoritative flow that keeps it fair.
Overview
Guess The Number is a lightning‑fast number guessing game. You pick numbers, the server tells you too high, too low, or correct, and we score your run. The app is built with Nuxt + TypeScript + Nuxt UI on the front, and a server‑authoritative API with RLS‑protected storage on the back— a minimal, secure pattern recommended throughout our build playbooks.
Game rules
- Range: 1–100 (default). You can tweak difficulty in other modes.
- Feedback after each guess: too high, too low, or correct.
- Timer: 60s in timed modes; unlimited in Classic Solo.
- Server adjudicates every guess (client never sees the secret number).
Data flow
Client (Nuxt UI)
|
| guess via fetch /api/games/guess
v
Server Route (Node, Nuxt Nitro) -- validates with zod, checks auth
|
| reads game + secret_value (service role if needed)
v
Postgres (Supabase, RLS on) -- owner-only rows; secret_value column not exposed to clients
|
| result -> outcome (low/high/correct), update attempts/score
v
Response to Client -> UI updates (badge, toasts, progress)
This pattern—**server‑authoritative state + RLS‑first DB**—is the default in our Indie‑Hacker stack for security and simplicity (no secrets in the browser, least‑privilege keys).
Fairness & security
- Server secret only: client never receives the answer.
- RLS policies: each player only reads their own rows; waitlist inserts are public without reads.
- Column protection: `secret_value` selection is revoked for authenticated clients.
- Daily seed: stored server‑side; clients get only outcomes.
Modes (Solo, Daily, AI)
Solo
Classic 1–100, unlimited attempts or 60s timed.
Daily
One shared puzzle/day; fair seed; tie‑break by time.
AI Multiplayer (soon)
Race an AI in real‑time; join the waitlist from Play.
We use cookies
We use necessary cookies to run the site. With your consent, we also use analytics and marketing cookies to improve the product. Learn more .