# guramigorgadze/global-arena architecture

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

- Interactive diagram: https://gitdiagram.com/guramigorgadze/global-arena
- Repository: https://github.com/guramigorgadze/global-arena

## Overview

Global Arena is a conference platform combining delegate registration and organizing workflows with chair-facing MUN session tools, voting, and a marathon feature. The main delegate flow is registration through confirmation and organizer records; the chair flow configures a committee session, manages debate and voting, and persists session state. Registration integrations are described in the README; sampled code directly supports the session synchronization, authorization, and persistence links shown here.

Main entry points: [`backend/controllers/users.js`](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/users.js) (Registration handler), [`backend/routes/mun.js`](https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/mun.js) (MUN routes), [`backend/controllers/munSession.js`](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/munSession.js) (Session handler), [`frontend/src/api/voting.js`](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/voting.js) (Voting API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public site"]
  node_site["Site and routes<br/>[App.jsx]"]
  node_home["Landing page<br/>[Home.jsx]"]
end

subgraph group_registration["Registration"]
  node_registration_ui["Registration wizard<br/>[Registration.jsx]"]
  node_registration_api["Registration API client<br/>[user.js]"]
  node_user_routes["User routes<br/>[users.js]"]
  node_user_controller["Registration handler<br/>[users.js]"]
  node_delegate_store[("Delegate records<br/>[delegates.js]")]
  node_email_sender["Email sender<br/>[mailSender.js]"]
  node_sheets_sync["Sheets sync<br/>[googleSheets.js]"]
end

subgraph group_mun["MUN sessions"]
  node_command_ui["Session command"]
  node_session_engine["Session engine"]
  node_mun_api["MUN API client<br/>[mun.js]"]
  node_mun_routes["MUN routes<br/>[mun.js]"]
  node_committee_auth["Committee authorization<br/>[committeeAuth.js]"]
  node_session_handler["Session handler<br/>[munSession.js]"]
  node_live_sessions[("Live sessions")]
  node_session_archive[("Session archive")]
  node_session_schema["Session schema<br/>[SessionFields.js]"]
end

subgraph group_voting["Voting"]
  node_voting_ui["Voting pages<br/>[VotingScreen.jsx]"]
  node_voting_control["Voting control<br/>[VotingControl.jsx]"]
  node_voting_api["Voting API client<br/>[voting.js]"]
  node_voting_routes["Voting routes<br/>[voting.js]"]
  node_voting_handler["Voting handlers<br/>[voting.js]"]
  node_vote_store[("Vote records<br/>[voting.js]")]
end

subgraph group_operations["Conference operations"]
  node_marathon_ui["Marathon page<br/>[Marathon.jsx]"]
  node_marathon_api["Marathon API client<br/>[marathon.js]"]
  node_marathon_routes["Marathon routes<br/>[marathon.js]"]
  node_marathon_handler["Marathon handlers<br/>[marathon.js]"]
  node_marathon_data[("Marathon results<br/>[marathonResults.js]")]
end

node_delegate(("Delegate"))
node_chair(("Committee chair"))
node_organizer(("Organizer"))
node_mail_service["Email service"]
node_sheets_service["Google Sheets"]

node_delegate -->|"visits"| node_site
node_site -->|"routes"| node_home
node_delegate -->|"submits details"| node_registration_ui
node_registration_ui -->|"sends registration"| node_registration_api
node_registration_api -->|"calls API"| node_user_routes
node_user_routes -->|"dispatches"| node_user_controller
node_user_controller -->|"stores delegate"| node_delegate_store
node_user_controller -->|"sends confirmation"| node_email_sender
node_email_sender -->|"sends email"| node_mail_service
node_user_controller -->|"syncs registration"| node_sheets_sync
node_sheets_sync -->|"posts registration"| node_sheets_service
node_chair -->|"operates session"| node_command_ui
node_command_ui -->|"uses engine"| node_session_engine
node_session_engine -->|"syncs session"| node_mun_api
node_mun_api -->|"calls API"| node_mun_routes
node_mun_routes -->|"protects session routes"| node_committee_auth
node_mun_routes -->|"dispatches"| node_session_handler
node_session_handler -->|"reads and writes"| node_live_sessions
node_session_handler -->|"archives on reset"| node_session_archive
node_live_sessions -->|"uses fields"| node_session_schema
node_session_archive -->|"uses fields"| node_session_schema
node_chair -->|"controls votes"| node_voting_control
node_voting_ui -->|"requests voting"| node_voting_api
node_voting_control -->|"controls voting"| node_voting_api
node_voting_api -->|"calls API"| node_voting_routes
node_voting_routes -->|"dispatches"| node_voting_handler
node_voting_handler -->|"reads and writes"| node_vote_store
node_organizer -->|"uses marathon"| node_marathon_ui
node_marathon_ui -->|"requests data"| node_marathon_api
node_marathon_api -->|"calls API"| node_marathon_routes
node_marathon_routes -->|"dispatches"| node_marathon_handler
node_marathon_handler -->|"reads and writes"| node_marathon_data

click node_site "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/App.jsx"
click node_home "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Home.jsx"
click node_registration_ui "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Registration.jsx"
click node_registration_api "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/user.js"
click node_user_routes "https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/users.js"
click node_user_controller "https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/users.js"
click node_delegate_store "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/delegates.js"
click node_email_sender "https://github.com/guramigorgadze/global-arena/blob/main/backend/utils/mailSender.js"
click node_sheets_sync "https://github.com/guramigorgadze/global-arena/blob/main/backend/utils/googleSheets.js"
click node_command_ui "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/SessionCommandPage.jsx"
click node_session_engine "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/hooks/useSessionEngine.js"
click node_mun_api "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/mun.js"
click node_mun_routes "https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/mun.js"
click node_committee_auth "https://github.com/guramigorgadze/global-arena/blob/main/backend/middleware/committeeAuth.js"
click node_session_handler "https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/munSession.js"
click node_live_sessions "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/CommitteeSession.js"
click node_session_archive "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/CommitteeSessionArchive.js"
click node_session_schema "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/schemas/SessionFields.js"
click node_voting_ui "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/VotingScreen.jsx"
click node_voting_control "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/VotingControl.jsx"
click node_voting_api "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/voting.js"
click node_voting_routes "https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/voting.js"
click node_voting_handler "https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/voting.js"
click node_vote_store "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/voting.js"
click node_marathon_ui "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Marathon.jsx"
click node_marathon_api "https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/marathon.js"
click node_marathon_routes "https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/marathon.js"
click node_marathon_handler "https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/marathon.js"
click node_marathon_data "https://github.com/guramigorgadze/global-arena/blob/main/backend/models/marathonResults.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_site,node_home toneBlue
class node_registration_ui,node_registration_api,node_user_routes,node_user_controller,node_delegate_store,node_email_sender,node_sheets_sync toneAmber
class node_command_ui,node_session_engine,node_mun_api,node_mun_routes,node_committee_auth,node_session_handler,node_live_sessions,node_session_archive,node_session_schema toneMint
class node_voting_ui,node_voting_control,node_voting_api,node_voting_routes,node_voting_handler,node_vote_store toneRose
class node_marathon_ui,node_marathon_api,node_marathon_routes,node_marathon_handler,node_marathon_data,node_delegate,node_chair,node_organizer,node_mail_service,node_sheets_service toneIndigo
```

## Components

### Public site

- [Site and routes](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Landing page](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Home.jsx): `frontend/src/routes/Home.jsx`

### Registration

- [Registration wizard](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Registration.jsx): `frontend/src/routes/Registration.jsx`
- [Registration API client](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/user.js): `frontend/src/api/user.js`
- [User routes](https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/users.js): `backend/routes/users.js`
- [Registration handler](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/users.js): `backend/controllers/users.js`
- [Delegate records](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/delegates.js): `backend/models/delegates.js`
- [Email sender](https://github.com/guramigorgadze/global-arena/blob/main/backend/utils/mailSender.js): `backend/utils/mailSender.js`
- [Sheets sync](https://github.com/guramigorgadze/global-arena/blob/main/backend/utils/googleSheets.js): `backend/utils/googleSheets.js`

### MUN sessions

- [Session command](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/SessionCommandPage.jsx): `frontend/src/routes/SessionCommandPage.jsx`
- [Session engine](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/hooks/useSessionEngine.js): `frontend/src/hooks/useSessionEngine.js`
- [MUN API client](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/mun.js): `frontend/src/api/mun.js`
- [MUN routes](https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/mun.js): `backend/routes/mun.js`
- [Committee authorization](https://github.com/guramigorgadze/global-arena/blob/main/backend/middleware/committeeAuth.js): `backend/middleware/committeeAuth.js`
- [Session handler](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/munSession.js): `backend/controllers/munSession.js`
- [Live sessions](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/CommitteeSession.js): `backend/models/CommitteeSession.js`
- [Session archive](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/CommitteeSessionArchive.js): `backend/models/CommitteeSessionArchive.js`
- [Session schema](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/schemas/SessionFields.js): `backend/models/schemas/SessionFields.js`

### Voting

- [Voting pages](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/VotingScreen.jsx): `frontend/src/routes/VotingScreen.jsx`
- [Voting control](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/VotingControl.jsx): `frontend/src/routes/VotingControl.jsx`
- [Voting API client](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/voting.js): `frontend/src/api/voting.js`
- [Voting routes](https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/voting.js): `backend/routes/voting.js`
- [Voting handlers](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/voting.js): `backend/controllers/voting.js`
- [Vote records](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/voting.js): `backend/models/voting.js`

### Conference operations

- [Marathon page](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/routes/Marathon.jsx): `frontend/src/routes/Marathon.jsx`
- [Marathon API client](https://github.com/guramigorgadze/global-arena/blob/main/frontend/src/api/marathon.js): `frontend/src/api/marathon.js`
- [Marathon routes](https://github.com/guramigorgadze/global-arena/blob/main/backend/routes/marathon.js): `backend/routes/marathon.js`
- [Marathon handlers](https://github.com/guramigorgadze/global-arena/blob/main/backend/controllers/marathon.js): `backend/controllers/marathon.js`
- [Marathon results](https://github.com/guramigorgadze/global-arena/blob/main/backend/models/marathonResults.js): `backend/models/marathonResults.js`

### Other components

- **Delegate**
- **Committee chair**
- **Organizer**
- **Email service**
- **Google Sheets**

## Connections

- Delegate → Site and routes: visits
- Site and routes → Landing page: routes
- Delegate → Registration wizard: submits details
- Registration wizard → Registration API client: sends registration
- Registration API client → User routes: calls API
- User routes → Registration handler: dispatches
- Registration handler → Delegate records: stores delegate
- Registration handler → Email sender: sends confirmation
- Email sender → Email service: sends email
- Registration handler → Sheets sync: syncs registration
- Sheets sync → Google Sheets: posts registration
- Committee chair → Session command: operates session
- Session command → Session engine: uses engine
- Session engine → MUN API client: syncs session
- MUN API client → MUN routes: calls API
- MUN routes → Committee authorization: protects session routes
- MUN routes → Session handler: dispatches
- Session handler → Live sessions: reads and writes
- Session handler → Session archive: archives on reset
- Live sessions → Session schema: uses fields
- Session archive → Session schema: uses fields
- Committee chair → Voting control: controls votes
- Voting pages → Voting API client: requests voting
- Voting control → Voting API client: controls voting
- Voting API client → Voting routes: calls API
- Voting routes → Voting handlers: dispatches
- Voting handlers → Vote records: reads and writes
- Organizer → Marathon page: uses marathon
- Marathon page → Marathon API client: requests data
- Marathon API client → Marathon routes: calls API
- Marathon routes → Marathon handlers: dispatches
- Marathon handlers → Marathon results: reads and writes
