# sanelemanyela/study-schedule-ui architecture

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

- Interactive diagram: https://gitdiagram.com/sanelemanyela/study-schedule-ui
- Repository: https://github.com/sanelemanyela/study-schedule-ui

## Overview

Study Planner lets learners and administrators authenticate, manage courses and learning materials, organize study plans and schedules, and keep course notes. The frontend routes users into these workflows, calls a FastAPI REST API, and maintains a local-data fallback for study context. The backend validates request models, applies service-layer operations, and persists data in Firestore. The README documents authentication, role guards, caching, and the proxy; backend source details beyond the indexed imports are not inferred here.

Main entry points: [`src/app/routes.ts`](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/routes.ts) (Route access), [`src/app/lib/api.ts`](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/api.ts) (REST client), [`src/app/lib/study-context.tsx`](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/study-context.tsx) (Study state and fallback), [`src/app/App.tsx`](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/App.tsx) (App shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Study frontend"]
  node_app["App shell<br/>[App.tsx]"]
  node_routing["Route access<br/>[routes.ts]"]
  node_session["Login and session<br/>[LoginPage.tsx]"]
  node_study_context["Study state and fallback<br/>[study-context.tsx]"]
  node_api_client["REST client<br/>[api.ts]"]
  node_ui_primitives["UI primitives"]
end

subgraph group_learning["Learning workflows"]
  node_dashboard["Dashboard<br/>[DashboardHome.tsx]"]
  node_courses["Course management"]
  node_course_detail["Course details"]
  node_notes["Course notes"]
  node_library["Course materials<br/>[LibraryPage.tsx]"]
  node_calendar["Study calendar"]
  node_plans["Study planning<br/>[StudyPlanPage.tsx]"]
  node_categories["Categories and languages<br/>[CategoriesPage.tsx]"]
  node_other_pages["Related pages"]
end

subgraph group_backend["API backend"]
  node_api["FastAPI routes and guards<br/>[main.py]"]
  node_models["Validated data models<br/>[models.py]"]
  node_service["Service and cache<br/>[service.py]"]
end

subgraph group_storage["Persistence"]
  node_firestore[("Firestore")]
end

node_learner(("Learner or admin"))
node_proxy_target["External material hosts"]

node_learner -->|"uses"| node_app
node_app -->|"mounts routes"| node_routing
node_app -->|"provides state"| node_study_context
node_routing -->|"routes login"| node_session
node_routing -->|"routes dashboard"| node_dashboard
node_routing -->|"routes courses"| node_courses
node_routing -->|"routes details"| node_course_detail
node_routing -->|"routes notes"| node_notes
node_routing -->|"routes library"| node_library
node_routing -->|"routes calendar"| node_calendar
node_routing -->|"routes plans"| node_plans
node_routing -->|"routes categories"| node_categories
node_routing -->|"routes related pages"| node_other_pages
node_dashboard -->|"requests data"| node_api_client
node_courses -->|"requests data"| node_api_client
node_course_detail -->|"requests data"| node_api_client
node_library -->|"requests materials"| node_api_client
node_calendar -->|"requests schedules"| node_api_client
node_calendar -->|"uses study state"| node_study_context
node_plans -->|"requests plans"| node_api_client
node_plans -->|"uses study state"| node_study_context
node_study_context -->|"loads remote data"| node_api_client
node_api_client -->|"calls REST API"| node_api
node_api -->|"validates requests"| node_models
node_api -->|"delegates operations"| node_service
node_service -->|"uses data shapes"| node_models
node_service -->|"reads and writes"| node_firestore
node_api_client -.->|"requests proxied content"| node_proxy_target

click node_app "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/App.tsx"
click node_routing "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/routes.ts"
click node_session "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/LoginPage.tsx"
click node_dashboard "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/DashboardHome.tsx"
click node_courses "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseOverviewPage.tsx"
click node_course_detail "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseDetailPage.tsx"
click node_notes "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseNotesPage.tsx"
click node_library "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/LibraryPage.tsx"
click node_calendar "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/StudyCalendarPage.tsx"
click node_plans "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/StudyPlanPage.tsx"
click node_categories "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CategoriesPage.tsx"
click node_other_pages "https://github.com/sanelemanyela/study-schedule-ui/tree/main/src/app/pages"
click node_study_context "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/study-context.tsx"
click node_api_client "https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/api.ts"
click node_ui_primitives "https://github.com/sanelemanyela/study-schedule-ui/tree/main/src/app/components/ui"
click node_api "https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/main.py"
click node_models "https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/models.py"
click node_service "https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/service.py"

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_routing,node_session,node_study_context,node_api_client,node_ui_primitives toneBlue
class node_dashboard,node_courses,node_course_detail,node_notes,node_library,node_calendar,node_plans,node_categories,node_other_pages toneAmber
class node_api,node_models,node_service toneMint
class node_firestore toneRose
class node_learner,node_proxy_target toneIndigo
```

## Components

### Study frontend

- [App shell](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Route access](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/routes.ts): `src/app/routes.ts`
- [Login and session](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/LoginPage.tsx): `src/app/pages/LoginPage.tsx`
- [Study state and fallback](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/study-context.tsx): `src/app/lib/study-context.tsx`
- [REST client](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/lib/api.ts): `src/app/lib/api.ts`
- [UI primitives](https://github.com/sanelemanyela/study-schedule-ui/tree/main/src/app/components/ui): `src/app/components/ui`

### Learning workflows

- [Dashboard](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/DashboardHome.tsx): `src/app/pages/DashboardHome.tsx`
- [Course management](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseOverviewPage.tsx): `src/app/pages/CourseOverviewPage.tsx`
- [Course details](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseDetailPage.tsx): `src/app/pages/CourseDetailPage.tsx`
- [Course notes](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CourseNotesPage.tsx): `src/app/pages/CourseNotesPage.tsx`
- [Course materials](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/LibraryPage.tsx): `src/app/pages/LibraryPage.tsx`
- [Study calendar](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/StudyCalendarPage.tsx): `src/app/pages/StudyCalendarPage.tsx`
- [Study planning](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/StudyPlanPage.tsx): `src/app/pages/StudyPlanPage.tsx`
- [Categories and languages](https://github.com/sanelemanyela/study-schedule-ui/blob/main/src/app/pages/CategoriesPage.tsx): `src/app/pages/CategoriesPage.tsx`
- [Related pages](https://github.com/sanelemanyela/study-schedule-ui/tree/main/src/app/pages): `src/app/pages`

### API backend

- [FastAPI routes and guards](https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/main.py): `backend/app/main.py`
- [Validated data models](https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/models.py): `backend/app/models.py`
- [Service and cache](https://github.com/sanelemanyela/study-schedule-ui/blob/main/backend/app/service.py): `backend/app/service.py`

### Persistence

- **Firestore**

### Other components

- **Learner or admin**
- **External material hosts**

## Connections

- Learner or admin → App shell: uses (evidence: `README.md`)
- App shell → Route access: mounts routes (evidence: `src/app/App.tsx`)
- App shell → Study state and fallback: provides state (evidence: `src/app/App.tsx`)
- Route access → Login and session: routes login (evidence: `src/app/routes.ts`)
- Route access → Dashboard: routes dashboard (evidence: `src/app/routes.ts`)
- Route access → Course management: routes courses (evidence: `src/app/routes.ts`)
- Route access → Course details: routes details (evidence: `src/app/routes.ts`)
- Route access → Course notes: routes notes (evidence: `src/app/routes.ts`)
- Route access → Course materials: routes library (evidence: `src/app/routes.ts`)
- Route access → Study calendar: routes calendar (evidence: `src/app/routes.ts`)
- Route access → Study planning: routes plans (evidence: `src/app/routes.ts`)
- Route access → Categories and languages: routes categories (evidence: `src/app/routes.ts`)
- Route access → Related pages: routes related pages (evidence: `src/app/routes.ts`)
- Dashboard → REST client: requests data (evidence: `src/app/pages/DashboardHome.tsx`)
- Course management → REST client: requests data (evidence: `src/app/pages/CourseOverviewPage.tsx`)
- Course details → REST client: requests data (evidence: `src/app/pages/CourseDetailPage.tsx`)
- Course materials → REST client: requests materials (evidence: `src/app/pages/LibraryPage.tsx`)
- Study calendar → REST client: requests schedules (evidence: `src/app/pages/StudyCalendarPage.tsx`)
- Study calendar → Study state and fallback: uses study state (evidence: `src/app/pages/StudyCalendarPage.tsx`)
- Study planning → REST client: requests plans (evidence: `src/app/pages/StudyPlanPage.tsx`)
- Study planning → Study state and fallback: uses study state (evidence: `src/app/pages/StudyPlanPage.tsx`)
- Study state and fallback → REST client: loads remote data (evidence: `src/app/lib/study-context.tsx`)
- REST client → FastAPI routes and guards: calls REST API (evidence: `README.md`)
- FastAPI routes and guards → Validated data models: validates requests (evidence: `backend/app/main.py`)
- FastAPI routes and guards → Service and cache: delegates operations (evidence: `backend/app/main.py`)
- Service and cache → Validated data models: uses data shapes (evidence: `backend/app/service.py`)
- Service and cache → Firestore: reads and writes (evidence: `README.md`)
- REST client → External material hosts: requests proxied content (evidence: `README.md`)
