# mahmoud2001858833/galaxy-knowledge-hub architecture

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

- Interactive diagram: https://gitdiagram.com/mahmoud2001858833/galaxy-knowledge-hub
- Repository: https://github.com/mahmoud2001858833/galaxy-knowledge-hub

## Overview

Zarwat Al-Ilm is a broad interactive education platform, with subject learning, simulations, AI-assisted study and exam creation, and accessibility features. The main visible entry flow is the React app’s routed home page, which presents the learning ecosystem; learners can also reach subject and simulation experiences through the app’s routes. Sampled evidence shows the app shell, accessibility settings, curriculum-aware exam synthesis, and Supabase integration. The tree documents further capabilities, but their detailed runtime connections were not sampled, so those links are omitted.

Main entry points: [`src/App.tsx`](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/App.tsx) (Router and app shell), [`src/contexts/AccessibilityContext.tsx`](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/contexts/AccessibilityContext.tsx) (Accessibility settings), [`src/integrations/supabase/client.ts`](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/integrations/supabase/client.ts) (Supabase client), [`src/services/aiExamService.ts`](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/aiExamService.ts) (AI exam service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["App shell"]
  node_app["Router and app shell<br/>[App.tsx]"]
  node_home["Home and platform tour<br/>[Index.tsx]"]
  node_platform_guide["Platform guide assistant"]
end

subgraph group_learning["Learning experiences"]
  node_science_subjects["Science and math subjects"]
  node_simulations["Interactive simulations"]
  node_simulation_challenges["Lab challenges"]
  node_focus_audio["Focus sound engine"]
end

subgraph group_exams["Exam creation"]
  node_exam_ui["Exam creation interface"]
  node_exam_service["AI exam service<br/>[aiExamService.ts]"]
  node_document_synthesis["Document exam synthesis"]
  node_curriculum["Jordanian curriculum corpus"]
end

subgraph group_access["Accessibility"]
  node_accessibility["Accessibility settings"]
  node_access_panel["Accessibility controls"]
end

subgraph group_services["Platform services"]
  node_supabase_client["Supabase client<br/>[client.ts]"]
  node_supabase[("Supabase backend")]
  node_file_parser["Document parsing"]
end

node_learner(("Learner"))

node_learner -.->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"renders"| node_platform_guide
node_app -->|"provides context"| node_accessibility
node_access_panel -->|"reads settings"| node_accessibility
node_accessibility -->|"loads user settings"| node_supabase_client
node_supabase_client -->|"connects"| node_supabase
node_home -.->|"presents platform"| node_learner
node_science_subjects -.->|"teaches subjects"| node_learner
node_simulations -.->|"includes challenges"| node_simulation_challenges
node_exam_service -->|"uses synthesis"| node_document_synthesis
node_document_synthesis -->|"matches curriculum"| node_curriculum
node_exam_service -->|"uses backend"| node_supabase_client
node_file_parser -->|"enriches from"| node_curriculum

click node_app "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/App.tsx"
click node_home "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/pages/Index.tsx"
click node_platform_guide "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/PlatformGuideAssistant.tsx"
click node_accessibility "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/contexts/AccessibilityContext.tsx"
click node_access_panel "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/accessibility/AccessibilityPanel.tsx"
click node_science_subjects "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/tree/main/src/pages"
click node_simulations "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/pages/MechanicalEngineeringSimulation.tsx"
click node_simulation_challenges "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/simulations/LabChallengeEngine.tsx"
click node_focus_audio "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/spacedRepetition/FocusSoundEngine.tsx"
click node_exam_ui "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/exam-creator/ExamCreatorWizard.tsx"
click node_exam_service "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/aiExamService.ts"
click node_document_synthesis "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/documentExamSynthesisEngine.ts"
click node_curriculum "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/jordanianCurriculumCorpus.ts"
click node_supabase_client "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/integrations/supabase/client.ts"
click node_file_parser "https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/fileParserService.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,node_platform_guide toneBlue
class node_science_subjects,node_simulations,node_simulation_challenges,node_focus_audio toneAmber
class node_exam_ui,node_exam_service,node_document_synthesis,node_curriculum toneMint
class node_accessibility,node_access_panel toneRose
class node_supabase_client,node_supabase,node_file_parser,node_learner toneIndigo
```

## Components

### App shell

- [Router and app shell](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/App.tsx): `src/App.tsx`
- [Home and platform tour](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/pages/Index.tsx): `src/pages/Index.tsx`
- [Platform guide assistant](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/PlatformGuideAssistant.tsx): `src/components/PlatformGuideAssistant.tsx`

### Learning experiences

- [Science and math subjects](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/tree/main/src/pages): `src/pages`
- [Interactive simulations](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/pages/MechanicalEngineeringSimulation.tsx): `src/pages/MechanicalEngineeringSimulation.tsx`
- [Lab challenges](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/simulations/LabChallengeEngine.tsx): `src/components/simulations/LabChallengeEngine.tsx`
- [Focus sound engine](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/spacedRepetition/FocusSoundEngine.tsx): `src/components/spacedRepetition/FocusSoundEngine.tsx`

### Exam creation

- [Exam creation interface](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/exam-creator/ExamCreatorWizard.tsx): `src/components/exam-creator/ExamCreatorWizard.tsx`
- [AI exam service](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/aiExamService.ts): `src/services/aiExamService.ts`
- [Document exam synthesis](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/documentExamSynthesisEngine.ts): `src/services/documentExamSynthesisEngine.ts`
- [Jordanian curriculum corpus](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/jordanianCurriculumCorpus.ts): `src/services/jordanianCurriculumCorpus.ts`

### Accessibility

- [Accessibility settings](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/contexts/AccessibilityContext.tsx): `src/contexts/AccessibilityContext.tsx`
- [Accessibility controls](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/components/accessibility/AccessibilityPanel.tsx): `src/components/accessibility/AccessibilityPanel.tsx`

### Platform services

- [Supabase client](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/integrations/supabase/client.ts): `src/integrations/supabase/client.ts`
- **Supabase backend**
- [Document parsing](https://github.com/mahmoud2001858833/galaxy-knowledge-hub/blob/main/src/services/fileParserService.ts): `src/services/fileParserService.ts`

### Other components

- **Learner**

## Connections

- Learner → Router and app shell: uses
- Router and app shell → Home and platform tour: routes to (evidence: `src/App.tsx`)
- Router and app shell → Platform guide assistant: renders (evidence: `src/App.tsx`)
- Router and app shell → Accessibility settings: provides context (evidence: `src/App.tsx`)
- Accessibility controls → Accessibility settings: reads settings (evidence: `src/components/accessibility/AccessibilityPanel.tsx`)
- Accessibility settings → Supabase client: loads user settings (evidence: `src/contexts/AccessibilityContext.tsx`)
- Supabase client → Supabase backend: connects (evidence: `src/integrations/supabase/client.ts`)
- Home and platform tour → Learner: presents platform
- Science and math subjects → Learner: teaches subjects
- Interactive simulations → Lab challenges: includes challenges
- AI exam service → Document exam synthesis: uses synthesis (evidence: `src/services/aiExamService.ts`)
- Document exam synthesis → Jordanian curriculum corpus: matches curriculum (evidence: `src/services/documentExamSynthesisEngine.ts`)
- AI exam service → Supabase client: uses backend (evidence: `src/services/aiExamService.ts`)
- Document parsing → Jordanian curriculum corpus: enriches from (evidence: `src/services/fileParserService.ts`)
