# srihari-vb/ssc-prep architecture

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

- Interactive diagram: https://gitdiagram.com/srihari-vb/ssc-prep
- Repository: https://github.com/srihari-vb/ssc-prep

## Overview

This is a React-based SSC CGL preparation app. The main workflow is selecting a topic from the home page, entering its topic page, and using topic material in study or quiz experiences; a separate Learn area presents a curriculum with saved progress and due reviews. The tree shows broad topic-specific practice and visual-learning features, but most topic page implementations were not excerpted and the README is empty, so their internal wiring is not asserted.

Main entry points: [`src/pages/Home.tsx`](https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/Home.tsx) (Topic home), [`src/pages/LearnPage.tsx`](https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/LearnPage.tsx) (Learn page), [`src/App.tsx`](https://github.com/srihari-vb/ssc-prep/blob/main/src/App.tsx) (App router), [`src/engine/types.ts`](https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/types.ts) (Engine types)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_navigation["App navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_home["Topic home<br/>[Home.tsx]"]
end

subgraph group_learning["Guided learning"]
  node_learnpage["Learn page<br/>[LearnPage.tsx]"]
  node_curriculum["Curriculum<br/>[curriculum.ts]"]
  node_study["Study view<br/>[StudyView.tsx]"]
  node_review["Review view<br/>[ReviewView.tsx]"]
  node_progress["Progress view<br/>[ProgressView.tsx]"]
  node_progressstore[("Progress storage<br/>[storage.ts]")]
  node_glossary["Glossary entries<br/>[glossary.ts]"]
end

subgraph group_practice["Topic practice"]
  node_topicpages["Topic pages"]
  node_generaldata["General topic data"]
  node_englishdata["English questions<br/>[data.ts]"]
  node_booksdata["Books data<br/>[data.ts]"]
  node_budgetdata["Budget data<br/>[data.ts]"]
  node_examengine["Exam engine<br/>[ExamEngine.tsx]"]
  node_booksengine["Books exam"]
end

subgraph group_content["Question content"]
  node_questioncontent["Question display"]
  node_questiontypes["Question formats"]
  node_enginetypes["Engine types<br/>[types.ts]"]
end

node_learner(("Learner"))

node_learner -->|"opens app"| node_app
node_app -->|"renders home"| node_home
node_home -->|"selects page"| node_app
node_app -->|"routes to topics"| node_topicpages
node_app -->|"routes to learn"| node_learnpage
node_home -->|"counts topic data"| node_generaldata
node_home -->|"counts questions"| node_englishdata
node_home -->|"counts books"| node_booksdata
node_home -->|"counts facts"| node_budgetdata
node_learnpage -->|"loads curriculum"| node_curriculum
node_learnpage -->|"renders study"| node_study
node_learnpage -->|"renders review"| node_review
node_learnpage -->|"renders progress"| node_progress
node_learnpage -->|"loads glossary"| node_glossary
node_study -->|"reads and saves"| node_progressstore
node_review -->|"reads and updates"| node_progressstore
node_progress -->|"reads progress"| node_progressstore
node_examengine -->|"renders questions"| node_questioncontent
node_booksengine -->|"renders questions"| node_questioncontent
node_questioncontent -->|"uses formats"| node_questiontypes
node_examengine -->|"uses types"| node_enginetypes
node_booksengine -->|"uses types"| node_enginetypes
node_booksdata -->|"uses entry types"| node_enginetypes
node_budgetdata -->|"uses question types"| node_enginetypes

click node_app "https://github.com/srihari-vb/ssc-prep/blob/main/src/App.tsx"
click node_home "https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/Home.tsx"
click node_learnpage "https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/LearnPage.tsx"
click node_curriculum "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/curriculum.ts"
click node_study "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/StudyView.tsx"
click node_review "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/ReviewView.tsx"
click node_progress "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/ProgressView.tsx"
click node_progressstore "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/storage.ts"
click node_glossary "https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/glossary.ts"
click node_topicpages "https://github.com/srihari-vb/ssc-prep/tree/main/src/topics"
click node_generaldata "https://github.com/srihari-vb/ssc-prep/tree/main/src/topics"
click node_englishdata "https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/english/data.ts"
click node_booksdata "https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/books-authors/data.ts"
click node_budgetdata "https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/union-budget/data.ts"
click node_examengine "https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/ExamEngine.tsx"
click node_booksengine "https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/BooksExamEngine.tsx"
click node_questioncontent "https://github.com/srihari-vb/ssc-prep/blob/main/src/components/QuestionContent.tsx"
click node_questiontypes "https://github.com/srihari-vb/ssc-prep/blob/main/src/sscQuestionTypes.ts"
click node_enginetypes "https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/types.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 toneBlue
class node_learnpage,node_curriculum,node_study,node_review,node_progress,node_progressstore,node_glossary toneAmber
class node_topicpages,node_generaldata,node_englishdata,node_booksdata,node_budgetdata,node_examengine,node_booksengine toneMint
class node_questioncontent,node_questiontypes,node_enginetypes toneRose
class node_learner toneIndigo
```

## Components

### App navigation

- [App router](https://github.com/srihari-vb/ssc-prep/blob/main/src/App.tsx): `src/App.tsx`
- [Topic home](https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`

### Guided learning

- [Learn page](https://github.com/srihari-vb/ssc-prep/blob/main/src/pages/LearnPage.tsx): `src/pages/LearnPage.tsx`
- [Curriculum](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/curriculum.ts): `src/learn/curriculum.ts`
- [Study view](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/StudyView.tsx): `src/learn/components/StudyView.tsx`
- [Review view](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/ReviewView.tsx): `src/learn/components/ReviewView.tsx`
- [Progress view](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/components/ProgressView.tsx): `src/learn/components/ProgressView.tsx`
- [Progress storage](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/storage.ts): `src/learn/storage.ts`
- [Glossary entries](https://github.com/srihari-vb/ssc-prep/blob/main/src/learn/glossary.ts): `src/learn/glossary.ts`

### Topic practice

- [Topic pages](https://github.com/srihari-vb/ssc-prep/tree/main/src/topics): `src/topics`
- [General topic data](https://github.com/srihari-vb/ssc-prep/tree/main/src/topics): `src/topics`
- [English questions](https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/english/data.ts): `src/topics/english/data.ts`
- [Books data](https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/books-authors/data.ts): `src/topics/books-authors/data.ts`
- [Budget data](https://github.com/srihari-vb/ssc-prep/blob/main/src/topics/union-budget/data.ts): `src/topics/union-budget/data.ts`
- [Exam engine](https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/ExamEngine.tsx): `src/engine/ExamEngine.tsx`
- [Books exam](https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/BooksExamEngine.tsx): `src/engine/BooksExamEngine.tsx`

### Question content

- [Question display](https://github.com/srihari-vb/ssc-prep/blob/main/src/components/QuestionContent.tsx): `src/components/QuestionContent.tsx`
- [Question formats](https://github.com/srihari-vb/ssc-prep/blob/main/src/sscQuestionTypes.ts): `src/sscQuestionTypes.ts`
- [Engine types](https://github.com/srihari-vb/ssc-prep/blob/main/src/engine/types.ts): `src/engine/types.ts`

### Other components

- **Learner**

## Connections

- Learner → App router: opens app
- App router → Topic home: renders home (evidence: `src/App.tsx`)
- Topic home → App router: selects page (evidence: `src/App.tsx`)
- App router → Topic pages: routes to topics (evidence: `src/App.tsx`)
- App router → Learn page: routes to learn (evidence: `src/App.tsx`)
- Topic home → General topic data: counts topic data (evidence: `src/pages/Home.tsx`)
- Topic home → English questions: counts questions (evidence: `src/pages/Home.tsx`)
- Topic home → Books data: counts books (evidence: `src/pages/Home.tsx`)
- Topic home → Budget data: counts facts (evidence: `src/pages/Home.tsx`)
- Learn page → Curriculum: loads curriculum (evidence: `src/pages/LearnPage.tsx`)
- Learn page → Study view: renders study (evidence: `src/pages/LearnPage.tsx`)
- Learn page → Review view: renders review (evidence: `src/pages/LearnPage.tsx`)
- Learn page → Progress view: renders progress (evidence: `src/pages/LearnPage.tsx`)
- Learn page → Glossary entries: loads glossary (evidence: `src/pages/LearnPage.tsx`)
- Study view → Progress storage: reads and saves (evidence: `src/learn/components/StudyView.tsx`)
- Review view → Progress storage: reads and updates (evidence: `src/learn/components/ReviewView.tsx`)
- Progress view → Progress storage: reads progress (evidence: `src/learn/components/ProgressView.tsx`)
- Exam engine → Question display: renders questions (evidence: `src/engine/ExamEngine.tsx`)
- Books exam → Question display: renders questions (evidence: `src/engine/BooksExamEngine.tsx`)
- Question display → Question formats: uses formats (evidence: `src/components/QuestionContent.tsx`)
- Exam engine → Engine types: uses types (evidence: `src/engine/ExamEngine.tsx`)
- Books exam → Engine types: uses types (evidence: `src/engine/BooksExamEngine.tsx`)
- Books data → Engine types: uses entry types (evidence: `src/topics/books-authors/data.ts`)
- Budget data → Engine types: uses question types (evidence: `src/topics/union-budget/data.ts`)
