# thsconline/s architecture

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

- Interactive diagram: https://gitdiagram.com/thsconline/s
- Repository: https://github.com/thsconline/s

## Overview

THSC Online is a browser-based repository of school assessment tasks and past exam papers for Years 9–12. Students navigate year and subject resource pages, choose a paper, and open it in the PDF viewer. The source shows generated page components registered through a central route module and viewer routes in the app. The README describes the site’s purpose only generally; search and API behavior is not evidenced in the excerpts, so their connections are left unverified.

Main entry points: [`routes.jsx`](https://github.com/thsconline/s/blob/thsconline-website/routes.jsx) (Page routes), [`viewer.js`](https://github.com/thsconline/s/blob/thsconline-website/viewer.js) (Document viewer), [`yr11`](https://github.com/thsconline/s/tree/thsconline-website/yr11) (Subject catalogs), [`app.jsx`](https://github.com/thsconline/s/blob/thsconline-website/app.jsx) (Browser app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_app["Browser app<br/>[app.jsx]"]
  node_routes["Page routes<br/>[routes.jsx]"]
end

subgraph group_catalog["Year and subject catalogs"]
  node_year9["Year 9 catalog<br/>[index.jsx]"]
  node_year10["Year 10 catalog<br/>[index.jsx]"]
  node_year11["Year 11 catalog<br/>[index.jsx]"]
  node_year12["Year 12 catalog<br/>[index.jsx]"]
  node_subject_catalogs["Subject catalogs"]
end

subgraph group_papers["Assessment and exam papers"]
  node_assessment_tasks["Assessment tasks"]
  node_year_papers["Yearly papers"]
  node_prelim_papers["Preliminary papers"]
  node_trial_papers["Trial papers"]
  node_hsc_papers["HSC papers"]
  node_competitions["Math competitions"]
end

subgraph group_viewing["Search and document viewing"]
  node_search["Search<br/>[search.js]"]
  node_viewer["Document viewer<br/>[viewer.js]"]
  node_api["API<br/>[api.js]"]
end

node_student(("Student"))

node_student -->|"opens site"| node_app
node_app -->|"mounts routes"| node_routes
node_routes -->|"registers pages"| node_year9
node_routes -->|"registers pages"| node_year10
node_routes -->|"registers pages"| node_year11
node_routes -->|"registers pages"| node_year12
node_routes -->|"registers pages"| node_subject_catalogs
node_routes -->|"registers pages"| node_assessment_tasks
node_year11 -->|"links subjects"| node_subject_catalogs
node_subject_catalogs -->|"links papers"| node_prelim_papers
node_subject_catalogs -->|"links tasks"| node_assessment_tasks
node_app -->|"routes viewer requests"| node_viewer
node_student -.->|"searches resources"| node_search
node_search -.->|"queries"| node_api
node_assessment_tasks -.->|"opens paper"| node_viewer
node_year_papers -.->|"opens paper"| node_viewer
node_trial_papers -.->|"opens paper"| node_viewer
node_hsc_papers -.->|"opens paper"| node_viewer
node_competitions -.->|"opens paper"| node_viewer

click node_app "https://github.com/thsconline/s/blob/thsconline-website/app.jsx"
click node_routes "https://github.com/thsconline/s/blob/thsconline-website/routes.jsx"
click node_year9 "https://github.com/thsconline/s/blob/thsconline-website/yr9/index.jsx"
click node_year10 "https://github.com/thsconline/s/blob/thsconline-website/yr10/index.jsx"
click node_year11 "https://github.com/thsconline/s/blob/thsconline-website/yr11/index.jsx"
click node_year12 "https://github.com/thsconline/s/blob/thsconline-website/yr12/index.jsx"
click node_subject_catalogs "https://github.com/thsconline/s/tree/thsconline-website/yr11"
click node_assessment_tasks "https://github.com/thsconline/s/tree/thsconline-website/yr11"
click node_year_papers "https://github.com/thsconline/s/tree/thsconline-website/yr11"
click node_prelim_papers "https://github.com/thsconline/s/tree/thsconline-website/yr11"
click node_trial_papers "https://github.com/thsconline/s/tree/thsconline-website/yr12"
click node_hsc_papers "https://github.com/thsconline/s/tree/thsconline-website/yr12"
click node_competitions "https://github.com/thsconline/s/tree/thsconline-website/yr12/Maths/Competitions"
click node_search "https://github.com/thsconline/s/blob/thsconline-website/search.js"
click node_viewer "https://github.com/thsconline/s/blob/thsconline-website/viewer.js"
click node_api "https://github.com/thsconline/s/blob/thsconline-website/api.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_routes toneBlue
class node_year9,node_year10,node_year11,node_year12,node_subject_catalogs toneAmber
class node_assessment_tasks,node_year_papers,node_prelim_papers,node_trial_papers,node_hsc_papers,node_competitions toneMint
class node_search,node_viewer,node_api toneRose
class node_student toneIndigo
```

## Components

### Application entry

- [Browser app](https://github.com/thsconline/s/blob/thsconline-website/app.jsx): `app.jsx`
- [Page routes](https://github.com/thsconline/s/blob/thsconline-website/routes.jsx): `routes.jsx`

### Year and subject catalogs

- [Year 9 catalog](https://github.com/thsconline/s/blob/thsconline-website/yr9/index.jsx): `yr9/index.jsx`
- [Year 10 catalog](https://github.com/thsconline/s/blob/thsconline-website/yr10/index.jsx): `yr10/index.jsx`
- [Year 11 catalog](https://github.com/thsconline/s/blob/thsconline-website/yr11/index.jsx): `yr11/index.jsx`
- [Year 12 catalog](https://github.com/thsconline/s/blob/thsconline-website/yr12/index.jsx): `yr12/index.jsx`
- [Subject catalogs](https://github.com/thsconline/s/tree/thsconline-website/yr11): `yr11`

### Assessment and exam papers

- [Assessment tasks](https://github.com/thsconline/s/tree/thsconline-website/yr11): `yr11`
- [Yearly papers](https://github.com/thsconline/s/tree/thsconline-website/yr11): `yr11`
- [Preliminary papers](https://github.com/thsconline/s/tree/thsconline-website/yr11): `yr11`
- [Trial papers](https://github.com/thsconline/s/tree/thsconline-website/yr12): `yr12`
- [HSC papers](https://github.com/thsconline/s/tree/thsconline-website/yr12): `yr12`
- [Math competitions](https://github.com/thsconline/s/tree/thsconline-website/yr12/Maths/Competitions): `yr12/Maths/Competitions`

### Search and document viewing

- [Search](https://github.com/thsconline/s/blob/thsconline-website/search.js): `search.js`
- [Document viewer](https://github.com/thsconline/s/blob/thsconline-website/viewer.js): `viewer.js`
- [API](https://github.com/thsconline/s/blob/thsconline-website/api.js): `api.js`

### Other components

- **Student**

## Connections

- Student → Browser app: opens site
- Browser app → Page routes: mounts routes (evidence: `app.jsx`)
- Page routes → Year 9 catalog: registers pages (evidence: `routes.jsx`)
- Page routes → Year 10 catalog: registers pages (evidence: `routes.jsx`)
- Page routes → Year 11 catalog: registers pages (evidence: `routes.jsx`)
- Page routes → Year 12 catalog: registers pages (evidence: `routes.jsx`)
- Page routes → Subject catalogs: registers pages (evidence: `routes.jsx`)
- Page routes → Assessment tasks: registers pages (evidence: `routes.jsx`)
- Year 11 catalog → Subject catalogs: links subjects (evidence: `yr11/index.jsx`)
- Subject catalogs → Preliminary papers: links papers (evidence: `yr11/Biology/index.jsx`)
- Subject catalogs → Assessment tasks: links tasks (evidence: `yr11/Biology/index.jsx`)
- Browser app → Document viewer: routes viewer requests (evidence: `app.jsx`)
- Student → Search: searches resources
- Search → API: queries
- Assessment tasks → Document viewer: opens paper
- Yearly papers → Document viewer: opens paper
- Trial papers → Document viewer: opens paper
- HSC papers → Document viewer: opens paper
- Math competitions → Document viewer: opens paper
