# mariabhai/study-track architecture

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

- Interactive diagram: https://gitdiagram.com/mariabhai/study-track
- Repository: https://github.com/mariabhai/study-track

## Overview

StudyTrack is a React course-tracking app. Users browse and filter courses, open a course to inspect its details, and can create, edit, or delete courses through Shelf API. The main runtime entry mounts the routed application; route pages own the API requests, while shared form and display components handle reusable interaction and presentation. The README documents CRUD, course status, detail fields, loading/error states, and not-found routing. Edges reflect shown calls or documented API use; no separate persistence layer is present in the repository.

Main entry points: [`src/App.tsx`](https://github.com/mariabhai/study-track/blob/main/src/App.tsx) (Route setup), [`src/pages/CoursesPage.tsx`](https://github.com/mariabhai/study-track/blob/main/src/pages/CoursesPage.tsx) (Course overview), [`src/pages/CourseDetailPage.tsx`](https://github.com/mariabhai/study-track/blob/main/src/pages/CourseDetailPage.tsx) (Course details), [`src/pages/NewCoursePage.tsx`](https://github.com/mariabhai/study-track/blob/main/src/pages/NewCoursePage.tsx) (Create course)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application routing"]
  node_mount["React mount<br/>[main.tsx]"]
  node_router["Route setup<br/>[App.tsx]"]
  node_layout["Root layout<br/>[RootLayout.tsx]"]
  node_notfound["Not found<br/>[NotFoundPage.tsx]"]
end

subgraph group_browse["Course browsing"]
  node_list["Course overview<br/>[CoursesPage.tsx]"]
  node_filter["Status filter<br/>[StatusFilter.tsx]"]
  node_card["Course card<br/>[CourseCard.tsx]"]
  node_detail["Course details"]
end

subgraph group_manage["Course management"]
  node_new["Create course<br/>[NewCoursePage.tsx]"]
  node_edit["Edit course<br/>[EditCoursePage.tsx]"]
  node_form["Course form<br/>[CourseForm.tsx]"]
end

subgraph group_integration["API and presentation"]
  node_config["API settings<br/>[config.ts]"]
  node_images["Image optimization<br/>[images.ts]"]
end

node_visitor(("Learner"))
node_shelf[("Shelf API")]

node_visitor -->|"opens app"| node_mount
node_mount -->|"renders"| node_router
node_router -->|"routes through"| node_layout
node_router -->|"routes to"| node_list
node_router -->|"routes to"| node_new
node_router -->|"routes to"| node_detail
node_router -->|"routes to"| node_edit
node_router -->|"routes fallback"| node_notfound
node_list -->|"fetches courses"| node_shelf
node_list -->|"uses settings"| node_config
node_list -->|"renders"| node_filter
node_filter -->|"changes status"| node_list
node_list -->|"renders courses"| node_card
node_card -->|"links to"| node_detail
node_detail -->|"reads and deletes"| node_shelf
node_detail -->|"uses settings"| node_config
node_detail -->|"optimizes image"| node_images
node_card -->|"optimizes image"| node_images
node_new -->|"renders"| node_form
node_form -->|"submits callback"| node_new
node_new -->|"creates course"| node_shelf
node_new -->|"uses settings"| node_config
node_edit -->|"reads and updates"| node_shelf
node_edit -->|"uses settings"| node_config
node_edit -->|"renders"| node_form
node_form -->|"submits callback"| node_edit

click node_mount "https://github.com/mariabhai/study-track/blob/main/src/main.tsx"
click node_router "https://github.com/mariabhai/study-track/blob/main/src/App.tsx"
click node_layout "https://github.com/mariabhai/study-track/blob/main/src/pages/RootLayout.tsx"
click node_notfound "https://github.com/mariabhai/study-track/blob/main/src/pages/NotFoundPage.tsx"
click node_list "https://github.com/mariabhai/study-track/blob/main/src/pages/CoursesPage.tsx"
click node_filter "https://github.com/mariabhai/study-track/blob/main/src/components/StatusFilter.tsx"
click node_card "https://github.com/mariabhai/study-track/blob/main/src/components/CourseCard.tsx"
click node_detail "https://github.com/mariabhai/study-track/blob/main/src/pages/CourseDetailPage.tsx"
click node_new "https://github.com/mariabhai/study-track/blob/main/src/pages/NewCoursePage.tsx"
click node_edit "https://github.com/mariabhai/study-track/blob/main/src/pages/EditCoursePage.tsx"
click node_form "https://github.com/mariabhai/study-track/blob/main/src/components/CourseForm.tsx"
click node_config "https://github.com/mariabhai/study-track/blob/main/src/config.ts"
click node_images "https://github.com/mariabhai/study-track/blob/main/src/utils/images.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_mount,node_router,node_layout,node_notfound toneBlue
class node_list,node_filter,node_card,node_detail,node_shelf toneAmber
class node_new,node_edit,node_form toneMint
class node_config,node_images toneRose
class node_visitor toneIndigo
```

## Components

### Application routing

- [React mount](https://github.com/mariabhai/study-track/blob/main/src/main.tsx): `src/main.tsx`
- [Route setup](https://github.com/mariabhai/study-track/blob/main/src/App.tsx): `src/App.tsx`
- [Root layout](https://github.com/mariabhai/study-track/blob/main/src/pages/RootLayout.tsx): `src/pages/RootLayout.tsx`
- [Not found](https://github.com/mariabhai/study-track/blob/main/src/pages/NotFoundPage.tsx): `src/pages/NotFoundPage.tsx`

### Course browsing

- [Course overview](https://github.com/mariabhai/study-track/blob/main/src/pages/CoursesPage.tsx): `src/pages/CoursesPage.tsx`
- [Status filter](https://github.com/mariabhai/study-track/blob/main/src/components/StatusFilter.tsx): `src/components/StatusFilter.tsx`
- [Course card](https://github.com/mariabhai/study-track/blob/main/src/components/CourseCard.tsx): `src/components/CourseCard.tsx`
- [Course details](https://github.com/mariabhai/study-track/blob/main/src/pages/CourseDetailPage.tsx): `src/pages/CourseDetailPage.tsx`

### Course management

- [Create course](https://github.com/mariabhai/study-track/blob/main/src/pages/NewCoursePage.tsx): `src/pages/NewCoursePage.tsx`
- [Edit course](https://github.com/mariabhai/study-track/blob/main/src/pages/EditCoursePage.tsx): `src/pages/EditCoursePage.tsx`
- [Course form](https://github.com/mariabhai/study-track/blob/main/src/components/CourseForm.tsx): `src/components/CourseForm.tsx`

### API and presentation

- [API settings](https://github.com/mariabhai/study-track/blob/main/src/config.ts): `src/config.ts`
- [Image optimization](https://github.com/mariabhai/study-track/blob/main/src/utils/images.ts): `src/utils/images.ts`

### Other components

- **Learner**
- **Shelf API**

## Connections

- Learner → React mount: opens app (evidence: `README.md`)
- React mount → Route setup: renders (evidence: `src/main.tsx`)
- Route setup → Root layout: routes through (evidence: `src/App.tsx`)
- Route setup → Course overview: routes to (evidence: `src/App.tsx`)
- Route setup → Create course: routes to (evidence: `src/App.tsx`)
- Route setup → Course details: routes to (evidence: `src/App.tsx`)
- Route setup → Edit course: routes to (evidence: `src/App.tsx`)
- Route setup → Not found: routes fallback (evidence: `src/App.tsx`)
- Course overview → Shelf API: fetches courses (evidence: `src/pages/CoursesPage.tsx`)
- Course overview → API settings: uses settings (evidence: `src/pages/CoursesPage.tsx`)
- Course overview → Status filter: renders (evidence: `src/pages/CoursesPage.tsx`)
- Status filter → Course overview: changes status (evidence: `src/components/StatusFilter.tsx`)
- Course overview → Course card: renders courses (evidence: `src/pages/CoursesPage.tsx`)
- Course card → Course details: links to (evidence: `src/components/CourseCard.tsx`)
- Course details → Shelf API: reads and deletes (evidence: `src/pages/CourseDetailPage.tsx`)
- Course details → API settings: uses settings (evidence: `src/pages/CourseDetailPage.tsx`)
- Course details → Image optimization: optimizes image (evidence: `src/pages/CourseDetailPage.tsx`)
- Course card → Image optimization: optimizes image (evidence: `src/components/CourseCard.tsx`)
- Create course → Course form: renders (evidence: `src/pages/NewCoursePage.tsx`)
- Course form → Create course: submits callback (evidence: `src/components/CourseForm.tsx`)
- Create course → Shelf API: creates course (evidence: `src/pages/NewCoursePage.tsx`)
- Create course → API settings: uses settings (evidence: `src/pages/NewCoursePage.tsx`)
- Edit course → Shelf API: reads and updates (evidence: `src/pages/EditCoursePage.tsx`)
- Edit course → API settings: uses settings (evidence: `src/pages/EditCoursePage.tsx`)
- Edit course → Course form: renders (evidence: `src/pages/EditCoursePage.tsx`)
- Course form → Edit course: submits callback (evidence: `src/components/CourseForm.tsx`)
