# rachitmalik-byte/verson2-kidos architecture

> Architecture diagram of the GitHub repository rachitmalik-byte/verson2-kidos, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rachitmalik-byte/verson2-kidos
- Repository: https://github.com/rachitmalik-byte/verson2-kidos

## Overview

PolyQuest Academy is an interactive STEM learning platform for students, with separate teacher and parent portals. Students enter through role and subject selection, explore chapter hubs and themed missions, and learn through simulations, quizzes, discovery tracking, and Pip’s AI/voice features. The map also preserves documented guidebook, video, arcade, and educator capabilities. Relationships are limited to routes, imports, and calls visible in the provided excerpts or SOURCE INDEX; unsampled subsystems are shown without speculative connections.

Main entry points: [`src/App.tsx`](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/App.tsx) (App Router), [`src/components/pip/Pip.tsx`](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/pip/Pip.tsx) (Pip Companion), [`src/features/missions/universal-mission/DynamicMissionEngine.tsx`](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/missions/universal-mission/DynamicMissionEngine.tsx) (Mission Engine), [`src/features/theme1/SuperSensesMissionEngine.tsx`](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme1/SuperSensesMissionEngine.tsx) (Super Senses)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App Navigation"]
  node_app["App Router<br/>[App.tsx]"]
  node_role["Role Selection<br/>[RoleSelection.tsx]"]
  node_subjects["Subject Selection"]
end

subgraph group_learning["Student Learning"]
  node_chapterhub["Chapter Hub<br/>[ChapterHub.tsx]"]
  node_curriculum["Master Curriculum"]
  node_dynamic["Mission Engine"]
  node_raincoat["Raincoat Mission"]
  node_senses["Super Senses"]
  node_shelter["Shelter Missions"]
  node_water["Water Missions"]
  node_progress["Learning Progress<br/>[progressStore.ts]"]
  node_discovery["Discovery Journal<br/>[discoveryStore.ts]"]
  node_guidebook["Digital Guidebook"]
  node_video["Video Lab<br/>[VideoLabPage.tsx]"]
end

subgraph group_labs["Interactive Science"]
  node_activity["Activity Renderer"]
  node_diagram["Diagram Engine"]
  node_microscope["Microscope Studio"]
  node_voxel["Voxel Engine<br/>[VoxelEngine.ts]"]
  node_arcade["Science Arcade"]
end

subgraph group_companion["Pip and Audio"]
  node_pip["Pip Companion<br/>[Pip.tsx]"]
  node_speech["Read Aloud Coach"]
  node_voice["Voice Assistant<br/>[voiceAssistant.ts]"]
  node_ai["AI Service<br/>[aiService.ts]"]
end

subgraph group_portals["Learning Portals"]
  node_teacher["Teacher Studio<br/>[TeacherStudio.tsx]"]
  node_parent["Parent Dashboard"]
end

node_student(("Student"))

node_student -->|"opens"| node_app
node_app -->|"routes to"| node_role
node_app -->|"routes to"| node_subjects
node_app -->|"routes to"| node_chapterhub
node_app -->|"routes to"| node_dynamic
node_app -->|"routes to"| node_senses
node_app -->|"routes to"| node_shelter
node_app -->|"routes to"| node_water
node_app -->|"routes to"| node_teacher
node_role -.->|"selects subject"| node_subjects
node_chapterhub -.->|"uses curriculum"| node_curriculum
node_dynamic -->|"updates progress"| node_progress
node_dynamic -->|"records discoveries"| node_discovery
node_dynamic -->|"renders companion"| node_pip
node_senses -->|"records discoveries"| node_discovery
node_senses -->|"renders companion"| node_pip
node_senses -.->|"renders studio"| node_microscope
node_shelter -->|"renders studio"| node_microscope
node_shelter -->|"renders companion"| node_pip
node_water -->|"renders simulator"| node_diagram
node_water -->|"renders diorama"| node_voxel
node_activity -.->|"renders activity"| node_diagram
node_activity -.->|"renders activity"| node_microscope
node_pip -->|"reads state"| node_progress
node_pip -->|"uses voice"| node_voice
node_speech -->|"uses voice"| node_voice
node_voice -.->|"AI coaching"| node_ai
node_teacher -->|"renders activities"| node_activity
node_teacher -->|"creates lessons"| node_ai
node_student -.->|"consults guidebook"| node_guidebook
node_student -.->|"explores video labs"| node_video
node_student -.->|"plays science games"| node_arcade
node_student -.->|"guardian oversight"| node_parent

