# digeesh038/esports-points-table-maker architecture

> Architecture diagram of the GitHub repository digeesh038/esports-points-table-maker, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/digeesh038/esports-points-table-maker
- Repository: https://github.com/digeesh038/esports-points-table-maker

## Overview

This is an esports tournament management product: organizers create tournaments and stages, enroll teams and players, record match results, and publish standings; payments and live updates support that workflow. The frontend routes users through public and protected pages and calls the backend API. The backend routes requests through authentication and domain controllers, which use scoring/leaderboard services and persistent models. The tree documents additional organization, dashboard, and payment capabilities. Some controller and page implementations were not sampled, so those feature links are documented only where the route wiring or explicit source references support them.

Main entry points: [`esports-tournament-backend/src/app.js`](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/app.js) (HTTP application), [`esports-tournament-backend/src/models/index.js`](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/models/index.js) (Domain models), [`esports-tournament-backend/src/controllers/matchController.js`](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/matchController.js) (Match operations), [`esports-tournament-backend/src/services/leaderboardService.js`](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/leaderboardService.js) (Leaderboard service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_web["Tournament UI<br/>[App.jsx]"]
  node_auth_ui["Session context<br/>[AuthContext.jsx]"]
  node_websocket_ui["Live connection<br/>[SocketContext.jsx]"]
  node_team_ui["Team management<br/>[TeamsPage.jsx]"]
  node_tournament_ui["Tournament pages"]
  node_leaderboard_ui["Standings pages"]
  node_api_client["API client<br/>[client.js]"]
end

subgraph group_api["API and access"]
  node_server["HTTP application<br/>[app.js]"]
  node_auth["Authentication<br/>[authMiddleware.js]"]
end

subgraph group_competition["Competition operations"]
  node_tournament["Tournament stages"]
  node_team["Teams and rosters<br/>[teamController.js]"]
  node_match["Match operations<br/>[matchController.js]"]
  node_payment["Payments"]
end

subgraph group_results["Scoring and standings"]
  node_scoring["Scoring engine<br/>[scoringEngine.js]"]
  node_leaderboard["Leaderboard service"]
  node_realtime["WebSocket service"]
end

subgraph group_persistence["State and integrations"]
  node_models["Domain models<br/>[index.js]"]
  node_database[("PostgreSQL<br/>[database.js]")]
  node_redis[("Redis cache<br/>[redis.js]")]
end

node_user(("Organizer or player"))
node_payment_gateway["Razorpay"]

node_user -->|"uses"| node_web
node_web -->|"provides session"| node_auth_ui
node_web -->|"provides live state"| node_websocket_ui
node_team_ui -.->|"requests teams"| node_api_client
node_tournament_ui -.->|"requests tournaments"| node_api_client
node_leaderboard_ui -.->|"requests standings"| node_api_client
node_api_client -.->|"HTTP requests"| node_server
node_server -->|"routes tournaments"| node_tournament
node_server -->|"routes teams"| node_team
node_server -->|"routes matches"| node_match
node_server -->|"routes payments"| node_payment
node_auth -->|"loads user"| node_models
node_tournament -->|"gets ruleset"| node_scoring
node_tournament -->|"clears cache"| node_redis
node_team -->|"creates teams"| node_models
node_team -->|"invalidates standings"| node_redis
node_match -->|"submits results"| node_scoring
node_match -->|"publishes updates"| node_realtime
node_match -->|"uses cache"| node_redis
node_payment -.->|"processes payments"| node_payment_gateway
node_scoring -->|"stores results"| node_models
node_scoring -->|"updates standings"| node_leaderboard
node_leaderboard -->|"reads competition data"| node_models
node_leaderboard -->|"uses cache"| node_redis
node_leaderboard -->|"publishes standings"| node_realtime
node_models -->|"uses Sequelize"| node_database
node_websocket_ui -.->|"receives live events"| node_realtime

click node_web "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/App.jsx"
click node_auth_ui "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/contexts/AuthContext.jsx"
click node_websocket_ui "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/contexts/SocketContext.jsx"
click node_team_ui "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/TeamsPage.jsx"
click node_tournament_ui "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/TournamentDetailPage.jsx"
click node_leaderboard_ui "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/LeaderboardPage.jsx"
click node_api_client "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/api/client.js"
click node_server "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/app.js"
click node_auth "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/middlewares/authMiddleware.js"
click node_tournament "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/tournamentController.js"
click node_team "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/teamController.js"
click node_match "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/matchController.js"
click node_payment "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/paymentController.js"
click node_scoring "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/scoringEngine.js"
click node_leaderboard "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/leaderboardService.js"
click node_realtime "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/websocketService.js"
click node_models "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/models/index.js"
click node_database "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/config/database.js"
click node_redis "https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/config/redis.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web,node_auth_ui,node_websocket_ui,node_team_ui,node_tournament_ui,node_leaderboard_ui,node_api_client toneBlue
class node_server,node_auth toneAmber
class node_tournament,node_team,node_match,node_payment toneMint
class node_scoring,node_leaderboard,node_realtime toneRose
class node_models,node_database,node_redis,node_user,node_payment_gateway toneIndigo
```

## Components

### Web application

- [Tournament UI](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/App.jsx): `esports-tournament-frontend/src/App.jsx`
- [Session context](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/contexts/AuthContext.jsx): `esports-tournament-frontend/src/contexts/AuthContext.jsx`
- [Live connection](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/contexts/SocketContext.jsx): `esports-tournament-frontend/src/contexts/SocketContext.jsx`
- [Team management](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/TeamsPage.jsx): `esports-tournament-frontend/src/pages/TeamsPage.jsx`
- [Tournament pages](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/TournamentDetailPage.jsx): `esports-tournament-frontend/src/pages/TournamentDetailPage.jsx`
- [Standings pages](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/pages/LeaderboardPage.jsx): `esports-tournament-frontend/src/pages/LeaderboardPage.jsx`
- [API client](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-frontend/src/api/client.js): `esports-tournament-frontend/src/api/client.js`

### API and access

- [HTTP application](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/app.js): `esports-tournament-backend/src/app.js`
- [Authentication](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/middlewares/authMiddleware.js): `esports-tournament-backend/src/middlewares/authMiddleware.js`

### Competition operations

- [Tournament stages](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/tournamentController.js): `esports-tournament-backend/src/controllers/tournamentController.js`
- [Teams and rosters](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/teamController.js): `esports-tournament-backend/src/controllers/teamController.js`
- [Match operations](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/matchController.js): `esports-tournament-backend/src/controllers/matchController.js`
- [Payments](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/controllers/paymentController.js): `esports-tournament-backend/src/controllers/paymentController.js`

### Scoring and standings

- [Scoring engine](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/scoringEngine.js): `esports-tournament-backend/src/services/scoringEngine.js`
- [Leaderboard service](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/leaderboardService.js): `esports-tournament-backend/src/services/leaderboardService.js`
- [WebSocket service](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/services/websocketService.js): `esports-tournament-backend/src/services/websocketService.js`

### State and integrations

- [Domain models](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/models/index.js): `esports-tournament-backend/src/models/index.js`
- [PostgreSQL](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/config/database.js): `esports-tournament-backend/src/config/database.js`
- [Redis cache](https://github.com/digeesh038/esports-points-table-maker/blob/main/esports-tournament-backend/src/config/redis.js): `esports-tournament-backend/src/config/redis.js`

### Other components

- **Organizer or player**
- **Razorpay**

## Connections

- Organizer or player → Tournament UI: uses (evidence: `esports-tournament-frontend/src/App.jsx`)
- Tournament UI → Session context: provides session (evidence: `esports-tournament-frontend/src/App.jsx`)
- Tournament UI → Live connection: provides live state (evidence: `esports-tournament-frontend/src/App.jsx`)
- Team management → API client: requests teams
- Tournament pages → API client: requests tournaments (evidence: `esports-tournament-frontend/src/pages/TournamentDetailPage.jsx`)
- Standings pages → API client: requests standings
- API client → HTTP application: HTTP requests
- HTTP application → Tournament stages: routes tournaments (evidence: `esports-tournament-backend/src/app.js`)
- HTTP application → Teams and rosters: routes teams (evidence: `esports-tournament-backend/src/app.js`)
- HTTP application → Match operations: routes matches (evidence: `esports-tournament-backend/src/app.js`)
- HTTP application → Payments: routes payments (evidence: `esports-tournament-backend/src/app.js`)
- Authentication → Domain models: loads user (evidence: `esports-tournament-backend/src/middlewares/authMiddleware.js`)
- Tournament stages → Scoring engine: gets ruleset (evidence: `esports-tournament-backend/src/controllers/tournamentController.js`)
- Tournament stages → Redis cache: clears cache (evidence: `esports-tournament-backend/src/controllers/tournamentController.js`)
- Teams and rosters → Domain models: creates teams (evidence: `esports-tournament-backend/src/controllers/teamController.js`)
- Teams and rosters → Redis cache: invalidates standings (evidence: `esports-tournament-backend/src/controllers/teamController.js`)
- Match operations → Scoring engine: submits results (evidence: `esports-tournament-backend/src/controllers/matchController.js`)
- Match operations → WebSocket service: publishes updates (evidence: `esports-tournament-backend/src/controllers/matchController.js`)
- Match operations → Redis cache: uses cache (evidence: `esports-tournament-backend/src/controllers/matchController.js`)
- Payments → Razorpay: processes payments
- Scoring engine → Domain models: stores results (evidence: `esports-tournament-backend/src/services/scoringEngine.js`)
- Scoring engine → Leaderboard service: updates standings (evidence: `esports-tournament-backend/src/services/scoringEngine.js`)
- Leaderboard service → Domain models: reads competition data (evidence: `esports-tournament-backend/src/services/leaderboardService.js`)
- Leaderboard service → Redis cache: uses cache (evidence: `esports-tournament-backend/src/services/leaderboardService.js`)
- Leaderboard service → WebSocket service: publishes standings (evidence: `esports-tournament-backend/src/services/leaderboardService.js`)
- Domain models → PostgreSQL: uses Sequelize (evidence: `esports-tournament-backend/src/models/index.js`)
- Live connection → WebSocket service: receives live events
