How hasttyr/torre works
Torre Central Hub manages university chess tournaments through a Vue client and an Express API, with PostgreSQL as the source of truth and Socket.IO notifications for live changes. The central workflow moves from tournament setup and player enrollment through Swiss pairing, result entry, standings and tournament closure; clients refresh data over REST after live events. The graph also preserves documented account, club/coach, dashboard, export and audit capabilities. Some subsystem links are documented only at a high level; unsampled implementation details are not inferred.
Main entry points: app.ts Express application · tournaments.controller.ts Tournament handlers · api.ts API services · socket.ts Socket client
Components 24
Vue client
- Vue application
frontend/src/main.ts - Tournament screens
frontend/src/views/tournament - Round manager
frontend/src/components/tournament-admin/RoundManager.vue - API services
frontend/src/services/api.ts - Socket client
frontend/src/services/socket.ts
REST API
- Express application
backend/src/app.ts - API routes
backend/src/routes - Tournament handlers
backend/src/controllers/tournaments.controller.ts - Round handlers
backend/src/controllers/rounds.controller.ts - Session authorization
backend/src/middlewares/auth.ts - Tournament broadcasts
backend/src/sockets/broadcast.ts
Tournament domain
- Tournament lifecycle
backend/src/services/tournaments.service.ts - Swiss pairing
backend/src/services/pairing/swissPairing.ts - Result recording
backend/src/services/results.service.ts - Standings and tiebreaks
backend/src/services/standings.service.ts - PDF exports
backend/src/services/exports/exports.service.ts
Account and insights
- Authentication
backend/src/services/auth.service.ts - Role dashboards
backend/src/services/dashboard/dashboard.service.ts - Clubs and coaches
backend/src/services/clubs.service.ts - Personal data rights
backend/src/services/dataRights.service.ts - Administrative audit
backend/src/services/auditLog.service.ts
Other components
- Tournament users
- PostgreSQL
- Socket.IO server
Connections 29
- Tournament users → Vue application: use
README.md - Vue application → API services: requests data
README.md - API services → Express application: REST calls
README.md - Express application → API routes: mounts routes
backend/src/app.ts - API routes → Tournament handlers: routes requests
backend/src/routes/tournaments.routes.ts - Tournament handlers → Tournament lifecycle: invokes
backend/src/controllers/tournaments.controller.ts - Round handlers → Swiss pairing: generates pairings
- Round handlers → Result recording: records results
- Round manager → API services: uses services
frontend/src/components/tournament-admin/RoundManager.vue - Round manager → Socket client: listens live
- Tournament screens → API services: loads tournament data
README.md - Tournament lifecycle → PostgreSQL: reads and writes
README.md - Swiss pairing → PostgreSQL: stores pairings
- Result recording → PostgreSQL: stores results
- Standings and tiebreaks → PostgreSQL: reads tournament data
- Tournament handlers → Standings and tiebreaks: gets standings
backend/src/controllers/tournaments.controller.ts - Tournament handlers → PDF exports: serves exports
- Express application → Session authorization: applies session checks
backend/src/app.ts - Session authorization → Authentication: verifies sessions
backend/src/middlewares/auth.ts - Authentication → PostgreSQL: reads and writes accounts
backend/src/services/auth.service.ts - Express application → Socket.IO server: hosts live channel
- Socket.IO server → Tournament broadcasts: dispatches events
- Tournament broadcasts → Socket client: notifies changes
README.md - Socket client → Tournament screens: prompts REST refresh
README.md - Role dashboards → PostgreSQL: reads insights
- Clubs and coaches → PostgreSQL: stores affiliations
- Personal data rights → PostgreSQL: handles requests
- Administrative audit → PostgreSQL: stores audit trail
- Tournament users → Role dashboards: view by role