# ojas2005/shiksha-setu-main architecture

> Architecture diagram of the GitHub repository ojas2005/shiksha-setu-main, 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/ojas2005/shiksha-setu-main
- Repository: https://github.com/ojas2005/shiksha-setu-main

## Overview

Shiksha Setu is an offline-first classroom assessment PWA. Teachers enter through the app shell, manage classes and students, create and print a leveled assessment, import grading results, and review learning-group recommendations for teaching action. Its domain spans question-bank and paper creation, result processing, recommendation, and instructional material; administrators also edit the knowledge graph and review offline sync. The source excerpts establish the assessment and persistence calls shown; routes and some subsystem wiring are documented but their implementation was not sampled.

Main entry points: [`src/main.tsx`](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/main.tsx) (App Shell), [`src/views/assessment-flow.tsx`](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/assessment-flow.tsx) (Assessment Flow), [`src/lib/db.ts`](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/db.ts) (Offline Data Layer), [`src/views/student-register.tsx`](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/student-register.tsx) (Student Register)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["App and Navigation"]
  node_app["App Shell<br/>[main.tsx]"]
  node_dashboard["Role Dashboard<br/>[main-views.tsx]"]
  node_register["Student Register"]
end

subgraph group_assessment["Assessment Workflow"]
  node_assessment_flow["Assessment Flow"]
  node_question_bank["Question Bank<br/>[data.ts]"]
  node_ncert_bank["NCERT Questions<br/>[ncert-questions.ts]"]
  node_services["Assessment Services<br/>[services.ts]"]
  node_print["Paper PDF<br/>[print-paper.tsx]"]
  node_devanagari["Hindi PDF Renderer<br/>[pdf-devanagari.ts]"]
  node_history["Assessment History"]
  node_saved_sets["Saved Question Sets"]
end

subgraph group_learning["Teaching Support"]
  node_recommendations["Group Recommendations<br/>[services.ts]"]
  node_knowledge_graph["Knowledge Graph<br/>[knowledge-graph.ts]"]
  node_kg_editor["Graph Editor<br/>[kg-editor.tsx]"]
  node_study_material["Study Materials"]
end

subgraph group_storage["Offline Data"]
  node_db["Offline Data Layer<br/>[db.ts]"]
end

node_teacher(("Teacher or Admin"))
node_ai_grader(("Gemini or ChatGPT"))
node_indexeddb[("IndexedDB")]

node_teacher -->|"opens"| node_app
node_app -->|"loads data"| node_db
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_assessment_flow
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_history
node_app -->|"routes to"| node_saved_sets
node_app -->|"routes to"| node_kg_editor
node_assessment_flow -->|"uses questions"| node_question_bank
node_question_bank -->|"includes questions"| node_ncert_bank
node_assessment_flow -->|"saves paper"| node_db
node_assessment_flow -->|"generates PDFs"| node_print
node_print -->|"renders Hindi"| node_devanagari
node_assessment_flow -.->|"sends prompt"| node_ai_grader
node_ai_grader -.->|"returns results"| node_assessment_flow
node_assessment_flow -->|"parses and maps"| node_services
node_services -->|"builds groups"| node_recommendations
node_recommendations -->|"gets guidance"| node_knowledge_graph
node_register -->|"saves records"| node_db
node_kg_editor -->|"saves graph edits"| node_db
node_db -->|"persists locally"| node_indexeddb

click node_app "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/main.tsx"
click node_dashboard "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/main-views.tsx"
click node_register "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/student-register.tsx"
click node_assessment_flow "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/assessment-flow.tsx"
click node_question_bank "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/data.ts"
click node_ncert_bank "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/ncert-questions.ts"
click node_services "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/services.ts"
click node_print "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/print-paper.tsx"
click node_devanagari "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/pdf-devanagari.ts"
click node_history "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/assessment-history.tsx"
click node_saved_sets "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/saved-question-sets.tsx"
click node_recommendations "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/services.ts"
click node_knowledge_graph "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/knowledge-graph.ts"
click node_kg_editor "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/kg-editor.tsx"
click node_study_material "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/study-material-modal.tsx"
click node_db "https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/db.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_dashboard,node_register toneBlue
class node_assessment_flow,node_question_bank,node_ncert_bank,node_services,node_print,node_devanagari,node_history,node_saved_sets,node_indexeddb toneAmber
class node_recommendations,node_knowledge_graph,node_kg_editor,node_study_material toneMint
class node_db toneRose
class node_teacher,node_ai_grader toneIndigo
```

## Components

### App and Navigation

- [App Shell](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/main.tsx): `src/main.tsx`
- [Role Dashboard](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/main-views.tsx): `src/views/main-views.tsx`
- [Student Register](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/student-register.tsx): `src/views/student-register.tsx`

### Assessment Workflow

- [Assessment Flow](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/assessment-flow.tsx): `src/views/assessment-flow.tsx`
- [Question Bank](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/data.ts): `src/lib/data.ts`
- [NCERT Questions](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/ncert-questions.ts): `src/lib/ncert-questions.ts`
- [Assessment Services](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/services.ts): `src/lib/services.ts`
- [Paper PDF](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/print-paper.tsx): `src/components/print-paper.tsx`
- [Hindi PDF Renderer](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/pdf-devanagari.ts): `src/components/pdf-devanagari.ts`
- [Assessment History](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/assessment-history.tsx): `src/views/assessment-history.tsx`
- [Saved Question Sets](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/saved-question-sets.tsx): `src/views/saved-question-sets.tsx`

### Teaching Support

- [Group Recommendations](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/services.ts): `src/lib/services.ts`
- [Knowledge Graph](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/knowledge-graph.ts): `src/lib/knowledge-graph.ts`
- [Graph Editor](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/views/kg-editor.tsx): `src/views/kg-editor.tsx`
- [Study Materials](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/components/study-material-modal.tsx): `src/components/study-material-modal.tsx`

### Offline Data

- [Offline Data Layer](https://github.com/ojas2005/shiksha-setu-main/blob/main/src/lib/db.ts): `src/lib/db.ts`

### Other components

- **Teacher or Admin**
- **Gemini or ChatGPT**
- **IndexedDB**

## Connections

- Teacher or Admin → App Shell: opens
- App Shell → Offline Data Layer: loads data
- App Shell → Role Dashboard: routes to
- App Shell → Assessment Flow: routes to
- App Shell → Student Register: routes to
- App Shell → Assessment History: routes to
- App Shell → Saved Question Sets: routes to
- App Shell → Graph Editor: routes to
- Assessment Flow → Question Bank: uses questions
- Question Bank → NCERT Questions: includes questions
- Assessment Flow → Offline Data Layer: saves paper
- Assessment Flow → Paper PDF: generates PDFs
- Paper PDF → Hindi PDF Renderer: renders Hindi
- Assessment Flow → Gemini or ChatGPT: sends prompt
- Gemini or ChatGPT → Assessment Flow: returns results
- Assessment Flow → Assessment Services: parses and maps
- Assessment Services → Group Recommendations: builds groups
- Group Recommendations → Knowledge Graph: gets guidance
- Student Register → Offline Data Layer: saves records
- Graph Editor → Offline Data Layer: saves graph edits
- Offline Data Layer → IndexedDB: persists locally
