# snighdha2007sonay-glitch/prayogshala architecture

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

- Interactive diagram: https://gitdiagram.com/snighdha2007sonay-glitch/prayogshala
- Repository: https://github.com/snighdha2007sonay-glitch/prayogshala

## Overview

PrayogShala is an offline-first virtual science lab. The main workflow is choosing an experiment, using an interactive lab with theory and step-by-step guidance, recording observations in a notebook, and exporting a report. Separate areas support teacher assignments and class analytics, challenges and badges, and offline data management. The graph reflects the available excerpts and SOURCE INDEX references; some unsampled component connections are therefore omitted rather than inferred.

Main entry points: [`src/App.tsx`](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/App.tsx) (Application shell), [`src/components/common/LiveStepNarrationCard.tsx`](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/common/LiveStepNarrationCard.tsx) (Step narration), [`src/components/notebook/NotebookWorkbench.tsx`](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/notebook/NotebookWorkbench.tsx) (Observation notebook), [`src/components/common/ExperimentTheoryView.tsx`](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/common/ExperimentTheoryView.tsx) (Experiment theory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App shell"]
  node_app["Application shell<br/>[App.tsx]"]
  node_navigation["Navigation<br/>[Sidebar.tsx]"]
  node_header["Header controls<br/>[Header.tsx]"]
  node_navbar["Navigation bar<br/>[Navbar.tsx]"]
end

subgraph group_labs["Experiment learning"]
  node_pendulum["Pendulum lab<br/>[PendulumLab.tsx]"]
  node_ohms["Ohm's law lab<br/>[OhmsLawLab.tsx]"]
  node_photosynthesis["Photosynthesis lab"]
  node_titration["Titration lab<br/>[TitrationLab.tsx]"]
  node_theory["Experiment theory"]
  node_theorydata["Theory content"]
  node_stepnarration["Step narration"]
  node_stepguides["Step guide content<br/>[liveStepGuides.ts]"]
  node_audioguides["Audio guide content<br/>[audioGuides.ts]"]
  node_experimentdata["Experiment catalog<br/>[experiments.ts]"]
end

subgraph group_records["Lab records"]
  node_notebook["Observation notebook"]
  node_storage[("Local data storage<br/>[storage.ts]")]
  node_pdf["PDF report generator<br/>[pdfReport.ts]"]
end

subgraph group_classroom["Classroom tools"]
  node_teacher["Teacher dashboard"]
  node_challenges["Challenges and badges<br/>[ChallengeHub.tsx]"]
  node_sync["Offline sync panel"]
end

subgraph group_shared["Shared capabilities"]
  node_i18n["Translations<br/>[i18n.ts]"]
  node_speech["Speech services<br/>[speech.ts]"]
end

node_learner(("Learner"))

node_learner -->|"uses"| node_app
node_app -->|"renders"| node_navigation
node_app -->|"renders"| node_header
node_app -->|"routes to"| node_pendulum
node_app -->|"routes to"| node_ohms
node_app -->|"routes to"| node_photosynthesis
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_navigation -->|"reads catalog"| node_experimentdata
node_pendulum -->|"renders"| node_theory
node_ohms -->|"renders"| node_theory
node_photosynthesis -->|"renders"| node_theory
node_titration -->|"renders"| node_theory
node_pendulum -->|"renders"| node_stepnarration
node_ohms -->|"renders"| node_stepnarration
node_photosynthesis -->|"renders"| node_stepnarration
node_titration -->|"renders"| node_stepnarration
node_theory -->|"reads content"| node_theorydata
node_stepnarration -->|"reads guides"| node_stepguides
node_stepnarration -->|"speaks guidance"| node_speech
node_pendulum -->|"reads guide"| node_audioguides
node_ohms -->|"reads guide"| node_audioguides
node_photosynthesis -->|"reads guide"| node_audioguides
node_titration -->|"reads guide"| node_audioguides
node_notebook -->|"loads records"| node_storage
node_notebook -->|"generates report"| node_pdf
node_notebook -->|"uses speech"| node_speech
node_teacher -->|"loads assignments"| node_storage
node_challenges -->|"updates rewards"| node_storage
node_sync -->|"manages offline data"| node_storage
node_app -->|"loads profile"| node_storage
node_app -->|"translates interface"| node_i18n
node_navbar -->|"translates labels"| node_i18n
node_header -->|"translates labels"| node_i18n
node_notebook -->|"translates labels"| node_i18n
node_pdf -->|"translates report"| node_i18n

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

## Components

### App shell

- [Application shell](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/App.tsx): `src/App.tsx`
- [Navigation](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/layout/Sidebar.tsx): `src/components/layout/Sidebar.tsx`
- [Header controls](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/layout/Header.tsx): `src/components/layout/Header.tsx`
- [Navigation bar](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/layout/Navbar.tsx): `src/components/layout/Navbar.tsx`

### Experiment learning

- [Pendulum lab](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/experiments/PendulumLab.tsx): `src/components/experiments/PendulumLab.tsx`
- [Ohm's law lab](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/experiments/OhmsLawLab.tsx): `src/components/experiments/OhmsLawLab.tsx`
- [Photosynthesis lab](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/experiments/PhotosynthesisLab.tsx): `src/components/experiments/PhotosynthesisLab.tsx`
- [Titration lab](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/experiments/TitrationLab.tsx): `src/components/experiments/TitrationLab.tsx`
- [Experiment theory](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/common/ExperimentTheoryView.tsx): `src/components/common/ExperimentTheoryView.tsx`
- [Theory content](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/data/experimentTheory.ts): `src/data/experimentTheory.ts`
- [Step narration](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/common/LiveStepNarrationCard.tsx): `src/components/common/LiveStepNarrationCard.tsx`
- [Step guide content](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/data/liveStepGuides.ts): `src/data/liveStepGuides.ts`
- [Audio guide content](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/data/audioGuides.ts): `src/data/audioGuides.ts`
- [Experiment catalog](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/data/experiments.ts): `src/data/experiments.ts`

### Lab records

- [Observation notebook](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/notebook/NotebookWorkbench.tsx): `src/components/notebook/NotebookWorkbench.tsx`
- [Local data storage](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/services/storage.ts): `src/services/storage.ts`
- [PDF report generator](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/services/pdfReport.ts): `src/services/pdfReport.ts`

### Classroom tools

- [Teacher dashboard](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/teacher/TeacherDashboard.tsx): `src/components/teacher/TeacherDashboard.tsx`
- [Challenges and badges](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/gamification/ChallengeHub.tsx): `src/components/gamification/ChallengeHub.tsx`
- [Offline sync panel](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/components/sync/OfflineSyncPanel.tsx): `src/components/sync/OfflineSyncPanel.tsx`

### Shared capabilities

- [Translations](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/services/i18n.ts): `src/services/i18n.ts`
- [Speech services](https://github.com/snighdha2007sonay-glitch/prayogshala/blob/main/src/services/speech.ts): `src/services/speech.ts`

### Other components

- **Learner**

## Connections

- Learner → Application shell: uses
- Application shell → Navigation: renders (evidence: `src/App.tsx`)
- Application shell → Header controls: renders (evidence: `src/App.tsx`)
- Application shell → Pendulum lab: routes to (evidence: `src/App.tsx`)
- Application shell → Ohm's law lab: routes to (evidence: `src/App.tsx`)
- Application shell → Photosynthesis lab: routes to (evidence: `src/App.tsx`)
- Application shell → Titration lab: routes to (evidence: `src/App.tsx`)
- Application shell → Observation notebook: routes to (evidence: `src/App.tsx`)
- Application shell → Teacher dashboard: routes to (evidence: `src/App.tsx`)
- Application shell → Challenges and badges: routes to (evidence: `src/App.tsx`)
- Application shell → Offline sync panel: routes to (evidence: `src/App.tsx`)
- Navigation → Experiment catalog: reads catalog (evidence: `src/components/layout/Sidebar.tsx`)
- Pendulum lab → Experiment theory: renders (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Experiment theory: renders (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Experiment theory: renders (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Experiment theory: renders (evidence: `src/components/experiments/TitrationLab.tsx`)
- Pendulum lab → Step narration: renders (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Step narration: renders (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Step narration: renders (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Step narration: renders (evidence: `src/components/experiments/TitrationLab.tsx`)
- Experiment theory → Theory content: reads content (evidence: `src/components/common/ExperimentTheoryView.tsx`)
- Step narration → Step guide content: reads guides (evidence: `src/components/common/LiveStepNarrationCard.tsx`)
- Step narration → Speech services: speaks guidance (evidence: `src/components/common/LiveStepNarrationCard.tsx`)
- Pendulum lab → Audio guide content: reads guide (evidence: `src/components/experiments/PendulumLab.tsx`)
- Ohm's law lab → Audio guide content: reads guide (evidence: `src/components/experiments/OhmsLawLab.tsx`)
- Photosynthesis lab → Audio guide content: reads guide (evidence: `src/components/experiments/PhotosynthesisLab.tsx`)
- Titration lab → Audio guide content: reads guide (evidence: `src/components/experiments/TitrationLab.tsx`)
- Observation notebook → Local data storage: loads records (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- Observation notebook → PDF report generator: generates report (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- Observation notebook → Speech services: uses speech (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- Teacher dashboard → Local data storage: loads assignments (evidence: `src/components/teacher/TeacherDashboard.tsx`)
- Challenges and badges → Local data storage: updates rewards (evidence: `src/components/gamification/ChallengeHub.tsx`)
- Offline sync panel → Local data storage: manages offline data (evidence: `src/components/sync/OfflineSyncPanel.tsx`)
- Application shell → Local data storage: loads profile (evidence: `src/App.tsx`)
- Application shell → Translations: translates interface (evidence: `src/App.tsx`)
- Navigation bar → Translations: translates labels (evidence: `src/components/layout/Navbar.tsx`)
- Header controls → Translations: translates labels (evidence: `src/components/layout/Header.tsx`)
- Observation notebook → Translations: translates labels (evidence: `src/components/notebook/NotebookWorkbench.tsx`)
- PDF report generator → Translations: translates report (evidence: `src/services/pdfReport.ts`)
