# sumanchgoraiofficial92-alt/prayogshala-main architecture

> Architecture diagram of the GitHub repository sumanchgoraiofficial92-alt/prayogshala-main, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sumanchgoraiofficial92-alt/prayogshala-main
- Repository: https://github.com/sumanchgoraiofficial92-alt/prayogshala-main

## Overview

PrayogShala is an offline-first virtual science lab. The main workflow is to choose an experiment, run its interactive lab, record observations, and review or export results; supporting branches provide theory and narrated guidance, challenges, offline synchronization, and teacher assignment and class views. The graph reflects the App routing and module references in the source index, plus the shown service and component imports. Some implementation details are unsampled, so those connections are omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/App.tsx) (App router), [`src/services/i18n.ts`](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/i18n.ts) (Translations), [`src/components/experiments/PendulumLab.tsx`](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/PendulumLab.tsx) (Pendulum lab), [`src/components/experiments/OhmsLawLab.tsx`](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/OhmsLawLab.tsx) (Ohm's law lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and navigation"]
  node_app["App router<br/>[App.tsx]"]
  node_sidebar["Navigation sidebar<br/>[Sidebar.tsx]"]
  node_header["Language and header<br/>[Header.tsx]"]
end

subgraph group_labs["Interactive experiments"]
  node_pendulum["Pendulum lab<br/>[PendulumLab.tsx]"]
  node_ohms["Ohm's law lab<br/>[OhmsLawLab.tsx]"]
  node_photo["Photosynthesis lab"]
  node_titration["Titration lab<br/>[TitrationLab.tsx]"]
  node_experimentdata["Experiment definitions<br/>[experiments.ts]"]
end

subgraph group_learning["Learning and accessibility"]
  node_theory["Experiment theory view"]
  node_narration["Live step narration"]
  node_theorydata["Theory content"]
  node_stepguides["Step guide content<br/>[liveStepGuides.ts]"]
  node_audioguides["Audio guide content<br/>[audioGuides.ts]"]
  node_speech["Speech services<br/>[speech.ts]"]
  node_translations["Translations<br/>[i18n.ts]"]
end

subgraph group_records["Notebook and persistence"]
  node_notebook["Notebook workbench"]
  node_storage[("Local storage service<br/>[storage.ts]")]
  node_pdf["PDF report generator<br/>[pdfReport.ts]"]
  node_sync["Offline sync panel"]
end

subgraph group_classroom["Classroom features"]
  node_challenges["Challenge hub<br/>[ChallengeHub.tsx]"]
  node_teacher["Teacher dashboard"]
end

node_user(("Student or teacher"))

node_user -->|"uses"| node_app
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_header
node_app -->|"routes to"| node_pendulum
node_app -->|"routes to"| node_ohms
node_app -->|"routes to"| node_photo
node_app -->|"routes to"| node_titration
node_app -->|"routes to"| node_notebook
node_app -->|"routes to"| node_teacher
node_app -->|"routes to"| node_challenges
node_app -->|"routes to"| node_sync
node_app -->|"loads profile"| node_storage
node_app -->|"translates"| node_translations
node_sidebar -->|"reads definitions"| node_experimentdata
node_header -->|"translates"| node_translations
node_pendulum -->|"renders"| node_theory
node_pendulum -->|"renders"| node_narration
node_ohms -->|"renders"| node_theory
node_ohms -->|"renders"| node_narration
node_photo -->|"renders"| node_theory
node_photo -->|"renders"| node_narration
node_titration -->|"renders"| node_theory
node_titration -->|"renders"| node_narration
node_theory -->|"reads content"| node_theorydata
node_narration -->|"reads guide"| node_stepguides
node_narration -->|"speaks guide"| node_speech
node_pendulum -->|"loads audio guide"| node_audioguides
node_ohms -->|"loads audio guide"| node_audioguides
node_photo -->|"loads audio guide"| node_audioguides
node_titration -->|"loads audio guide"| node_audioguides
node_pendulum -->|"uses speech"| node_speech
node_ohms -->|"uses speech"| node_speech
node_photo -->|"uses speech"| node_speech
node_titration -->|"uses speech"| node_speech
node_pendulum -->|"translates"| node_translations
node_ohms -->|"translates"| node_translations
node_photo -->|"translates"| node_translations
node_titration -->|"translates"| node_translations
node_notebook -->|"reads and writes"| node_storage
node_notebook -->|"uses speech"| node_speech
node_notebook -->|"generates report"| node_pdf
node_pdf -->|"translates report"| node_translations
node_sync -->|"uses local data"| node_storage
node_sync -->|"translates"| node_translations
node_challenges -->|"updates profile"| node_storage
node_challenges -->|"uses speech"| node_speech
node_teacher -->|"loads class data"| node_storage
node_teacher -->|"translates"| node_translations

click node_app "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/App.tsx"
click node_sidebar "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/layout/Sidebar.tsx"
click node_header "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/layout/Header.tsx"
click node_pendulum "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/PendulumLab.tsx"
click node_ohms "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/OhmsLawLab.tsx"
click node_photo "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/PhotosynthesisLab.tsx"
click node_titration "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/TitrationLab.tsx"
click node_theory "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/common/ExperimentTheoryView.tsx"
click node_narration "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/common/LiveStepNarrationCard.tsx"
click node_theorydata "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/experimentTheory.ts"
click node_stepguides "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/liveStepGuides.ts"
click node_audioguides "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/audioGuides.ts"
click node_speech "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/speech.ts"
click node_translations "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/i18n.ts"
click node_experimentdata "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/experiments.ts"
click node_notebook "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/notebook/NotebookWorkbench.tsx"
click node_storage "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/storage.ts"
click node_pdf "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/pdfReport.ts"
click node_sync "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/sync/OfflineSyncPanel.tsx"
click node_challenges "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/gamification/ChallengeHub.tsx"
click node_teacher "https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/teacher/TeacherDashboard.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_sidebar,node_header toneBlue
class node_pendulum,node_ohms,node_photo,node_titration,node_experimentdata toneAmber
class node_theory,node_narration,node_theorydata,node_stepguides,node_audioguides,node_speech,node_translations toneMint
class node_notebook,node_storage,node_pdf,node_sync toneRose
class node_challenges,node_teacher,node_user toneIndigo
```

## Components

### App and navigation

- [App router](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation sidebar](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [Language and header](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`

### Interactive experiments

- [Pendulum lab](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/PendulumLab.tsx): `src/components/experiments/PendulumLab.tsx`
- [Ohm's law lab](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/OhmsLawLab.tsx): `src/components/experiments/OhmsLawLab.tsx`
- [Photosynthesis lab](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/PhotosynthesisLab.tsx): `src/components/experiments/PhotosynthesisLab.tsx`
- [Titration lab](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/experiments/TitrationLab.tsx): `src/components/experiments/TitrationLab.tsx`
- [Experiment definitions](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/experiments.ts): `src/data/experiments.ts`

### Learning and accessibility

- [Experiment theory view](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/common/ExperimentTheoryView.tsx): `src/components/common/ExperimentTheoryView.tsx`
- [Live step narration](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/common/LiveStepNarrationCard.tsx): `src/components/common/LiveStepNarrationCard.tsx`
- [Theory content](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/experimentTheory.ts): `src/data/experimentTheory.ts`
- [Step guide content](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/liveStepGuides.ts): `src/data/liveStepGuides.ts`
- [Audio guide content](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/data/audioGuides.ts): `src/data/audioGuides.ts`
- [Speech services](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/speech.ts): `src/services/speech.ts`
- [Translations](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/i18n.ts): `src/services/i18n.ts`

### Notebook and persistence

- [Notebook workbench](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/notebook/NotebookWorkbench.tsx): `src/components/notebook/NotebookWorkbench.tsx`
- [Local storage service](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [PDF report generator](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/services/pdfReport.ts): `src/services/pdfReport.ts`
- [Offline sync panel](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/sync/OfflineSyncPanel.tsx): `src/components/sync/OfflineSyncPanel.tsx`

### Classroom features

- [Challenge hub](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/gamification/ChallengeHub.tsx): `src/components/gamification/ChallengeHub.tsx`
- [Teacher dashboard](https://github.com/sumanchgoraiofficial92-alt/prayogshala-main/blob/main/src/components/teacher/TeacherDashboard.tsx): `src/components/teacher/TeacherDashboard.tsx`

### Other components

- **Student or teacher**

## Connections

- Student or teacher → App router: uses
- App router → Navigation sidebar: renders (evidence: `src/App.tsx`)
- App router → Language and header: renders (evidence: `src/App.tsx`)
- App router → Pendulum lab: routes to (evidence: `src/App.tsx`)
- App router → Ohm's law lab: routes to (evidence: `src/App.tsx`)
- App router → Photosynthesis lab: routes to (evidence: `src/App.tsx`)
- App router → Titration lab: routes to (evidence: `src/App.tsx`)
- App router → Notebook workbench: routes to (evidence: `src/App.tsx`)
- App router → Teacher dashboard: routes to (evidence: `src/App.tsx`)
- App router → Challenge hub: routes to (evidence: `src/App.tsx`)
- App router → Offline sync panel: routes to (evidence: `src/App.tsx`)
- App router → Local storage service: loads profile (evidence: `src/App.tsx`)
- App router → Translations: translates (evidence: `src/App.tsx`)
- Navigation sidebar → Experiment definitions: reads definitions (evidence: `src/components/layout/Sidebar.tsx`)
- Language and header → Translations: translates (evidence: `src/components/layout/Header.tsx`)
- Pendulum lab → Experiment theory view: renders (evidence: `src/components/experiments/PendulumLab.tsx`)
- Pendulum lab → Live step narration: renders (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Experiment theory view: renders (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Ohm's law lab → Live step narration: renders (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Experiment theory view: renders (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Photosynthesis lab → Live step narration: renders (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Experiment theory view: renders (evidence: `src/components/experiments/TitrationLab.tsx`)
- Titration lab → Live step narration: renders (evidence: `src/components/experiments/TitrationLab.tsx`)
- Experiment theory view → Theory content: reads content (evidence: `src/components/common/ExperimentTheoryView.tsx`)
- Live step narration → Step guide content: reads guide (evidence: `src/components/common/LiveStepNarrationCard.tsx`)
- Live step narration → Speech services: speaks guide (evidence: `src/components/common/LiveStepNarrationCard.tsx`)
- Pendulum lab → Audio guide content: loads audio guide (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Audio guide content: loads audio guide (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Audio guide content: loads audio guide (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Audio guide content: loads audio guide (evidence: `src/components/experiments/TitrationLab.tsx`)
- Pendulum lab → Speech services: uses speech (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Speech services: uses speech (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Speech services: uses speech (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Speech services: uses speech (evidence: `src/components/experiments/TitrationLab.tsx`)
- Pendulum lab → Translations: translates (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Translations: translates (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Translations: translates (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Translations: translates (evidence: `src/components/experiments/TitrationLab.tsx`)
- Notebook workbench → Local storage service: reads and writes (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- Notebook workbench → Speech services: uses speech (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- Notebook workbench → PDF report generator: generates report (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- PDF report generator → Translations: translates report (evidence: `src/services/pdfReport.ts`)
- Offline sync panel → Local storage service: uses local data (evidence: `src/components/sync/OfflineSyncPanel.tsx`)
- Offline sync panel → Translations: translates (evidence: `src/components/sync/OfflineSyncPanel.tsx`)
- Challenge hub → Local storage service: updates profile (evidence: `src/components/gamification/ChallengeHub.tsx`)
- Challenge hub → Speech services: uses speech (evidence: `src/components/gamification/ChallengeHub.tsx`)
- Teacher dashboard → Local storage service: loads class data (evidence: `src/components/teacher/TeacherDashboard.tsx`)
- Teacher dashboard → Translations: translates (evidence: `src/components/teacher/TeacherDashboard.tsx`)
