# harshsalunkhe2005/quiz-project architecture

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

- Interactive diagram: https://gitdiagram.com/harshsalunkhe2005/quiz-project
- Repository: https://github.com/harshsalunkhe2005/quiz-project

## Overview

Sunday Sprint Quiz is a scheduled React quiz for students, with an administrator dashboard for participation controls and results. The student workflow is eligibility checks and registration, instructions, timed questions, score display, and result submission; admins configure the sprint and review/export results. The supplied source confirms timezone validation, local refresh locks, and duplicate checks, but does not show VPN detection or database-level participation constraints. Major page flows are mapped from App; unsampled page internals are not inferred.

Main entry points: [`src/App.jsx`](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/App.jsx) (App flow controller), [`src/lib/supabaseClient.js`](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/lib/supabaseClient.js) (Supabase client), [`src/pages/LandingPage.jsx`](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/LandingPage.jsx) (Registration), [`src/pages/QuizPage.jsx`](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/QuizPage.jsx) (Timed quiz)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and Scheduling"]
  node_app["App flow controller<br/>[App.jsx]"]
  node_landing["Registration<br/>[LandingPage.jsx]"]
  node_instructions["Localized instructions"]
  node_pre["Pre-sprint status<br/>[PreSprintPage.jsx]"]
  node_post["Post-sprint status<br/>[PostSprintPage.jsx]"]
end

subgraph group_quiz["Quiz Experience"]
  node_quiz["Timed quiz<br/>[QuizPage.jsx]"]
  node_questions["Quiz questions<br/>[questions.json]"]
  node_result["Score display<br/>[ResultPage.jsx]"]
end

subgraph group_security["Participation Controls"]
  node_timezone["Timezone check<br/>[security.jsx]"]
  node_security_error["Security error view"]
  node_browser_store[("Browser local storage")]
  node_time_service["Server-time lookup<br/>[timeService.js]"]
end

subgraph group_admin["Administration and Results"]
  node_admin["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_supabase_client["Supabase client<br/>[supabaseClient.js]"]
  node_supabase[("Supabase database")]
  node_xlsx["XLSX export library"]
end

node_student(("Student"))
node_administrator(("Administrator"))
node_time_api["WorldTime API"]

node_student -->|"opens app"| node_app
node_administrator -->|"opens admin"| node_app
node_app -->|"checks timezone"| node_timezone
node_app -->|"reads and writes"| node_browser_store
node_app -->|"loads settings"| node_supabase_client
node_app -->|"requests server hour"| node_time_service
node_time_service -->|"fetches time"| node_time_api
node_app -->|"dispatches"| node_landing
node_app -->|"dispatches"| node_pre
node_app -->|"dispatches"| node_post
node_app -->|"dispatches"| node_security_error
node_app -->|"dispatches"| node_instructions
node_app -->|"dispatches"| node_quiz
node_app -->|"dispatches"| node_result
node_app -->|"dispatches"| node_admin
node_landing -->|"checks duplicate"| node_supabase_client
node_landing -->|"submits details"| node_app
node_instructions -->|"proceeds"| node_app
node_app -->|"loads quiz data"| node_questions
node_quiz -->|"persists progress"| node_browser_store
node_quiz -->|"completes quiz"| node_app
node_app -->|"submits result"| node_supabase_client
node_app -->|"passes score"| node_result
node_admin -->|"reads and updates"| node_supabase_client
node_admin -.->|"exports results"| node_xlsx
node_supabase_client -->|"queries data"| node_supabase

click node_app "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/App.jsx"
click node_landing "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/LandingPage.jsx"
click node_instructions "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/InstructionPage.jsx"
click node_pre "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/PreSprintPage.jsx"
click node_post "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/PostSprintPage.jsx"
click node_timezone "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/utils/security.jsx"
click node_quiz "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/QuizPage.jsx"
click node_questions "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/data/questions.json"
click node_result "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/ResultPage.jsx"
click node_admin "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/AdminDashboard.jsx"
click node_security_error "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/SecurityErrorPage.jsx"
click node_time_service "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/services/timeService.js"
click node_supabase_client "https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/lib/supabaseClient.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_landing,node_instructions,node_pre,node_post toneBlue
class node_quiz,node_questions,node_result toneAmber
class node_timezone,node_security_error,node_browser_store,node_time_service,node_time_api toneMint
class node_admin,node_supabase_client,node_supabase,node_xlsx toneRose
class node_student,node_administrator toneIndigo
```

## Components

### Entry and Scheduling

- [App flow controller](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/App.jsx): `src/App.jsx`
- [Registration](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/LandingPage.jsx): `src/pages/LandingPage.jsx`
- [Localized instructions](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/InstructionPage.jsx): `src/pages/InstructionPage.jsx`
- [Pre-sprint status](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/PreSprintPage.jsx): `src/pages/PreSprintPage.jsx`
- [Post-sprint status](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/PostSprintPage.jsx): `src/pages/PostSprintPage.jsx`

### Quiz Experience

- [Timed quiz](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/QuizPage.jsx): `src/pages/QuizPage.jsx`
- [Quiz questions](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/data/questions.json): `src/data/questions.json`
- [Score display](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/ResultPage.jsx): `src/pages/ResultPage.jsx`

### Participation Controls

- [Timezone check](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/utils/security.jsx): `src/utils/security.jsx`
- [Security error view](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/SecurityErrorPage.jsx): `src/pages/SecurityErrorPage.jsx`
- **Browser local storage**
- [Server-time lookup](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/services/timeService.js): `src/services/timeService.js`

### Administration and Results

- [Admin dashboard](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/pages/AdminDashboard.jsx): `src/pages/AdminDashboard.jsx`
- [Supabase client](https://github.com/harshsalunkhe2005/quiz-project/blob/main/src/lib/supabaseClient.js): `src/lib/supabaseClient.js`
- **Supabase database**
- **XLSX export library**

### Other components

- **Student**
- **Administrator**
- **WorldTime API**

## Connections

- Student → App flow controller: opens app
- Administrator → App flow controller: opens admin
- App flow controller → Timezone check: checks timezone
- App flow controller → Browser local storage: reads and writes
- App flow controller → Supabase client: loads settings
- App flow controller → Server-time lookup: requests server hour
- Server-time lookup → WorldTime API: fetches time
- App flow controller → Registration: dispatches
- App flow controller → Pre-sprint status: dispatches
- App flow controller → Post-sprint status: dispatches
- App flow controller → Security error view: dispatches
- App flow controller → Localized instructions: dispatches
- App flow controller → Timed quiz: dispatches
- App flow controller → Score display: dispatches
- App flow controller → Admin dashboard: dispatches
- Registration → Supabase client: checks duplicate
- Registration → App flow controller: submits details
- Localized instructions → App flow controller: proceeds
- App flow controller → Quiz questions: loads quiz data
- Timed quiz → Browser local storage: persists progress
- Timed quiz → App flow controller: completes quiz
- App flow controller → Supabase client: submits result
- App flow controller → Score display: passes score
- Admin dashboard → Supabase client: reads and updates
- Admin dashboard → XLSX export library: exports results
- Supabase client → Supabase database: queries data
