# itmoorthy/-olympiadapp architecture

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

- Interactive diagram: https://gitdiagram.com/itmoorthy/-olympiadapp
- Repository: https://github.com/itmoorthy/-olympiadapp

## Overview

Olympiad Buddy is a browser-based practice and progress app for elementary students preparing for math, science, and computer science olympiads. The main flow starts at the home screen, selects practice or a mock exam, obtains questions, runs an answering session, and records progress and rewards. Separate branches support daily challenges, parent progress review, and settings. Source excerpts establish several service calls; other screen connections are supported by the App import index. The README is empty, and unsampled modules are represented only where the tree or index supports them.

Main entry points: [`src/App.tsx`](https://github.com/itmoorthy/-olympiadapp/blob/main/src/App.tsx) (App coordinator), [`src/components/daily/DailyChallenge.tsx`](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/daily/DailyChallenge.tsx) (Daily challenge), [`src/services/gamificationService.ts`](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/gamificationService.ts) (Rewards and badges), [`src/components/practice/PracticeSession.tsx`](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/PracticeSession.tsx) (Practice session)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App navigation"]
  node_app["App coordinator<br/>[App.tsx]"]
  node_home["Home screen<br/>[HomeScreen.tsx]"]
  node_config["Olympiad configuration<br/>[olympiadConfig.ts]"]
  node_settings["App settings<br/>[SettingsView.tsx]"]
end

subgraph group_learning["Practice and exams"]
  node_selector["Practice selector"]
  node_session["Practice session"]
  node_questioncard["Question display<br/>[QuestionCard.tsx]"]
  node_answer["Answer options<br/>[AnswerOption.tsx]"]
  node_explanation["Answer explanation"]
  node_mock["Mock exam<br/>[MockExam.tsx]"]
  node_mockresult["Exam results<br/>[MockExamResult.tsx]"]
  node_examservice["Exam assembly<br/>[examService.ts]"]
  node_daily["Daily challenge<br/>[DailyChallenge.tsx]"]
end

subgraph group_questions["Question services"]
  node_generator["Question selection"]
  node_repository["Question repository"]
  node_bank["Curated question bank<br/>[questionBank.ts]"]
  node_procedural["Procedural generation"]
  node_validator["Question validation"]
end

subgraph group_progress["Progress and rewards"]
  node_parent["Parent dashboard"]
  node_review["Question review"]
  node_progressservice["Progress analytics<br/>[progressService.ts]"]
  node_gamification["Rewards and badges"]
  node_storage[("Local progress store<br/>[storageService.ts]")]
  node_sound["Sound effects<br/>[soundService.ts]"]
end

node_student(("Student"))

node_student -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_selector
node_app -->|"routes to"| node_session
node_app -->|"routes to"| node_mock
node_app -->|"routes to"| node_mockresult
node_app -->|"routes to"| node_daily
node_app -->|"routes to"| node_parent
node_app -->|"routes to"| node_review
node_app -->|"routes to"| node_settings
node_app -->|"reads and writes"| node_storage
node_app -->|"requests questions"| node_generator
node_app -->|"creates exam"| node_examservice
node_app -->|"sets sound"| node_sound
node_session -->|"renders"| node_questioncard
node_questioncard -->|"renders"| node_answer
node_questioncard -->|"renders"| node_explanation
node_session -->|"records attempts"| node_storage
node_session -->|"awards progress"| node_gamification
node_session -->|"plays feedback"| node_sound
node_examservice -->|"gets questions"| node_generator
node_daily -->|"gets questions"| node_repository
node_daily -->|"records completion"| node_storage
node_daily -->|"uses rewards"| node_gamification
node_daily -->|"plays feedback"| node_sound
node_daily -->|"renders"| node_answer
node_generator -->|"queries"| node_repository
node_generator -->|"validates"| node_validator
node_repository -->|"filters"| node_bank
node_repository -->|"generates fallback"| node_procedural
node_home -->|"calculates accuracy"| node_progressservice
node_home -->|"gets rank"| node_gamification
node_parent -->|"summarizes progress"| node_progressservice
node_parent -->|"shows rewards"| node_gamification
node_gamification -->|"saves badges"| node_storage
node_gamification -->|"plays celebration"| node_sound
node_selector -->|"uses subjects"| node_config
node_parent -->|"uses subjects"| node_config
node_settings -->|"uses options"| node_config

click node_app "https://github.com/itmoorthy/-olympiadapp/blob/main/src/App.tsx"
click node_home "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/home/HomeScreen.tsx"
click node_selector "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/PracticeSelector.tsx"
click node_session "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/PracticeSession.tsx"
click node_questioncard "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/QuestionCard.tsx"
click node_answer "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/AnswerOption.tsx"
click node_explanation "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/ExplanationCard.tsx"
click node_mock "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/mock/MockExam.tsx"
click node_mockresult "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/mock/MockExamResult.tsx"
click node_examservice "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/examService.ts"
click node_daily "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/daily/DailyChallenge.tsx"
click node_generator "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionGenerator.ts"
click node_repository "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionRepository.ts"
click node_bank "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionBank.ts"
click node_procedural "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/proceduralQuestionGenerator.ts"
click node_validator "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionValidator.ts"
click node_parent "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/progress/ParentDashboard.tsx"
click node_review "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/progress/QuestionReviewModal.tsx"
click node_progressservice "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/progressService.ts"
click node_gamification "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/gamificationService.ts"
click node_storage "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/storageService.ts"
click node_config "https://github.com/itmoorthy/-olympiadapp/blob/main/src/config/olympiadConfig.ts"
click node_settings "https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/settings/SettingsView.tsx"
click node_sound "https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/soundService.ts"

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_home,node_config,node_settings toneBlue
class node_selector,node_session,node_questioncard,node_answer,node_explanation,node_mock,node_mockresult,node_examservice,node_daily toneAmber
class node_generator,node_repository,node_bank,node_procedural,node_validator toneMint
class node_parent,node_review,node_progressservice,node_gamification,node_storage,node_sound toneRose
class node_student toneIndigo
```

## Components

### App navigation

- [App coordinator](https://github.com/itmoorthy/-olympiadapp/blob/main/src/App.tsx): `src/App.tsx`
- [Home screen](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/home/HomeScreen.tsx): `src/components/home/HomeScreen.tsx`
- [Olympiad configuration](https://github.com/itmoorthy/-olympiadapp/blob/main/src/config/olympiadConfig.ts): `src/config/olympiadConfig.ts`
- [App settings](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/settings/SettingsView.tsx): `src/components/settings/SettingsView.tsx`

### Practice and exams

- [Practice selector](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/PracticeSelector.tsx): `src/components/practice/PracticeSelector.tsx`
- [Practice session](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/PracticeSession.tsx): `src/components/practice/PracticeSession.tsx`
- [Question display](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/QuestionCard.tsx): `src/components/practice/QuestionCard.tsx`
- [Answer options](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/AnswerOption.tsx): `src/components/practice/AnswerOption.tsx`
- [Answer explanation](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/practice/ExplanationCard.tsx): `src/components/practice/ExplanationCard.tsx`
- [Mock exam](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/mock/MockExam.tsx): `src/components/mock/MockExam.tsx`
- [Exam results](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/mock/MockExamResult.tsx): `src/components/mock/MockExamResult.tsx`
- [Exam assembly](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/examService.ts): `src/services/examService.ts`
- [Daily challenge](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/daily/DailyChallenge.tsx): `src/components/daily/DailyChallenge.tsx`

### Question services

- [Question selection](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionGenerator.ts): `src/services/questionGenerator.ts`
- [Question repository](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionRepository.ts): `src/services/questionRepository.ts`
- [Curated question bank](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionBank.ts): `src/services/questionBank.ts`
- [Procedural generation](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/proceduralQuestionGenerator.ts): `src/services/proceduralQuestionGenerator.ts`
- [Question validation](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/questionValidator.ts): `src/services/questionValidator.ts`

### Progress and rewards

- [Parent dashboard](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/progress/ParentDashboard.tsx): `src/components/progress/ParentDashboard.tsx`
- [Question review](https://github.com/itmoorthy/-olympiadapp/blob/main/src/components/progress/QuestionReviewModal.tsx): `src/components/progress/QuestionReviewModal.tsx`
- [Progress analytics](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/progressService.ts): `src/services/progressService.ts`
- [Rewards and badges](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/gamificationService.ts): `src/services/gamificationService.ts`
- [Local progress store](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/storageService.ts): `src/services/storageService.ts`
- [Sound effects](https://github.com/itmoorthy/-olympiadapp/blob/main/src/services/soundService.ts): `src/services/soundService.ts`

### Other components

- **Student**

## Connections

- Student → App coordinator: uses
- App coordinator → Home screen: routes to (evidence: `src/App.tsx`)
- App coordinator → Practice selector: routes to (evidence: `src/App.tsx`)
- App coordinator → Practice session: routes to (evidence: `src/App.tsx`)
- App coordinator → Mock exam: routes to (evidence: `src/App.tsx`)
- App coordinator → Exam results: routes to (evidence: `src/App.tsx`)
- App coordinator → Daily challenge: routes to (evidence: `src/App.tsx`)
- App coordinator → Parent dashboard: routes to (evidence: `src/App.tsx`)
- App coordinator → Question review: routes to (evidence: `src/App.tsx`)
- App coordinator → App settings: routes to (evidence: `src/App.tsx`)
- App coordinator → Local progress store: reads and writes (evidence: `src/App.tsx`)
- App coordinator → Question selection: requests questions (evidence: `src/App.tsx`)
- App coordinator → Exam assembly: creates exam (evidence: `src/App.tsx`)
- App coordinator → Sound effects: sets sound (evidence: `src/App.tsx`)
- Practice session → Question display: renders (evidence: `src/components/practice/PracticeSession.tsx`)
- Question display → Answer options: renders (evidence: `src/components/practice/QuestionCard.tsx`)
- Question display → Answer explanation: renders (evidence: `src/components/practice/QuestionCard.tsx`)
- Practice session → Local progress store: records attempts (evidence: `src/components/practice/PracticeSession.tsx`)
- Practice session → Rewards and badges: awards progress (evidence: `src/components/practice/PracticeSession.tsx`)
- Practice session → Sound effects: plays feedback (evidence: `src/components/practice/PracticeSession.tsx`)
- Exam assembly → Question selection: gets questions (evidence: `src/services/examService.ts`)
- Daily challenge → Question repository: gets questions (evidence: `src/components/daily/DailyChallenge.tsx`)
- Daily challenge → Local progress store: records completion (evidence: `src/components/daily/DailyChallenge.tsx`)
- Daily challenge → Rewards and badges: uses rewards (evidence: `src/components/daily/DailyChallenge.tsx`)
- Daily challenge → Sound effects: plays feedback (evidence: `src/components/daily/DailyChallenge.tsx`)
- Daily challenge → Answer options: renders (evidence: `src/components/daily/DailyChallenge.tsx`)
- Question selection → Question repository: queries (evidence: `src/services/questionGenerator.ts`)
- Question selection → Question validation: validates (evidence: `src/services/questionGenerator.ts`)
- Question repository → Curated question bank: filters (evidence: `src/services/questionRepository.ts`)
- Question repository → Procedural generation: generates fallback (evidence: `src/services/questionRepository.ts`)
- Home screen → Progress analytics: calculates accuracy (evidence: `src/components/home/HomeScreen.tsx`)
- Home screen → Rewards and badges: gets rank (evidence: `src/components/home/HomeScreen.tsx`)
- Parent dashboard → Progress analytics: summarizes progress (evidence: `src/components/progress/ParentDashboard.tsx`)
- Parent dashboard → Rewards and badges: shows rewards (evidence: `src/components/progress/ParentDashboard.tsx`)
- Rewards and badges → Local progress store: saves badges (evidence: `src/services/gamificationService.ts`)
- Rewards and badges → Sound effects: plays celebration (evidence: `src/services/gamificationService.ts`)
- Practice selector → Olympiad configuration: uses subjects (evidence: `src/components/practice/PracticeSelector.tsx`)
- Parent dashboard → Olympiad configuration: uses subjects (evidence: `src/components/progress/ParentDashboard.tsx`)
- App settings → Olympiad configuration: uses options (evidence: `src/components/settings/SettingsView.tsx`)
