# biigmercury/my_study_app architecture

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

- Interactive diagram: https://gitdiagram.com/biigmercury/my_study_app
- Repository: https://github.com/biigmercury/my_study_app

## Overview

StudyOS is a course-based study app: learners browse courses and topics, read lessons, mark topics complete, and review their progress. Its course catalog and lesson content are distinct from browser-local progress and settings; quizzes add an API-backed generation path. The graph also includes search, navigation, and reminder capabilities indicated by the app routes and source index. Some route and UI implementations were not excerpted, so their connections are included only where the source index supports them; the README is empty.

Main entry points: [`lib/courses.ts`](https://github.com/biigmercury/my_study_app/blob/master/lib/courses.ts) (Course catalog data), [`lib/progress.ts`](https://github.com/biigmercury/my_study_app/blob/master/lib/progress.ts) (Progress storage), [`app/courses/[code]/[topic]/page.tsx`](https://github.com/biigmercury/my_study_app/blob/master/app/courses/%5Bcode%5D/%5Btopic%5D/page.tsx) (Lesson route), [`components/HomeClient.tsx`](https://github.com/biigmercury/my_study_app/blob/master/components/HomeClient.tsx) (Home dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Learning experience"]
  node_home["Home dashboard<br/>[HomeClient.tsx]"]
  node_course_list["Course catalog<br/>[page.tsx]"]
  node_course_detail["Course topics<br/>[page.tsx]"]
  node_lesson_route["Lesson route<br/>[page.tsx]"]
  node_lesson_reader["Lesson reader<br/>[LessonReader.tsx]"]
  node_search["Course search<br/>[page.tsx]"]
  node_progress_page["Progress dashboard<br/>[page.tsx]"]
  node_settings_page["Settings page<br/>[page.tsx]"]
  node_quiz_modal["Quiz interface<br/>[QuizModal.tsx]"]
  node_quiz_api["Quiz endpoint<br/>[route.ts]"]
end

subgraph group_content["Course content"]
  node_catalog_data["Course catalog data<br/>[courses.ts]"]
  node_lesson_content["MDX lesson content"]
  node_content_loader["Content loader<br/>[content.ts]"]
  node_mdx_rendering["MDX render components<br/>[mdx-components.tsx]"]
  node_lesson_blocks["Lesson blocks"]
end

subgraph group_state["Study state"]
  node_progress_store[("Progress storage<br/>[progress.ts]")]
  node_settings_store[("Settings and reminders<br/>[settings.ts]")]
end

subgraph group_platform["App platform"]
  node_app_shell["App shell<br/>[layout.tsx]"]
  node_mobile_layout["Mobile navigation<br/>[MobileLayout.tsx]"]
  node_reminder_manager["Reminder manager"]
  node_service_worker["Notification service worker<br/>[sw.js]"]
end

node_learner(("Learner"))
node_gemini{{"Gemini AI"}}

node_learner -->|"opens"| node_home
node_home -->|"reads courses"| node_catalog_data
node_home -->|"reads progress"| node_progress_store
node_learner -->|"browses"| node_course_list
node_course_list -->|"lists courses"| node_catalog_data
node_course_list -->|"reads progress"| node_progress_store
node_learner -->|"selects course"| node_course_detail
node_course_detail -->|"loads course"| node_catalog_data
node_course_detail -->|"updates progress"| node_progress_store
node_learner -->|"opens topic"| node_lesson_route
node_lesson_route -->|"loads course"| node_catalog_data
node_lesson_route -->|"loads lesson"| node_content_loader
node_lesson_route -->|"renders lesson"| node_lesson_reader
node_content_loader -->|"uses components"| node_mdx_rendering
node_mdx_rendering -->|"renders blocks"| node_lesson_blocks
node_lesson_reader -->|"records progress"| node_progress_store
node_lesson_reader -->|"opens quiz"| node_quiz_modal
node_learner -->|"searches"| node_search
node_search -->|"searches courses"| node_catalog_data
node_learner -->|"reviews progress"| node_progress_page
node_progress_page -->|"reads activity"| node_progress_store
node_learner -->|"changes settings"| node_settings_page
node_settings_page -->|"saves settings"| node_settings_store
node_learner -.->|"takes quiz"| node_quiz_modal
node_quiz_modal -.->|"requests quiz"| node_quiz_api
node_quiz_api -->|"generates questions"| node_gemini
node_app_shell -->|"renders layout"| node_mobile_layout
node_app_shell -->|"mounts manager"| node_reminder_manager
node_reminder_manager -->|"arms reminders"| node_settings_store
node_settings_page -.->|"registers worker"| node_service_worker
node_settings_store -.->|"shows notifications"| node_service_worker

click node_home "https://github.com/biigmercury/my_study_app/blob/master/components/HomeClient.tsx"
click node_course_list "https://github.com/biigmercury/my_study_app/blob/master/app/courses/page.tsx"
click node_course_detail "https://github.com/biigmercury/my_study_app/blob/master/app/courses/%5Bcode%5D/page.tsx"
click node_lesson_route "https://github.com/biigmercury/my_study_app/blob/master/app/courses/%5Bcode%5D/%5Btopic%5D/page.tsx"
click node_lesson_reader "https://github.com/biigmercury/my_study_app/blob/master/components/LessonReader.tsx"
click node_search "https://github.com/biigmercury/my_study_app/blob/master/app/search/page.tsx"
click node_progress_page "https://github.com/biigmercury/my_study_app/blob/master/app/progress/page.tsx"
click node_settings_page "https://github.com/biigmercury/my_study_app/blob/master/app/settings/page.tsx"
click node_quiz_modal "https://github.com/biigmercury/my_study_app/blob/master/components/QuizModal.tsx"
click node_quiz_api "https://github.com/biigmercury/my_study_app/blob/master/app/api/quiz/route.ts"
click node_catalog_data "https://github.com/biigmercury/my_study_app/blob/master/lib/courses.ts"
click node_lesson_content "https://github.com/biigmercury/my_study_app/tree/master/content"
click node_content_loader "https://github.com/biigmercury/my_study_app/blob/master/lib/content.ts"
click node_mdx_rendering "https://github.com/biigmercury/my_study_app/blob/master/lib/mdx-components.tsx"
click node_lesson_blocks "https://github.com/biigmercury/my_study_app/tree/master/components"
click node_progress_store "https://github.com/biigmercury/my_study_app/blob/master/lib/progress.ts"
click node_settings_store "https://github.com/biigmercury/my_study_app/blob/master/lib/settings.ts"
click node_app_shell "https://github.com/biigmercury/my_study_app/blob/master/app/layout.tsx"
click node_mobile_layout "https://github.com/biigmercury/my_study_app/blob/master/components/MobileLayout.tsx"
click node_reminder_manager "https://github.com/biigmercury/my_study_app/blob/master/components/ReminderManager.tsx"
click node_service_worker "https://github.com/biigmercury/my_study_app/blob/master/public/sw.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_home,node_course_list,node_course_detail,node_lesson_route,node_lesson_reader,node_search,node_progress_page,node_settings_page,node_quiz_modal,node_quiz_api toneBlue
class node_catalog_data,node_lesson_content,node_content_loader,node_mdx_rendering,node_lesson_blocks toneAmber
class node_progress_store,node_settings_store toneMint
class node_app_shell,node_mobile_layout,node_reminder_manager,node_service_worker toneRose
class node_learner,node_gemini toneIndigo
```

## Components

### Learning experience

- [Home dashboard](https://github.com/biigmercury/my_study_app/blob/master/components/HomeClient.tsx): `components/HomeClient.tsx`
- [Course catalog](https://github.com/biigmercury/my_study_app/blob/master/app/courses/page.tsx): `app/courses/page.tsx`
- [Course topics](https://github.com/biigmercury/my_study_app/blob/master/app/courses/%5Bcode%5D/page.tsx): `app/courses/[code]/page.tsx`
- [Lesson route](https://github.com/biigmercury/my_study_app/blob/master/app/courses/%5Bcode%5D/%5Btopic%5D/page.tsx): `app/courses/[code]/[topic]/page.tsx`
- [Lesson reader](https://github.com/biigmercury/my_study_app/blob/master/components/LessonReader.tsx): `components/LessonReader.tsx`
- [Course search](https://github.com/biigmercury/my_study_app/blob/master/app/search/page.tsx): `app/search/page.tsx`
- [Progress dashboard](https://github.com/biigmercury/my_study_app/blob/master/app/progress/page.tsx): `app/progress/page.tsx`
- [Settings page](https://github.com/biigmercury/my_study_app/blob/master/app/settings/page.tsx): `app/settings/page.tsx`
- [Quiz interface](https://github.com/biigmercury/my_study_app/blob/master/components/QuizModal.tsx): `components/QuizModal.tsx`
- [Quiz endpoint](https://github.com/biigmercury/my_study_app/blob/master/app/api/quiz/route.ts): `app/api/quiz/route.ts`

### Course content

- [Course catalog data](https://github.com/biigmercury/my_study_app/blob/master/lib/courses.ts): `lib/courses.ts`
- [MDX lesson content](https://github.com/biigmercury/my_study_app/tree/master/content): `content`
- [Content loader](https://github.com/biigmercury/my_study_app/blob/master/lib/content.ts): `lib/content.ts`
- [MDX render components](https://github.com/biigmercury/my_study_app/blob/master/lib/mdx-components.tsx): `lib/mdx-components.tsx`
- [Lesson blocks](https://github.com/biigmercury/my_study_app/tree/master/components): `components`

### Study state

- [Progress storage](https://github.com/biigmercury/my_study_app/blob/master/lib/progress.ts): `lib/progress.ts`
- [Settings and reminders](https://github.com/biigmercury/my_study_app/blob/master/lib/settings.ts): `lib/settings.ts`

### App platform

- [App shell](https://github.com/biigmercury/my_study_app/blob/master/app/layout.tsx): `app/layout.tsx`
- [Mobile navigation](https://github.com/biigmercury/my_study_app/blob/master/components/MobileLayout.tsx): `components/MobileLayout.tsx`
- [Reminder manager](https://github.com/biigmercury/my_study_app/blob/master/components/ReminderManager.tsx): `components/ReminderManager.tsx`
- [Notification service worker](https://github.com/biigmercury/my_study_app/blob/master/public/sw.js): `public/sw.js`

### Other components

- **Learner**
- **Gemini AI**

## Connections

- Learner → Home dashboard: opens
- Home dashboard → Course catalog data: reads courses (evidence: `components/HomeClient.tsx`)
- Home dashboard → Progress storage: reads progress (evidence: `components/HomeClient.tsx`)
- Learner → Course catalog: browses (evidence: `app/courses/page.tsx`)
- Course catalog → Course catalog data: lists courses (evidence: `app/courses/page.tsx`)
- Course catalog → Progress storage: reads progress (evidence: `app/courses/page.tsx`)
- Learner → Course topics: selects course (evidence: `app/courses/[code]/page.tsx`)
- Course topics → Course catalog data: loads course (evidence: `app/courses/[code]/page.tsx`)
- Course topics → Progress storage: updates progress (evidence: `app/courses/[code]/page.tsx`)
- Learner → Lesson route: opens topic (evidence: `app/courses/[code]/[topic]/page.tsx`)
- Lesson route → Course catalog data: loads course (evidence: `app/courses/[code]/[topic]/page.tsx`)
- Lesson route → Content loader: loads lesson (evidence: `app/courses/[code]/[topic]/page.tsx`)
- Lesson route → Lesson reader: renders lesson (evidence: `app/courses/[code]/[topic]/page.tsx`)
- Content loader → MDX render components: uses components (evidence: `lib/content.ts`)
- MDX render components → Lesson blocks: renders blocks (evidence: `lib/mdx-components.tsx`)
- Lesson reader → Progress storage: records progress (evidence: `components/LessonReader.tsx`)
- Lesson reader → Quiz interface: opens quiz (evidence: `components/LessonReader.tsx`)
- Learner → Course search: searches (evidence: `app/search/page.tsx`)
- Course search → Course catalog data: searches courses (evidence: `app/search/page.tsx`)
- Learner → Progress dashboard: reviews progress (evidence: `app/progress/page.tsx`)
- Progress dashboard → Progress storage: reads activity (evidence: `app/progress/page.tsx`)
- Learner → Settings page: changes settings (evidence: `app/settings/page.tsx`)
- Settings page → Settings and reminders: saves settings (evidence: `app/settings/page.tsx`)
- Learner → Quiz interface: takes quiz
- Quiz interface → Quiz endpoint: requests quiz
- Quiz endpoint → Gemini AI: generates questions (evidence: `app/api/quiz/route.ts`)
- App shell → Mobile navigation: renders layout (evidence: `app/layout.tsx`)
- App shell → Reminder manager: mounts manager (evidence: `app/layout.tsx`)
- Reminder manager → Settings and reminders: arms reminders (evidence: `components/ReminderManager.tsx`)
- Settings page → Notification service worker: registers worker
- Settings and reminders → Notification service worker: shows notifications
