1.2 KiB
1.2 KiB
Architecture
System Shape
Hermes uses three layers:
- Native client apps for iOS and Android
- A Rust backend API that owns timing and state
- PostgreSQL plus Valkey for durable and short-lived data
Client Responsibilities
- Render the study experience
- Play preview and reveal video
- Handle gestures and haptics
- Show odds and lock timing
- Keep local session state
- Prefetch media
- Sync clocks with the server
- Capture structured analytics
- Load English and Swedish strings from localization assets
Backend Responsibilities
- Auth and session binding
- Event feed and manifests
- Markets and odds distribution
- Bet intent validation and acceptance
- Settlement and audit logging
- Experiment assignment
- Localization bundle serving
- Analytics ingestion
- Admin fixture publishing
Core Rules
- The server decides lock time and settlement
- Clients send intent, not fairness decisions
- Video playback must not block overlay updates
- Client and server state machines must match
- Localization is mandatory for every user-facing string
- Analytics and audit data stay relational
Repo Order
- Documents and contracts
- Backend foundation
- Domain modules and API coverage
- Fixture and admin workflows
- Native iOS and Android apps