How fresco-haze/arenaos works
ArenaOS is a browser-based tournament management platform: users create accounts and tournaments, organizers manage registration and lifecycle, then generate brackets and record results while spectators follow public tournaments. The README documents single- and double-elimination, round-robin standings, team registration, dashboards, history, authorization, and audit capabilities; the tree identifies their backend modules. Sampled frontend code shows authentication, tournament loading, organizer actions, and bracket display. Backend wiring is not sampled, so links from the API entry point to application use cases are intentionally omitted.
Main entry points: UseCases Tournament use cases · Main.hs HTTP API · App.tsx Web routes · useTournament.ts Tournament loader
Components 24
Web application
- Web routes
web/src/App.tsx - Auth provider
web/src/auth/AuthProvider.tsx - Registration action
web/src/auth/authActions.ts - Create tournament
web/src/pages/CreateTournamentPage.tsx - Organizer controls
web/src/components/OrganizerPanel.tsx - Tournament loader
web/src/hooks/useTournament.ts - Bracket display
web/src/components/Bracket.tsx
Application workflows
- Tournament use cases
Application/UseCases - Application helpers
Application/Internal
Competition domain
- Tournament models
Domain/Tournament.hs - Match models
Domain/Match.hs - Participant registration
Domain/Registration.hs - Bracket generation
Engine/BracketGeneration.hs - Winner advancement
Engine/Advancement.hs - Standings
Engine/Standings.hs - Competition validation
Engine/TournamentValidation.hs - Tournament history
Domain/TournamentHistory.hs
Persistence and services
- SQLite persistence
Shell/Persistence/SQLite - Persistence ports
Shell/Persistence/Port.hs - Session handling
Shell/Auth/Session.hs - Password hashing
Shell/Infrastructure/PasswordHasher.hs
Other components
- Organizer
- Spectator
- HTTP API
api/Main.hs
Connections 23
- Organizer → Web routes: uses
- Spectator → Web routes: browses
- Web routes → Auth provider: provides auth
- Auth provider → HTTP API: login/logout
- Registration action → HTTP API: registers via
- Create tournament → HTTP API: creates via
- Organizer controls → HTTP API: sends actions
- Tournament loader → HTTP API: fetches data
- Tournament loader → Bracket display: supplies bracket
- HTTP API → Session handling: authenticates
- HTTP API → Tournament use cases: dispatches
- Tournament use cases → Application helpers: uses helpers
- Tournament use cases → Tournament models: applies rules
- Tournament use cases → Participant registration: registers participants
- Tournament use cases → Match models: records results
- Tournament use cases → Bracket generation: generates brackets
- Tournament use cases → Winner advancement: advances winners
- Tournament use cases → Standings: computes standings
- Tournament use cases → Competition validation: validates changes
- Tournament use cases → Tournament history: records history
- Tournament use cases → Persistence ports: uses ports
- Persistence ports → SQLite persistence: reads/writes
- Tournament use cases → Password hashing: hashes passwords