# abhijith1622/quizzo architecture

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

- Interactive diagram: https://gitdiagram.com/abhijith1622/quizzo
- Repository: https://github.com/abhijith1622/quizzo

## Overview

PulseQuiz lets creators author and manage quizzes, host live sessions, and review results; players join by code or play solo. The graph follows the evidenced client/API, game-session, and persistence responsibilities. The README documents AI quiz generation, but the file tree contains no AI implementation file, so its route is represented only at the existing routes-directory level. Some route internals and client pages were not sampled; links without source evidence are omitted.

Main entry points: [`src/services/api.ts`](https://github.com/abhijith1622/quizzo/blob/main/src/services/api.ts) (REST client), [`server.ts`](https://github.com/abhijith1622/quizzo/blob/main/server.ts) (HTTP server), [`src/App.tsx`](https://github.com/abhijith1622/quizzo/blob/main/src/App.tsx) (App routing), [`server/db.ts`](https://github.com/abhijith1622/quizzo/blob/main/server/db.ts) (In-memory document store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web application"]
  node_app["App routing<br/>[App.tsx]"]
  node_auth["Sign-in and session<br/>[AuthContext.tsx]"]
  node_quiz_editor["Quiz editor<br/>[QuizEditorPage.tsx]"]
  node_dashboard["Quiz dashboard<br/>[QuizzesPage.tsx]"]
  node_templates["Template browsing<br/>[TemplatesPage.tsx]"]
end

subgraph group_backend["API and identity"]
  node_api_client["REST client<br/>[api.ts]"]
  node_server["HTTP server<br/>[server.ts]"]
  node_auth_routes["Authentication routes<br/>[authRoutes.ts]"]
  node_quiz_routes["Quiz routes<br/>[quizRoutes.ts]"]
  node_game_routes["Game routes<br/>[gameRoutes.ts]"]
  node_template_routes["Template routes<br/>[templateRoutes.ts]"]
  node_ai_generation["AI quiz generation"]
end

subgraph group_gameplay["Live gameplay"]
  node_host_ui["Host control room<br/>[HostGamePage.tsx]"]
  node_join_ui["Join game<br/>[JoinGamePage.tsx]"]
  node_player_ui["Player gameplay<br/>[PlayerGamePage.tsx]"]
  node_solo["Solo play<br/>[SoloPlayPage.tsx]"]
  node_socket_client["Socket client<br/>[socket.ts]"]
  node_game_socket["Authoritative game engine<br/>[gameSocket.ts]"]
end

subgraph group_data["Persistence and analytics"]
  node_store[("In-memory document store<br/>[db.ts]")]
  node_mongo[("MongoDB persistence<br/>[mongoService.ts]")]
  node_analytics_page["Analytics dashboard<br/>[AnalyticsPage.tsx]"]
  node_analytics_routes["Analytics and exports<br/>[analyticsRoutes.ts]"]
  node_export_service["Scorecard export"]
  node_history["Quiz history"]
end

node_creator(("Quiz creator"))
node_player(("Game player"))

node_creator -->|"uses"| node_app
node_player -->|"uses"| node_app
node_app -->|"routes to"| node_quiz_editor
node_app -->|"routes to"| node_host_ui
node_app -->|"routes to"| node_player_ui
node_app -->|"routes to"| node_solo
node_app -->|"routes to"| node_join_ui
node_auth -->|"calls"| node_api_client
node_quiz_editor -->|"calls"| node_api_client
node_dashboard -.->|"calls"| node_api_client
node_templates -.->|"calls"| node_api_client
node_host_ui -->|"calls"| node_api_client
node_host_ui -->|"uses"| node_socket_client
node_player_ui -->|"uses"| node_socket_client
node_solo -->|"calls"| node_api_client
node_api_client -->|"requests"| node_server
node_server -->|"mounts"| node_auth_routes
node_server -->|"mounts"| node_quiz_routes
node_server -->|"mounts"| node_game_routes
node_server -->|"mounts"| node_template_routes
node_server -->|"mounts"| node_analytics_routes
node_server -->|"initializes"| node_game_socket
node_auth_routes -->|"reads and writes"| node_store
node_quiz_routes -->|"reads and writes"| node_store
node_quiz_routes -->|"persists quizzes"| node_mongo
node_game_routes -->|"reads and writes"| node_store
node_game_socket -->|"updates state"| node_store
node_mongo -->|"loads and persists"| node_store
node_analytics_page -->|"requests data"| node_api_client
node_analytics_routes -->|"reads results"| node_store
node_analytics_routes -->|"delegates exports"| node_export_service
node_history -->|"requests history"| node_api_client
node_ai_generation -.->|"generates quizzes"| node_creator

click node_app "https://github.com/abhijith1622/quizzo/blob/main/src/App.tsx"
click node_auth "https://github.com/abhijith1622/quizzo/blob/main/src/contexts/AuthContext.tsx"
click node_quiz_editor "https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizEditorPage.tsx"
click node_dashboard "https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizzesPage.tsx"
click node_templates "https://github.com/abhijith1622/quizzo/blob/main/src/pages/public/TemplatesPage.tsx"
click node_host_ui "https://github.com/abhijith1622/quizzo/blob/main/src/pages/host/HostGamePage.tsx"
click node_join_ui "https://github.com/abhijith1622/quizzo/blob/main/src/pages/public/JoinGamePage.tsx"
click node_player_ui "https://github.com/abhijith1622/quizzo/blob/main/src/pages/player/PlayerGamePage.tsx"
click node_solo "https://github.com/abhijith1622/quizzo/blob/main/src/pages/player/SoloPlayPage.tsx"
click node_socket_client "https://github.com/abhijith1622/quizzo/blob/main/src/services/socket.ts"
click node_api_client "https://github.com/abhijith1622/quizzo/blob/main/src/services/api.ts"
click node_server "https://github.com/abhijith1622/quizzo/blob/main/server.ts"
click node_auth_routes "https://github.com/abhijith1622/quizzo/blob/main/server/routes/authRoutes.ts"
click node_quiz_routes "https://github.com/abhijith1622/quizzo/blob/main/server/routes/quizRoutes.ts"
click node_game_routes "https://github.com/abhijith1622/quizzo/blob/main/server/routes/gameRoutes.ts"
click node_template_routes "https://github.com/abhijith1622/quizzo/blob/main/server/routes/templateRoutes.ts"
click node_ai_generation "https://github.com/abhijith1622/quizzo/tree/main/server/routes"
click node_game_socket "https://github.com/abhijith1622/quizzo/blob/main/server/sockets/gameSocket.ts"
click node_store "https://github.com/abhijith1622/quizzo/blob/main/server/db.ts"
click node_mongo "https://github.com/abhijith1622/quizzo/blob/main/server/mongoService.ts"
click node_analytics_page "https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/AnalyticsPage.tsx"
click node_analytics_routes "https://github.com/abhijith1622/quizzo/blob/main/server/routes/analyticsRoutes.ts"
click node_export_service "https://github.com/abhijith1622/quizzo/blob/main/server/services/analyticsExportService.ts"
click node_history "https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizHistoryPage.tsx"

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_auth,node_quiz_editor,node_dashboard,node_templates toneBlue
class node_api_client,node_server,node_auth_routes,node_quiz_routes,node_game_routes,node_template_routes,node_ai_generation toneAmber
class node_host_ui,node_join_ui,node_player_ui,node_solo,node_socket_client,node_game_socket toneMint
class node_store,node_mongo,node_analytics_page,node_analytics_routes,node_export_service,node_history toneRose
class node_creator,node_player toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/abhijith1622/quizzo/blob/main/src/App.tsx): `src/App.tsx`
- [Sign-in and session](https://github.com/abhijith1622/quizzo/blob/main/src/contexts/AuthContext.tsx): `src/contexts/AuthContext.tsx`
- [Quiz editor](https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizEditorPage.tsx): `src/pages/dashboard/QuizEditorPage.tsx`
- [Quiz dashboard](https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizzesPage.tsx): `src/pages/dashboard/QuizzesPage.tsx`
- [Template browsing](https://github.com/abhijith1622/quizzo/blob/main/src/pages/public/TemplatesPage.tsx): `src/pages/public/TemplatesPage.tsx`

### API and identity

- [REST client](https://github.com/abhijith1622/quizzo/blob/main/src/services/api.ts): `src/services/api.ts`
- [HTTP server](https://github.com/abhijith1622/quizzo/blob/main/server.ts): `server.ts`
- [Authentication routes](https://github.com/abhijith1622/quizzo/blob/main/server/routes/authRoutes.ts): `server/routes/authRoutes.ts`
- [Quiz routes](https://github.com/abhijith1622/quizzo/blob/main/server/routes/quizRoutes.ts): `server/routes/quizRoutes.ts`
- [Game routes](https://github.com/abhijith1622/quizzo/blob/main/server/routes/gameRoutes.ts): `server/routes/gameRoutes.ts`
- [Template routes](https://github.com/abhijith1622/quizzo/blob/main/server/routes/templateRoutes.ts): `server/routes/templateRoutes.ts`
- [AI quiz generation](https://github.com/abhijith1622/quizzo/tree/main/server/routes): `server/routes`

### Live gameplay

- [Host control room](https://github.com/abhijith1622/quizzo/blob/main/src/pages/host/HostGamePage.tsx): `src/pages/host/HostGamePage.tsx`
- [Join game](https://github.com/abhijith1622/quizzo/blob/main/src/pages/public/JoinGamePage.tsx): `src/pages/public/JoinGamePage.tsx`
- [Player gameplay](https://github.com/abhijith1622/quizzo/blob/main/src/pages/player/PlayerGamePage.tsx): `src/pages/player/PlayerGamePage.tsx`
- [Solo play](https://github.com/abhijith1622/quizzo/blob/main/src/pages/player/SoloPlayPage.tsx): `src/pages/player/SoloPlayPage.tsx`
- [Socket client](https://github.com/abhijith1622/quizzo/blob/main/src/services/socket.ts): `src/services/socket.ts`
- [Authoritative game engine](https://github.com/abhijith1622/quizzo/blob/main/server/sockets/gameSocket.ts): `server/sockets/gameSocket.ts`

### Persistence and analytics

- [In-memory document store](https://github.com/abhijith1622/quizzo/blob/main/server/db.ts): `server/db.ts`
- [MongoDB persistence](https://github.com/abhijith1622/quizzo/blob/main/server/mongoService.ts): `server/mongoService.ts`
- [Analytics dashboard](https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/AnalyticsPage.tsx): `src/pages/dashboard/AnalyticsPage.tsx`
- [Analytics and exports](https://github.com/abhijith1622/quizzo/blob/main/server/routes/analyticsRoutes.ts): `server/routes/analyticsRoutes.ts`
- [Scorecard export](https://github.com/abhijith1622/quizzo/blob/main/server/services/analyticsExportService.ts): `server/services/analyticsExportService.ts`
- [Quiz history](https://github.com/abhijith1622/quizzo/blob/main/src/pages/dashboard/QuizHistoryPage.tsx): `src/pages/dashboard/QuizHistoryPage.tsx`

### Other components

- **Quiz creator**
- **Game player**

## Connections

- Quiz creator → App routing: uses
- Game player → App routing: uses
- App routing → Quiz editor: routes to (evidence: `src/App.tsx`)
- App routing → Host control room: routes to (evidence: `src/App.tsx`)
- App routing → Player gameplay: routes to (evidence: `src/App.tsx`)
- App routing → Solo play: routes to (evidence: `src/App.tsx`)
- App routing → Join game: routes to (evidence: `src/App.tsx`)
- Sign-in and session → REST client: calls (evidence: `src/contexts/AuthContext.tsx`)
- Quiz editor → REST client: calls (evidence: `src/pages/dashboard/QuizEditorPage.tsx`)
- Quiz dashboard → REST client: calls
- Template browsing → REST client: calls
- Host control room → REST client: calls (evidence: `src/pages/host/HostGamePage.tsx`)
- Host control room → Socket client: uses (evidence: `src/pages/host/HostGamePage.tsx`)
- Player gameplay → Socket client: uses (evidence: `src/pages/player/PlayerGamePage.tsx`)
- Solo play → REST client: calls (evidence: `src/pages/player/SoloPlayPage.tsx`)
- REST client → HTTP server: requests
- HTTP server → Authentication routes: mounts (evidence: `server.ts`)
- HTTP server → Quiz routes: mounts (evidence: `server.ts`)
- HTTP server → Game routes: mounts (evidence: `server.ts`)
- HTTP server → Template routes: mounts (evidence: `server.ts`)
- HTTP server → Analytics and exports: mounts (evidence: `server.ts`)
- HTTP server → Authoritative game engine: initializes (evidence: `server.ts`)
- Authentication routes → In-memory document store: reads and writes (evidence: `server/routes/authRoutes.ts`)
- Quiz routes → In-memory document store: reads and writes (evidence: `server/routes/quizRoutes.ts`)
- Quiz routes → MongoDB persistence: persists quizzes (evidence: `server/routes/quizRoutes.ts`)
- Game routes → In-memory document store: reads and writes (evidence: `server/routes/gameRoutes.ts`)
- Authoritative game engine → In-memory document store: updates state (evidence: `server/sockets/gameSocket.ts`)
- MongoDB persistence → In-memory document store: loads and persists (evidence: `server/mongoService.ts`)
- Analytics dashboard → REST client: requests data (evidence: `src/pages/dashboard/AnalyticsPage.tsx`)
- Analytics and exports → In-memory document store: reads results (evidence: `server/routes/analyticsRoutes.ts`)
- Analytics and exports → Scorecard export: delegates exports (evidence: `server/routes/analyticsRoutes.ts`)
- Quiz history → REST client: requests history (evidence: `src/pages/dashboard/QuizHistoryPage.tsx`)
- AI quiz generation → Quiz creator: generates quizzes
