# akash209581/mh27 architecture

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

- Interactive diagram: https://gitdiagram.com/akash209581/mh27
- Repository: https://github.com/akash209581/mh27

## Overview

Mahotsav is a festival and sports-qualifier site with participant accounts, team registration, tournament draws, and coordinator administration. Participants browse qualifier details, sign in, look up roster members, and submit a team entry; the browser API sends requests to the Express backend, which validates requests and persists registration and draw data. Coordinators manage teams, draws, event details, and payment settings. The graph reflects documented imports, endpoint calls, and server mounts; unsampled modules are included only where their subsystem is clear from the source index or product data.

Main entry points: [`src/App.jsx`](https://github.com/akash209581/mh27/blob/main/src/App.jsx) (App routing), [`backend/routes/registration.js`](https://github.com/akash209581/mh27/blob/main/backend/routes/registration.js) (Registration routes), [`backend/routes/admin.js`](https://github.com/akash209581/mh27/blob/main/backend/routes/admin.js) (Admin routes), [`backend/server.js`](https://github.com/akash209581/mh27/blob/main/backend/server.js) (HTTP application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Festival experience"]
  node_app["App routing<br/>[App.jsx]"]
  node_festival["Festival content<br/>[festival.js]"]
  node_drawsheet["Draw sheets<br/>[DrawSheet.jsx]"]
  node_qualifiers["Qualifier browsing<br/>[Qualifiers.jsx]"]
  node_qualifierdetail["Qualifier details"]
  node_profile["Participant profile<br/>[ProfilePage.jsx]"]
end

subgraph group_participant["Participant entry"]
  node_accountui["Account registration"]
  node_teamui["Team registration"]
end

subgraph group_services["API services"]
  node_api["Participant API<br/>[api.js]"]
  node_adminapi["Coordinator API<br/>[adminApi.js]"]
  node_server["HTTP application<br/>[server.js]"]
  node_registration["Registration routes<br/>[registration.js]"]
  node_adminroutes["Admin routes<br/>[admin.js]"]
  node_drawroutes["Draw routes<br/>[draws.js]"]
end

subgraph group_operations["Coordinator operations"]
  node_adminui["Coordinator dashboard<br/>[AdminPanel.jsx]"]
  node_draweditor["Draw editor<br/>[DrawEditor.jsx]"]
end

subgraph group_persistence["Data and safeguards"]
  node_auth["Authentication<br/>[auth.js]"]
  node_proofs["Payment proof storage"]
  node_ids["ID generation<br/>[idGenerator.js]"]
  node_registrationdata[("Registration records<br/>[Registration.js]")]
  node_participants[("Participant records<br/>[Participant.js]")]
  node_eventregistrations[("Team entries")]
  node_drawdata[("Tournament draws<br/>[TournamentDraw.js]")]
  node_settings[("Payment settings<br/>[PaymentSettings.js]")]
end

node_visitor(("Visitor / participant"))
node_database[("MongoDB")]
node_paymentprovider(("Cloudinary"))

node_visitor -->|"opens"| node_app
node_app -->|"reads content"| node_festival
node_app -->|"routes to"| node_drawsheet
node_app -->|"routes to"| node_qualifiers
node_app -->|"routes to"| node_qualifierdetail
node_app -->|"routes to"| node_teamui
node_app -->|"opens"| node_accountui
node_app -->|"routes to"| node_profile
node_visitor -->|"submits roster"| node_teamui
node_teamui -->|"looks up, registers"| node_api
node_accountui -->|"registers, signs in"| node_api
node_profile -->|"loads registrations"| node_api
node_api -->|"requests API"| node_server
node_server -->|"mounts routes"| node_registration
node_server -->|"mounts routes"| node_adminroutes
node_server -->|"mounts routes"| node_drawroutes
node_registration -->|"checks tokens"| node_auth
node_registration -->|"generates IDs"| node_ids
node_registration -->|"uses records"| node_registrationdata
node_registration -->|"uses records"| node_participants
node_registration -->|"uses entries"| node_eventregistrations
node_registration -->|"uses draws"| node_drawdata
node_registration -->|"stores proofs"| node_proofs
node_adminui -->|"manages data"| node_adminapi
node_draweditor -->|"edits draws"| node_adminapi
node_adminapi -->|"requests API"| node_server
node_adminroutes -->|"issues admin token"| node_auth
node_adminroutes -->|"manages proofs"| node_proofs
node_adminroutes -->|"updates settings"| node_settings
node_adminroutes -->|"uploads QR"| node_paymentprovider
node_drawroutes -->|"checks tokens"| node_auth
node_drawroutes -->|"reads entries"| node_eventregistrations
node_drawroutes -->|"manages draws"| node_drawdata
node_registrationdata -.->|"persists"| node_database
node_participants -.->|"persists"| node_database
node_eventregistrations -.->|"persists"| node_database
node_drawdata -.->|"persists"| node_database
node_settings -.->|"persists"| node_database

click node_app "https://github.com/akash209581/mh27/blob/main/src/App.jsx"
click node_festival "https://github.com/akash209581/mh27/blob/main/src/data/festival.js"
click node_drawsheet "https://github.com/akash209581/mh27/blob/main/src/components/draw/DrawSheet.jsx"
click node_qualifiers "https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/Qualifiers.jsx"
click node_qualifierdetail "https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/QualifierDetail.jsx"
click node_profile "https://github.com/akash209581/mh27/blob/main/src/components/profile/ProfilePage.jsx"
click node_accountui "https://github.com/akash209581/mh27/blob/main/src/components/registration/RegistrationModal.jsx"
click node_teamui "https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/TeamRegistration.jsx"
click node_api "https://github.com/akash209581/mh27/blob/main/src/lib/api.js"
click node_adminui "https://github.com/akash209581/mh27/blob/main/src/components/admin/AdminPanel.jsx"
click node_draweditor "https://github.com/akash209581/mh27/blob/main/src/components/admin/DrawEditor.jsx"
click node_adminapi "https://github.com/akash209581/mh27/blob/main/src/lib/adminApi.js"
click node_server "https://github.com/akash209581/mh27/blob/main/backend/server.js"
click node_registration "https://github.com/akash209581/mh27/blob/main/backend/routes/registration.js"
click node_adminroutes "https://github.com/akash209581/mh27/blob/main/backend/routes/admin.js"
click node_drawroutes "https://github.com/akash209581/mh27/blob/main/backend/routes/draws.js"
click node_auth "https://github.com/akash209581/mh27/blob/main/backend/middleware/auth.js"
click node_proofs "https://github.com/akash209581/mh27/blob/main/backend/utils/paymentProofStorage.js"
click node_ids "https://github.com/akash209581/mh27/blob/main/backend/utils/idGenerator.js"
click node_registrationdata "https://github.com/akash209581/mh27/blob/main/backend/models/Registration.js"
click node_participants "https://github.com/akash209581/mh27/blob/main/backend/models/Participant.js"
click node_eventregistrations "https://github.com/akash209581/mh27/blob/main/backend/models/EventRegistration.js"
click node_drawdata "https://github.com/akash209581/mh27/blob/main/backend/models/TournamentDraw.js"
click node_settings "https://github.com/akash209581/mh27/blob/main/backend/models/PaymentSettings.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_app,node_festival,node_drawsheet,node_qualifiers,node_qualifierdetail,node_profile toneBlue
class node_accountui,node_teamui,node_database toneAmber
class node_api,node_adminapi,node_server,node_registration,node_adminroutes,node_drawroutes toneMint
class node_adminui,node_draweditor toneRose
class node_auth,node_proofs,node_ids,node_registrationdata,node_participants,node_eventregistrations,node_drawdata,node_settings,node_visitor,node_paymentprovider toneIndigo
```

## Components

### Festival experience

- [App routing](https://github.com/akash209581/mh27/blob/main/src/App.jsx): `src/App.jsx`
- [Festival content](https://github.com/akash209581/mh27/blob/main/src/data/festival.js): `src/data/festival.js`
- [Draw sheets](https://github.com/akash209581/mh27/blob/main/src/components/draw/DrawSheet.jsx): `src/components/draw/DrawSheet.jsx`
- [Qualifier browsing](https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/Qualifiers.jsx): `src/components/qualifiers/Qualifiers.jsx`
- [Qualifier details](https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/QualifierDetail.jsx): `src/components/qualifiers/QualifierDetail.jsx`
- [Participant profile](https://github.com/akash209581/mh27/blob/main/src/components/profile/ProfilePage.jsx): `src/components/profile/ProfilePage.jsx`

### Participant entry

- [Account registration](https://github.com/akash209581/mh27/blob/main/src/components/registration/RegistrationModal.jsx): `src/components/registration/RegistrationModal.jsx`
- [Team registration](https://github.com/akash209581/mh27/blob/main/src/components/qualifiers/TeamRegistration.jsx): `src/components/qualifiers/TeamRegistration.jsx`

### API services

- [Participant API](https://github.com/akash209581/mh27/blob/main/src/lib/api.js): `src/lib/api.js`
- [Coordinator API](https://github.com/akash209581/mh27/blob/main/src/lib/adminApi.js): `src/lib/adminApi.js`
- [HTTP application](https://github.com/akash209581/mh27/blob/main/backend/server.js): `backend/server.js`
- [Registration routes](https://github.com/akash209581/mh27/blob/main/backend/routes/registration.js): `backend/routes/registration.js`
- [Admin routes](https://github.com/akash209581/mh27/blob/main/backend/routes/admin.js): `backend/routes/admin.js`
- [Draw routes](https://github.com/akash209581/mh27/blob/main/backend/routes/draws.js): `backend/routes/draws.js`

### Coordinator operations

- [Coordinator dashboard](https://github.com/akash209581/mh27/blob/main/src/components/admin/AdminPanel.jsx): `src/components/admin/AdminPanel.jsx`
- [Draw editor](https://github.com/akash209581/mh27/blob/main/src/components/admin/DrawEditor.jsx): `src/components/admin/DrawEditor.jsx`

### Data and safeguards

- [Authentication](https://github.com/akash209581/mh27/blob/main/backend/middleware/auth.js): `backend/middleware/auth.js`
- [Payment proof storage](https://github.com/akash209581/mh27/blob/main/backend/utils/paymentProofStorage.js): `backend/utils/paymentProofStorage.js`
- [ID generation](https://github.com/akash209581/mh27/blob/main/backend/utils/idGenerator.js): `backend/utils/idGenerator.js`
- [Registration records](https://github.com/akash209581/mh27/blob/main/backend/models/Registration.js): `backend/models/Registration.js`
- [Participant records](https://github.com/akash209581/mh27/blob/main/backend/models/Participant.js): `backend/models/Participant.js`
- [Team entries](https://github.com/akash209581/mh27/blob/main/backend/models/EventRegistration.js): `backend/models/EventRegistration.js`
- [Tournament draws](https://github.com/akash209581/mh27/blob/main/backend/models/TournamentDraw.js): `backend/models/TournamentDraw.js`
- [Payment settings](https://github.com/akash209581/mh27/blob/main/backend/models/PaymentSettings.js): `backend/models/PaymentSettings.js`

### Other components

- **Visitor / participant**
- **MongoDB**
- **Cloudinary**

## Connections

- Visitor / participant → App routing: opens (evidence: `src/App.jsx`)
- App routing → Festival content: reads content (evidence: `src/App.jsx`)
- App routing → Draw sheets: routes to (evidence: `src/App.jsx`)
- App routing → Qualifier browsing: routes to (evidence: `src/App.jsx`)
- App routing → Qualifier details: routes to (evidence: `src/App.jsx`)
- App routing → Team registration: routes to (evidence: `src/App.jsx`)
- App routing → Account registration: opens (evidence: `src/App.jsx`)
- App routing → Participant profile: routes to (evidence: `src/App.jsx`)
- Visitor / participant → Team registration: submits roster (evidence: `src/components/qualifiers/TeamRegistration.jsx`)
- Team registration → Participant API: looks up, registers (evidence: `src/components/qualifiers/TeamRegistration.jsx`)
- Account registration → Participant API: registers, signs in (evidence: `src/components/registration/RegistrationModal.jsx`)
- Participant profile → Participant API: loads registrations (evidence: `src/components/profile/ProfilePage.jsx`)
- Participant API → HTTP application: requests API (evidence: `src/lib/api.js`)
- HTTP application → Registration routes: mounts routes (evidence: `backend/server.js`)
- HTTP application → Admin routes: mounts routes (evidence: `backend/server.js`)
- HTTP application → Draw routes: mounts routes (evidence: `backend/server.js`)
- Registration routes → Authentication: checks tokens (evidence: `backend/routes/registration.js`)
- Registration routes → ID generation: generates IDs (evidence: `backend/routes/registration.js`)
- Registration routes → Registration records: uses records (evidence: `backend/routes/registration.js`)
- Registration routes → Participant records: uses records (evidence: `backend/routes/registration.js`)
- Registration routes → Team entries: uses entries (evidence: `backend/routes/registration.js`)
- Registration routes → Tournament draws: uses draws (evidence: `backend/routes/registration.js`)
- Registration routes → Payment proof storage: stores proofs (evidence: `backend/routes/registration.js`)
- Coordinator dashboard → Coordinator API: manages data (evidence: `src/components/admin/AdminPanel.jsx`)
- Draw editor → Coordinator API: edits draws (evidence: `src/components/admin/DrawEditor.jsx`)
- Coordinator API → HTTP application: requests API (evidence: `src/lib/adminApi.js`)
- Admin routes → Authentication: issues admin token (evidence: `backend/routes/admin.js`)
- Admin routes → Payment proof storage: manages proofs (evidence: `backend/routes/admin.js`)
- Admin routes → Payment settings: updates settings (evidence: `backend/routes/admin.js`)
- Admin routes → Cloudinary: uploads QR (evidence: `backend/routes/admin.js`)
- Draw routes → Authentication: checks tokens (evidence: `backend/routes/draws.js`)
- Draw routes → Team entries: reads entries (evidence: `backend/routes/draws.js`)
- Draw routes → Tournament draws: manages draws (evidence: `backend/routes/draws.js`)
- Registration records → MongoDB: persists
- Participant records → MongoDB: persists
- Team entries → MongoDB: persists
- Tournament draws → MongoDB: persists
- Payment settings → MongoDB: persists
