How ouss-elk/campus-type-rush works
Campus Type Rush is a local-first typing tournament: players join and race, an operator manages rounds and qualification, and a projector displays live standings and the final podium. The backend coordinates live sessions and tournament state, with SQLite preserving identities, settings, rounds, and results. The graph includes the main player, admin, and projector views plus configuration and protocol layers. Some detailed API and engine behavior is only partially excerpted, so those links rely on README statements rather than assumptions about unsampled code.
Main entry points: app.ts HTTP and sockets · engine.ts Tournament engine · protocol.ts Shared protocol · player.tsx Player view
Components 14
Tournament views
- Player view
client/src/player.tsx - Admin console
client/src/admin.tsx - Projector view
client/src/screen.tsx
Application runtime
- Runtime configuration
server/config.ts - HTTP and sockets
server/app.ts - Server startup
server/main.ts
Tournament domain
- Tournament engine
server/engine.ts - Typing passages
server/passages.json - Security utilities
server/util.ts
Contracts and storage
- Shared protocol
shared/protocol.ts - Tournament store
server/store.ts
Other components
- Players
- Operator
- Projector audience
Connections 18
- Players → Player view: join and race
README.md - Operator → Admin console: manage rounds
README.md - Projector audience → Projector view: view tournament
README.md - Player view → HTTP and sockets: join and connect
client/src/player.tsx - Admin console → HTTP and sockets: authenticate and command
README.md - Projector view → HTTP and sockets: receive live state
client/src/screen.tsx - Server startup → Runtime configuration: loads settings
server/main.ts - Server startup → HTTP and sockets: creates and starts
server/main.ts - HTTP and sockets → Tournament engine: serve tournament state
server/app.ts - Tournament engine → Tournament store: load and persist
server/engine.ts - Tournament engine → Typing passages: load passages
server/engine.ts - Player view → Shared protocol: uses message types
client/src/player.tsx - Admin console → Shared protocol: uses command types
client/src/admin.tsx - Projector view → Shared protocol: uses state types
client/src/screen.tsx - HTTP and sockets → Shared protocol: validates messages
server/app.ts - HTTP and sockets → Security utilities: uses security helpers
server/app.ts - Tournament engine → Security utilities: uses validation helpers
server/engine.ts - Tournament engine → Tournament store: persist results
server/engine.ts