# nttare0/shool architecture

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

- Interactive diagram: https://gitdiagram.com/nttare0/shool
- Repository: https://github.com/nttare0/shool

## Overview

Student OS is a student-workspace web app whose main flow is using study tools to create and update workspace data, then reviewing derived progress on the dashboard. App Router pages provide tasks, notes, flashcards, focus sessions, and a whiteboard; a typed client store manages that state, with browser-local persistence for guests and a documented Clerk/Supabase account-workspace path. Analytics feed dashboard chart panels, rendered with the vendored chart components. The graph follows README capabilities and shown source references; some cloud-sync details and unsampled feature internals are documented but not independently verified here.

Main entry points: [`src/lib/store.tsx`](https://github.com/nttare0/shool/blob/main/src/lib/store.tsx) (Typed workspace store), [`src/components/app-shell.tsx`](https://github.com/nttare0/shool/blob/main/src/components/app-shell.tsx) (App shell), [`src/app/(app)/dashboard/page.tsx`](https://github.com/nttare0/shool/blob/main/src/app/(app)/dashboard/page.tsx) (Dashboard), [`src/app/(app)/settings/page.tsx`](https://github.com/nttare0/shool/blob/main/src/app/(app)/settings/page.tsx) (Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["App experience"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_app_shell["App shell<br/>[app-shell.tsx]"]
  node_login["Sign-in page<br/>[page.tsx]"]
  node_settings["Settings<br/>[page.tsx]"]
end

subgraph group_study["Study tools"]
  node_tasks["Tasks<br/>[page.tsx]"]
  node_notes["Notes<br/>[page.tsx]"]
  node_flashcards["Flashcards<br/>[page.tsx]"]
  node_focus["Focus timer<br/>[page.tsx]"]
  node_whiteboard["Whiteboard<br/>[page.tsx]"]
end

subgraph group_state["Workspace state"]
  node_store["Typed workspace store<br/>[store.tsx]"]
  node_types["Workspace data types<br/>[types.ts]"]
  node_seed["Seed data<br/>[seed.ts]"]
  node_local_storage[("Browser storage")]
end

subgraph group_insights["Progress insights"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_analytics["Study analytics<br/>[analytics.ts]"]
  node_dashboard_charts["Dashboard chart panels"]
  node_chart_library["Chart components"]
end

subgraph group_identity["Identity and sync"]
  node_clerk{{"Clerk"}}
  node_supabase[("Supabase workspace")]
end

node_student(("Student"))

node_student -->|"visits"| node_landing
node_student -->|"uses workspace"| node_app_shell
node_student -->|"signs in"| node_login
node_app_shell -->|"navigates"| node_tasks
node_app_shell -->|"navigates"| node_notes
node_app_shell -->|"navigates"| node_flashcards
node_app_shell -->|"navigates"| node_focus
node_app_shell -->|"navigates"| node_whiteboard
node_app_shell -->|"navigates"| node_settings
node_tasks -->|"updates"| node_store
node_notes -->|"updates"| node_store
node_flashcards -->|"updates"| node_store
node_focus -->|"logs sessions"| node_store
node_whiteboard -->|"updates"| node_store
node_store -->|"uses schema"| node_types
node_store -->|"initializes from"| node_seed
node_store -->|"persists locally"| node_local_storage
node_settings -->|"manages workspace"| node_store
node_settings -->|"links sign-in"| node_login
node_dashboard -->|"reads state"| node_store
node_dashboard -->|"computes summaries"| node_analytics
node_analytics -->|"aggregates records"| node_types
node_dashboard -->|"renders panels"| node_dashboard_charts
node_landing -->|"previews charts"| node_dashboard_charts
node_dashboard_charts -->|"composes charts"| node_chart_library
node_store -->|"authenticates users"| node_clerk
node_store -->|"syncs workspaces"| node_supabase
node_login -.->|"sign-in integration"| node_clerk

click node_landing "https://github.com/nttare0/shool/blob/main/src/app/page.tsx"
click node_app_shell "https://github.com/nttare0/shool/blob/main/src/components/app-shell.tsx"
click node_login "https://github.com/nttare0/shool/blob/main/src/app/login/page.tsx"
click node_tasks "https://github.com/nttare0/shool/blob/main/src/app/(app)/tasks/page.tsx"
click node_notes "https://github.com/nttare0/shool/blob/main/src/app/(app)/notes/page.tsx"
click node_flashcards "https://github.com/nttare0/shool/blob/main/src/app/(app)/flashcards/page.tsx"
click node_focus "https://github.com/nttare0/shool/blob/main/src/app/(app)/focus/page.tsx"
click node_whiteboard "https://github.com/nttare0/shool/blob/main/src/app/(app)/whiteboard/page.tsx"
click node_settings "https://github.com/nttare0/shool/blob/main/src/app/(app)/settings/page.tsx"
click node_store "https://github.com/nttare0/shool/blob/main/src/lib/store.tsx"
click node_types "https://github.com/nttare0/shool/blob/main/src/lib/types.ts"
click node_seed "https://github.com/nttare0/shool/blob/main/src/lib/seed.ts"
click node_dashboard "https://github.com/nttare0/shool/blob/main/src/app/(app)/dashboard/page.tsx"
click node_analytics "https://github.com/nttare0/shool/blob/main/src/lib/analytics.ts"
click node_dashboard_charts "https://github.com/nttare0/shool/blob/main/src/components/dashboard-charts.tsx"
click node_chart_library "https://github.com/nttare0/shool/tree/main/src/components/charts"

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_landing,node_app_shell,node_login,node_settings toneBlue
class node_tasks,node_notes,node_flashcards,node_focus,node_whiteboard toneAmber
class node_store,node_types,node_seed,node_local_storage toneMint
class node_dashboard,node_analytics,node_dashboard_charts,node_chart_library toneRose
class node_clerk,node_supabase,node_student toneIndigo
```

## Components

### App experience

- [Landing page](https://github.com/nttare0/shool/blob/main/src/app/page.tsx): `src/app/page.tsx`
- [App shell](https://github.com/nttare0/shool/blob/main/src/components/app-shell.tsx): `src/components/app-shell.tsx`
- [Sign-in page](https://github.com/nttare0/shool/blob/main/src/app/login/page.tsx): `src/app/login/page.tsx`
- [Settings](https://github.com/nttare0/shool/blob/main/src/app/(app)/settings/page.tsx): `src/app/(app)/settings/page.tsx`

### Study tools

- [Tasks](https://github.com/nttare0/shool/blob/main/src/app/(app)/tasks/page.tsx): `src/app/(app)/tasks/page.tsx`
- [Notes](https://github.com/nttare0/shool/blob/main/src/app/(app)/notes/page.tsx): `src/app/(app)/notes/page.tsx`
- [Flashcards](https://github.com/nttare0/shool/blob/main/src/app/(app)/flashcards/page.tsx): `src/app/(app)/flashcards/page.tsx`
- [Focus timer](https://github.com/nttare0/shool/blob/main/src/app/(app)/focus/page.tsx): `src/app/(app)/focus/page.tsx`
- [Whiteboard](https://github.com/nttare0/shool/blob/main/src/app/(app)/whiteboard/page.tsx): `src/app/(app)/whiteboard/page.tsx`

### Workspace state

- [Typed workspace store](https://github.com/nttare0/shool/blob/main/src/lib/store.tsx): `src/lib/store.tsx`
- [Workspace data types](https://github.com/nttare0/shool/blob/main/src/lib/types.ts): `src/lib/types.ts`
- [Seed data](https://github.com/nttare0/shool/blob/main/src/lib/seed.ts): `src/lib/seed.ts`
- **Browser storage**

### Progress insights

- [Dashboard](https://github.com/nttare0/shool/blob/main/src/app/(app)/dashboard/page.tsx): `src/app/(app)/dashboard/page.tsx`
- [Study analytics](https://github.com/nttare0/shool/blob/main/src/lib/analytics.ts): `src/lib/analytics.ts`
- [Dashboard chart panels](https://github.com/nttare0/shool/blob/main/src/components/dashboard-charts.tsx): `src/components/dashboard-charts.tsx`
- [Chart components](https://github.com/nttare0/shool/tree/main/src/components/charts): `src/components/charts`

### Identity and sync

- **Clerk**
- **Supabase workspace**

### Other components

- **Student**

## Connections

- Student → Landing page: visits (evidence: `README.md`)
- Student → App shell: uses workspace (evidence: `README.md`)
- Student → Sign-in page: signs in (evidence: `README.md`)
- App shell → Tasks: navigates (evidence: `README.md`)
- App shell → Notes: navigates (evidence: `README.md`)
- App shell → Flashcards: navigates (evidence: `README.md`)
- App shell → Focus timer: navigates (evidence: `README.md`)
- App shell → Whiteboard: navigates (evidence: `README.md`)
- App shell → Settings: navigates (evidence: `README.md`)
- Tasks → Typed workspace store: updates (evidence: `src/app/(app)/tasks/page.tsx`)
- Notes → Typed workspace store: updates (evidence: `src/app/(app)/notes/page.tsx`)
- Flashcards → Typed workspace store: updates (evidence: `src/app/(app)/flashcards/page.tsx`)
- Focus timer → Typed workspace store: logs sessions (evidence: `README.md`)
- Whiteboard → Typed workspace store: updates (evidence: `src/app/(app)/whiteboard/page.tsx`)
- Typed workspace store → Workspace data types: uses schema (evidence: `src/lib/store.tsx`)
- Typed workspace store → Seed data: initializes from (evidence: `src/lib/store.tsx`)
- Typed workspace store → Browser storage: persists locally (evidence: `README.md`)
- Settings → Typed workspace store: manages workspace (evidence: `src/app/(app)/settings/page.tsx`)
- Settings → Sign-in page: links sign-in (evidence: `src/app/(app)/settings/page.tsx`)
- Dashboard → Typed workspace store: reads state (evidence: `src/app/(app)/dashboard/page.tsx`)
- Dashboard → Study analytics: computes summaries (evidence: `src/app/(app)/dashboard/page.tsx`)
- Study analytics → Workspace data types: aggregates records (evidence: `src/lib/analytics.ts`)
- Dashboard → Dashboard chart panels: renders panels (evidence: `src/app/(app)/dashboard/page.tsx`)
- Landing page → Dashboard chart panels: previews charts (evidence: `src/app/page.tsx`)
- Dashboard chart panels → Chart components: composes charts (evidence: `src/components/dashboard-charts.tsx`)
- Typed workspace store → Clerk: authenticates users (evidence: `src/lib/store.tsx`)
- Typed workspace store → Supabase workspace: syncs workspaces (evidence: `README.md`)
- Sign-in page → Clerk: sign-in integration (evidence: `README.md`)
