# liamnew/sciencesparkp1 architecture

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

- Interactive diagram: https://gitdiagram.com/liamnew/sciencesparkp1
- Repository: https://github.com/liamnew/sciencesparkp1

## Overview

ScienceSpark is a NSW Years 7–10 science learning app. Its main student workflow is to enter the authenticated app, explore syllabus topics, learn with an AI tutor or quizzes, and review progress; it also recommends learning resources. The README documents these capabilities, but most feature-page source was not sampled, so feature wiring is shown only where supported by the tree or excerpts. The syllabus hook’s read and the update function’s seed operations are visible in the sampled source.

Main entry points: [`src/App.jsx`](https://github.com/liamnew/sciencesparkp1/blob/main/src/App.jsx) (App routes), [`src/pages/Quizzes.jsx`](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Quizzes.jsx) (Quiz experience), [`src/pages/Topics.jsx`](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Topics.jsx) (Topic browser), [`src/pages/Chat.jsx`](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Chat.jsx) (AI tutor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_app["App routes<br/>[App.jsx]"]
  node_auth["Authentication<br/>[AuthContext.jsx]"]
  node_onboarding["Onboarding gate<br/>[OnboardingGate.jsx]"]
end

subgraph group_learning["Learning experience"]
  node_home["Home and topics<br/>[Home.jsx]"]
  node_topics["Topic browser<br/>[Topics.jsx]"]
  node_tutor["AI tutor<br/>[Chat.jsx]"]
  node_quiz["Quiz experience<br/>[Quizzes.jsx]"]
  node_quizcreate["Quiz creator<br/>[QuizCreator.jsx]"]
  node_quiztake["Quiz taker<br/>[QuizTaker.jsx]"]
  node_quizresults["Quiz results<br/>[QuizResults.jsx]"]
  node_resources["Resource recommendations"]
end

subgraph group_tracking["Curriculum and progress"]
  node_progress["Progress view<br/>[Progress.jsx]"]
  node_dashboard["Outcomes dashboard"]
  node_syllabus["Syllabus data hook<br/>[useSyllabus.js]"]
  node_seed["Syllabus updater<br/>[entry.ts]"]
end

subgraph group_services["Backend services"]
  node_client["Base44 client<br/>[base44Client.js]"]
  node_integrations["Backend integrations<br/>[integrations.js]"]
end

node_student(("Student"))
node_base44{{"Base44 platform"}}
node_records[("Syllabus records")]

node_student -->|"opens"| node_app
node_app -->|"checks session"| node_auth
node_app -->|"gates access"| node_onboarding
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_topics
node_app -->|"routes to"| node_tutor
node_app -->|"routes to"| node_quiz
node_app -->|"routes to"| node_progress
node_quiz -->|"offers creation"| node_quizcreate
node_quiz -->|"offers quiz"| node_quiztake
node_quiz -->|"shows results"| node_quizresults
node_topics -->|"loads curriculum"| node_syllabus
node_progress -->|"presents outcomes"| node_dashboard
node_syllabus -->|"queries through"| node_client
node_client -->|"calls"| node_base44
node_base44 -->|"reads syllabus"| node_records
node_seed -->|"creates and deletes"| node_base44
node_base44 -->|"stores syllabus"| node_records
node_tutor -.->|"uses AI services"| node_integrations
node_resources -.->|"uses curation services"| node_integrations

click node_app "https://github.com/liamnew/sciencesparkp1/blob/main/src/App.jsx"
click node_auth "https://github.com/liamnew/sciencesparkp1/blob/main/src/lib/AuthContext.jsx"
click node_onboarding "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/onboarding/OnboardingGate.jsx"
click node_home "https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Home.jsx"
click node_topics "https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Topics.jsx"
click node_tutor "https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Chat.jsx"
click node_quiz "https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Quizzes.jsx"
click node_quizcreate "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizCreator.jsx"
click node_quiztake "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizTaker.jsx"
click node_quizresults "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizResults.jsx"
click node_resources "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/learning/ResourceRecommender.jsx"
click node_progress "https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Progress.jsx"
click node_dashboard "https://github.com/liamnew/sciencesparkp1/blob/main/src/components/dashboard/OutcomesDashboard.jsx"
click node_syllabus "https://github.com/liamnew/sciencesparkp1/blob/main/src/hooks/useSyllabus.js"
click node_seed "https://github.com/liamnew/sciencesparkp1/blob/main/base44/functions/updateSyllabus/entry.ts"
click node_client "https://github.com/liamnew/sciencesparkp1/blob/main/src/api/base44Client.js"
click node_integrations "https://github.com/liamnew/sciencesparkp1/blob/main/src/api/integrations.js"

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_auth,node_onboarding toneBlue
class node_home,node_topics,node_tutor,node_quiz,node_quizcreate,node_quiztake,node_quizresults,node_resources,node_records toneAmber
class node_progress,node_dashboard,node_syllabus,node_seed toneMint
class node_client,node_integrations toneRose
class node_student,node_base44 toneIndigo
```

## Components

### App and access

- [App routes](https://github.com/liamnew/sciencesparkp1/blob/main/src/App.jsx): `src/App.jsx`
- [Authentication](https://github.com/liamnew/sciencesparkp1/blob/main/src/lib/AuthContext.jsx): `src/lib/AuthContext.jsx`
- [Onboarding gate](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/onboarding/OnboardingGate.jsx): `src/components/onboarding/OnboardingGate.jsx`

### Learning experience

- [Home and topics](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Topic browser](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Topics.jsx): `src/pages/Topics.jsx`
- [AI tutor](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Chat.jsx): `src/pages/Chat.jsx`
- [Quiz experience](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Quizzes.jsx): `src/pages/Quizzes.jsx`
- [Quiz creator](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizCreator.jsx): `src/components/quiz/QuizCreator.jsx`
- [Quiz taker](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizTaker.jsx): `src/components/quiz/QuizTaker.jsx`
- [Quiz results](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/quiz/QuizResults.jsx): `src/components/quiz/QuizResults.jsx`
- [Resource recommendations](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/learning/ResourceRecommender.jsx): `src/components/learning/ResourceRecommender.jsx`

### Curriculum and progress

- [Progress view](https://github.com/liamnew/sciencesparkp1/blob/main/src/pages/Progress.jsx): `src/pages/Progress.jsx`
- [Outcomes dashboard](https://github.com/liamnew/sciencesparkp1/blob/main/src/components/dashboard/OutcomesDashboard.jsx): `src/components/dashboard/OutcomesDashboard.jsx`
- [Syllabus data hook](https://github.com/liamnew/sciencesparkp1/blob/main/src/hooks/useSyllabus.js): `src/hooks/useSyllabus.js`
- [Syllabus updater](https://github.com/liamnew/sciencesparkp1/blob/main/base44/functions/updateSyllabus/entry.ts): `base44/functions/updateSyllabus/entry.ts`

### Backend services

- [Base44 client](https://github.com/liamnew/sciencesparkp1/blob/main/src/api/base44Client.js): `src/api/base44Client.js`
- [Backend integrations](https://github.com/liamnew/sciencesparkp1/blob/main/src/api/integrations.js): `src/api/integrations.js`

### Other components

- **Student**
- **Base44 platform**
- **Syllabus records**

## Connections

- Student → App routes: opens
- App routes → Authentication: checks session
- App routes → Onboarding gate: gates access
- App routes → Home and topics: routes to
- App routes → Topic browser: routes to
- App routes → AI tutor: routes to
- App routes → Quiz experience: routes to
- App routes → Progress view: routes to
- Quiz experience → Quiz creator: offers creation
- Quiz experience → Quiz taker: offers quiz
- Quiz experience → Quiz results: shows results
- Topic browser → Syllabus data hook: loads curriculum
- Progress view → Outcomes dashboard: presents outcomes
- Syllabus data hook → Base44 client: queries through
- Base44 client → Base44 platform: calls
- Base44 platform → Syllabus records: reads syllabus
- Syllabus updater → Base44 platform: creates and deletes
- Base44 platform → Syllabus records: stores syllabus
- AI tutor → Backend integrations: uses AI services
- Resource recommendations → Backend integrations: uses curation services
