How mehrasmeydani/i-guess-42 works
i guess low is a server-rendered daily lowest-unique-number game. Players sign in through 42, submit one irreversible guess with a confirmation step, and compete in rounds closing at 12:42 Europe/Vienna. Closed-round results, per-day detail, and trends are separate browsing stages; test-instance administration adds clock controls, demo players, ghost guesses, round clearing, and synthetic history. A points worker can settle winners through an optional external API. The graph reflects documented capabilities; handler internals are only partially sampled, so uncertain wiring is omitted.
Main entry points: handlers.rs HTTP handlers · db.rs Database access · points.rs Points settlement · auth.rs Auth and sessions
Components 15
Game web flow
- HTTP handlers
src/handlers.rs - Auth and sessions
src/auth.rs - Page rendering
src/templates.rs - App state
src/app.rs
Game domain
- Round clock
src/round.rs - Results and trends
src/stats.rs
Persistence
- Database access
src/db.rs - SQLite game store
- Database schema
migrations
Admin and payouts
- Demo history
src/demo.rs - Points settlement
src/points.rs
Other components
- Players
- Test admins
- 42 Intra OAuth
- Points API
Connections 17
- Players → HTTP handlers: submit requests
- Test admins → HTTP handlers: manage test game
- HTTP handlers → Auth and sessions: resolve sessions
- HTTP handlers → 42 Intra OAuth: request OAuth
- HTTP handlers → Round clock: derive current round
- HTTP handlers → Database access: read and write game data
- HTTP handlers → Results and trends: build statistics
- HTTP handlers → Demo history: generate history
- HTTP handlers → Page rendering: render pages
- HTTP handlers → App state: use shared state
- Auth and sessions → 42 Intra OAuth: exchange code and fetch profile
- Database access → SQLite game store: query and persist
- Database schema → SQLite game store: defines tables
- Demo history → Database access: supply generated guesses
- Points settlement → Database access: read winners and record payouts
- Points settlement → Points API: send winner payout
- App state → Round clock: apply test clock offset