click node_app "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/App.tsx"
click node_role "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/role-selection/RoleSelection.tsx"
click node_subjects "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/subject-selection/SubjectSelection.tsx"
click node_chapterhub "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/chapter-hub/ChapterHub.tsx"
click node_curriculum "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/data/masterCurriculum.ts"
click node_dynamic "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/missions/universal-mission/DynamicMissionEngine.tsx"
click node_raincoat "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/missions/mission-01-raincoat/RaincoatMission.tsx"
click node_senses "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme1/SuperSensesMissionEngine.tsx"
click node_shelter "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme-shelter/ShelterMissionEngine.tsx"
click node_water "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme-water/WaterMissionEngine.tsx"
click node_progress "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/stores/progressStore.ts"
click node_discovery "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/stores/discoveryStore.ts"
click node_activity "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/engine/ActivityRenderer.tsx"
click node_diagram "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/engine/InteractiveDiagramEngine.tsx"
click node_microscope "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/microscope/MultiTierMicroscopeStudio.tsx"
click node_voxel "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/voxel/VoxelEngine.ts"
click node_pip "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/pip/Pip.tsx"
click node_speech "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/voice/SpeechReadAloudCoach.tsx"
click node_voice "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/lib/voiceAssistant.ts"
click node_ai "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/services/aiService.ts"
click node_teacher "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/teacher-studio/TeacherStudio.tsx"
click node_parent "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/parent/ParentDashboard.tsx"
click node_guidebook "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/guidebook/DigitalGuidebook.tsx"
click node_video "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/video-lab/VideoLabPage.tsx"
click node_arcade "https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/arcade/ScienceArcadeModal.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_role,node_subjects toneBlue
class node_chapterhub,node_curriculum,node_dynamic,node_raincoat,node_senses,node_shelter,node_water,node_progress,node_discovery,node_guidebook,node_video toneAmber
class node_activity,node_diagram,node_microscope,node_voxel,node_arcade toneMint
class node_pip,node_speech,node_voice,node_ai toneRose
class node_teacher,node_parent,node_student toneIndigo
```

## Components

### App Navigation

- [App Router](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/App.tsx): `src/App.tsx`
- [Role Selection](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/role-selection/RoleSelection.tsx): `src/features/role-selection/RoleSelection.tsx`
- [Subject Selection](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/subject-selection/SubjectSelection.tsx): `src/features/subject-selection/SubjectSelection.tsx`

### Student Learning

- [Chapter Hub](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/chapter-hub/ChapterHub.tsx): `src/features/chapter-hub/ChapterHub.tsx`
- [Master Curriculum](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/data/masterCurriculum.ts): `src/data/masterCurriculum.ts`
- [Mission Engine](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/missions/universal-mission/DynamicMissionEngine.tsx): `src/features/missions/universal-mission/DynamicMissionEngine.tsx`
- [Raincoat Mission](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/missions/mission-01-raincoat/RaincoatMission.tsx): `src/features/missions/mission-01-raincoat/RaincoatMission.tsx`
- [Super Senses](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme1/SuperSensesMissionEngine.tsx): `src/features/theme1/SuperSensesMissionEngine.tsx`
- [Shelter Missions](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme-shelter/ShelterMissionEngine.tsx): `src/features/theme-shelter/ShelterMissionEngine.tsx`
- [Water Missions](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/theme-water/WaterMissionEngine.tsx): `src/features/theme-water/WaterMissionEngine.tsx`
- [Learning Progress](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/stores/progressStore.ts): `src/stores/progressStore.ts`
- [Discovery Journal](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/stores/discoveryStore.ts): `src/stores/discoveryStore.ts`
- [Digital Guidebook](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/guidebook/DigitalGuidebook.tsx): `src/features/guidebook/DigitalGuidebook.tsx`
- [Video Lab](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/video-lab/VideoLabPage.tsx): `src/features/video-lab/VideoLabPage.tsx`

### Interactive Science

- [Activity Renderer](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/engine/ActivityRenderer.tsx): `src/components/engine/ActivityRenderer.tsx`
- [Diagram Engine](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/engine/InteractiveDiagramEngine.tsx): `src/components/engine/InteractiveDiagramEngine.tsx`
- [Microscope Studio](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/microscope/MultiTierMicroscopeStudio.tsx): `src/components/microscope/MultiTierMicroscopeStudio.tsx`
- [Voxel Engine](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/voxel/VoxelEngine.ts): `src/components/voxel/VoxelEngine.ts`
- [Science Arcade](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/arcade/ScienceArcadeModal.tsx): `src/features/arcade/ScienceArcadeModal.tsx`

### Pip and Audio

- [Pip Companion](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/pip/Pip.tsx): `src/components/pip/Pip.tsx`
- [Read Aloud Coach](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/components/voice/SpeechReadAloudCoach.tsx): `src/components/voice/SpeechReadAloudCoach.tsx`
- [Voice Assistant](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/lib/voiceAssistant.ts): `src/lib/voiceAssistant.ts`
- [AI Service](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/services/aiService.ts): `src/services/aiService.ts`

### Learning Portals

- [Teacher Studio](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/teacher-studio/TeacherStudio.tsx): `src/features/teacher-studio/TeacherStudio.tsx`
- [Parent Dashboard](https://github.com/rachitmalik-byte/verson2-kidos/blob/main/src/features/parent/ParentDashboard.tsx): `src/features/parent/ParentDashboard.tsx`

### Other components

- **Student**

## Connections

- Student → App Router: opens (evidence: `src/App.tsx`)
- App Router → Role Selection: routes to (evidence: `src/App.tsx`)
- App Router → Subject Selection: routes to (evidence: `src/App.tsx`)
- App Router → Chapter Hub: routes to (evidence: `src/App.tsx`)
- App Router → Mission Engine: routes to (evidence: `src/App.tsx`)
- App Router → Super Senses: routes to (evidence: `src/App.tsx`)
- App Router → Shelter Missions: routes to (evidence: `src/App.tsx`)
- App Router → Water Missions: routes to (evidence: `src/App.tsx`)
- App Router → Teacher Studio: routes to (evidence: `src/App.tsx`)
- Role Selection → Subject Selection: selects subject
- Chapter Hub → Master Curriculum: uses curriculum
- Mission Engine → Learning Progress: updates progress (evidence: `src/features/missions/universal-mission/DynamicMissionEngine.tsx`)
- Mission Engine → Discovery Journal: records discoveries (evidence: `src/features/missions/universal-mission/DynamicMissionEngine.tsx`)
- Mission Engine → Pip Companion: renders companion (evidence: `src/features/missions/universal-mission/DynamicMissionEngine.tsx`)
- Super Senses → Discovery Journal: records discoveries (evidence: `src/features/theme1/SuperSensesMissionEngine.tsx`)
- Super Senses → Pip Companion: renders companion (evidence: `src/features/theme1/SuperSensesMissionEngine.tsx`)
- Super Senses → Microscope Studio: renders studio (evidence: `src/features/theme1/SuperSensesMissionEngine.tsx`)
- Shelter Missions → Microscope Studio: renders studio (evidence: `src/features/theme-shelter/ShelterMissionEngine.tsx`)
- Shelter Missions → Pip Companion: renders companion (evidence: `src/features/theme-shelter/ShelterMissionEngine.tsx`)
- Water Missions → Diagram Engine: renders simulator (evidence: `src/features/theme-water/WaterMissionEngine.tsx`)
- Water Missions → Voxel Engine: renders diorama (evidence: `src/features/theme-water/WaterMissionEngine.tsx`)
- Activity Renderer → Diagram Engine: renders activity
- Activity Renderer → Microscope Studio: renders activity
- Pip Companion → Learning Progress: reads state (evidence: `src/components/pip/Pip.tsx`)
- Pip Companion → Voice Assistant: uses voice (evidence: `src/components/pip/Pip.tsx`)
- Read Aloud Coach → Voice Assistant: uses voice (evidence: `src/components/voice/SpeechReadAloudCoach.tsx`)
- Voice Assistant → AI Service: AI coaching
- Teacher Studio → Activity Renderer: renders activities (evidence: `src/features/teacher-studio/TeacherStudio.tsx`)
- Teacher Studio → AI Service: creates lessons (evidence: `src/features/teacher-studio/TeacherStudio.tsx`)
- Student → Digital Guidebook: consults guidebook (evidence: `README.md`)
- Student → Video Lab: explores video labs (evidence: `README.md`)
- Student → Science Arcade: plays science games (evidence: `README.md`)
- Student → Parent Dashboard: guardian oversight (evidence: `README.md`)
