# donyon67k/syllabus-planner architecture

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

- Interactive diagram: https://gitdiagram.com/donyon67k/syllabus-planner
- Repository: https://github.com/donyon67k/syllabus-planner

## Overview

Lily is a student course and assignment planner. Its main workflow loads courses and items into a shared planner model, derives due dates, and presents work in Today and calendar views; users can edit items and courses. It also has syllabus-import, Canvas-sync, and AI-change API surfaces. The README is only the generic Next.js starter README, so those capabilities are inferred from the repository paths and component names. Unsampled API and settings behavior is shown without guessed connections.

Main entry points: [`app/(app)/today/page.tsx`](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/today/page.tsx) (Today dashboard), [`lib/usePlanner.ts`](https://github.com/donyon67k/syllabus-planner/blob/main/lib/usePlanner.ts) (Planner state), [`app/(app)/courses/[id]/page.tsx`](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/courses/%5Bid%5D/page.tsx) (Course detail), [`app/(app)/calendar/page.tsx`](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/calendar/page.tsx) (Calendar views)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Planning views"]
  node_today["Today dashboard<br/>[page.tsx]"]
  node_calendar["Calendar views<br/>[page.tsx]"]
  node_calendar_views["Day week month<br/>[CalendarViews.tsx]"]
  node_courses_page["Course list<br/>[page.tsx]"]
  node_course_detail["Course detail<br/>[page.tsx]"]
  node_settings["Settings<br/>[page.tsx]"]
  node_shell["App shell<br/>[AppShell.tsx]"]
  node_today_cards["Study summaries<br/>[TodayCards.tsx]"]
end

subgraph group_authoring["Course and item authoring"]
  node_course_form["Course form<br/>[CourseForm.tsx]"]
  node_syllabus_import["Syllabus import<br/>[SyllabusImport.tsx]"]
  node_item_editor["Item editor<br/>[ItemEditor.tsx]"]
  node_item_form["Item form<br/>[ItemForm.tsx]"]
  node_item_row["Item row<br/>[ItemRow.tsx]"]
  node_ask_bar["AI change prompt<br/>[AskBar.tsx]"]
end

subgraph group_services["Planner services"]
  node_planner["Planner state<br/>[usePlanner.ts]"]
  node_dates["Date calculations<br/>[dates.ts]"]
  node_ai_changes["Apply AI changes<br/>[aiChanges.ts]"]
  node_browser_db["Browser database client<br/>[client.ts]"]
  node_server_db["Server database client<br/>[server.ts]"]
  node_events["Change events<br/>[events.ts]"]
end

subgraph group_integrations["External integrations"]
  node_ai_route["AI change API<br/>[route.ts]"]
  node_parse_route["Syllabus parse API<br/>[route.ts]"]
  node_canvas_route["Canvas sync API<br/>[route.ts]"]
  node_supabase[("Supabase")]
  node_gemini["Gemini"]
end

node_student(("Student"))

node_student -->|"views today"| node_today
node_student -->|"opens calendar"| node_calendar
node_today -->|"loads items"| node_planner
node_calendar -->|"loads items"| node_planner
node_calendar -->|"renders views"| node_calendar_views
node_today -->|"renders summaries"| node_today_cards
node_course_detail -->|"renders form"| node_course_form
node_courses_page -->|"renders form"| node_course_form
node_course_detail -->|"offers import"| node_syllabus_import
node_course_detail -->|"opens editor"| node_item_editor
node_today -->|"opens editor"| node_item_editor
node_item_editor -->|"renders form"| node_item_form
node_today -->|"renders rows"| node_item_row
node_calendar_views -->|"renders rows"| node_item_row
node_planner -->|"queries data"| node_browser_db
node_planner -->|"derives due dates"| node_dates
node_ai_route -->|"loads user data"| node_server_db
node_ai_route -->|"requests changes"| node_gemini
node_ai_changes -->|"writes changes"| node_browser_db
node_ai_changes -->|"notifies changes"| node_events
node_browser_db -.->|"connects to"| node_supabase
node_server_db -.->|"connects to"| node_supabase

click node_today "https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/today/page.tsx"
click node_calendar "https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/calendar/page.tsx"
click node_calendar_views "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/CalendarViews.tsx"
click node_courses_page "https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/courses/page.tsx"
click node_course_detail "https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/courses/%5Bid%5D/page.tsx"
click node_settings "https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/settings/page.tsx"
click node_shell "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/AppShell.tsx"
click node_course_form "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/CourseForm.tsx"
click node_syllabus_import "https://github.com/donyon67k/syllabus-planner/blob/main/components/SyllabusImport.tsx"
click node_item_editor "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemEditor.tsx"
click node_item_form "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemForm.tsx"
click node_item_row "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemRow.tsx"
click node_today_cards "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/TodayCards.tsx"
click node_ask_bar "https://github.com/donyon67k/syllabus-planner/blob/main/components/app/AskBar.tsx"
click node_planner "https://github.com/donyon67k/syllabus-planner/blob/main/lib/usePlanner.ts"
click node_dates "https://github.com/donyon67k/syllabus-planner/blob/main/lib/dates.ts"
click node_ai_changes "https://github.com/donyon67k/syllabus-planner/blob/main/lib/aiChanges.ts"
click node_ai_route "https://github.com/donyon67k/syllabus-planner/blob/main/app/api/ai-change/route.ts"
click node_parse_route "https://github.com/donyon67k/syllabus-planner/blob/main/app/api/parse-syllabus/route.ts"
click node_canvas_route "https://github.com/donyon67k/syllabus-planner/blob/main/app/api/canvas-sync/route.ts"
click node_browser_db "https://github.com/donyon67k/syllabus-planner/blob/main/lib/supabase/client.ts"
click node_server_db "https://github.com/donyon67k/syllabus-planner/blob/main/lib/supabase/server.ts"
click node_events "https://github.com/donyon67k/syllabus-planner/blob/main/lib/events.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_today,node_calendar,node_calendar_views,node_courses_page,node_course_detail,node_settings,node_shell,node_today_cards toneBlue
class node_course_form,node_syllabus_import,node_item_editor,node_item_form,node_item_row,node_ask_bar toneAmber
class node_planner,node_dates,node_ai_changes,node_browser_db,node_server_db,node_events toneMint
class node_ai_route,node_parse_route,node_canvas_route,node_supabase,node_gemini toneRose
class node_student toneIndigo
```

## Components

### Planning views

- [Today dashboard](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/today/page.tsx): `app/(app)/today/page.tsx`
- [Calendar views](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/calendar/page.tsx): `app/(app)/calendar/page.tsx`
- [Day week month](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/CalendarViews.tsx): `components/app/CalendarViews.tsx`
- [Course list](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/courses/page.tsx): `app/(app)/courses/page.tsx`
- [Course detail](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/courses/%5Bid%5D/page.tsx): `app/(app)/courses/[id]/page.tsx`
- [Settings](https://github.com/donyon67k/syllabus-planner/blob/main/app/(app)/settings/page.tsx): `app/(app)/settings/page.tsx`
- [App shell](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/AppShell.tsx): `components/app/AppShell.tsx`
- [Study summaries](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/TodayCards.tsx): `components/app/TodayCards.tsx`

### Course and item authoring

- [Course form](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/CourseForm.tsx): `components/app/CourseForm.tsx`
- [Syllabus import](https://github.com/donyon67k/syllabus-planner/blob/main/components/SyllabusImport.tsx): `components/SyllabusImport.tsx`
- [Item editor](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemEditor.tsx): `components/app/ItemEditor.tsx`
- [Item form](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemForm.tsx): `components/app/ItemForm.tsx`
- [Item row](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/ItemRow.tsx): `components/app/ItemRow.tsx`
- [AI change prompt](https://github.com/donyon67k/syllabus-planner/blob/main/components/app/AskBar.tsx): `components/app/AskBar.tsx`

### Planner services

- [Planner state](https://github.com/donyon67k/syllabus-planner/blob/main/lib/usePlanner.ts): `lib/usePlanner.ts`
- [Date calculations](https://github.com/donyon67k/syllabus-planner/blob/main/lib/dates.ts): `lib/dates.ts`
- [Apply AI changes](https://github.com/donyon67k/syllabus-planner/blob/main/lib/aiChanges.ts): `lib/aiChanges.ts`
- [Browser database client](https://github.com/donyon67k/syllabus-planner/blob/main/lib/supabase/client.ts): `lib/supabase/client.ts`
- [Server database client](https://github.com/donyon67k/syllabus-planner/blob/main/lib/supabase/server.ts): `lib/supabase/server.ts`
- [Change events](https://github.com/donyon67k/syllabus-planner/blob/main/lib/events.ts): `lib/events.ts`

### External integrations

- [AI change API](https://github.com/donyon67k/syllabus-planner/blob/main/app/api/ai-change/route.ts): `app/api/ai-change/route.ts`
- [Syllabus parse API](https://github.com/donyon67k/syllabus-planner/blob/main/app/api/parse-syllabus/route.ts): `app/api/parse-syllabus/route.ts`
- [Canvas sync API](https://github.com/donyon67k/syllabus-planner/blob/main/app/api/canvas-sync/route.ts): `app/api/canvas-sync/route.ts`
- **Supabase**
- **Gemini**

### Other components

- **Student**

## Connections

- Student → Today dashboard: views today
- Student → Calendar views: opens calendar
- Today dashboard → Planner state: loads items (evidence: `app/(app)/today/page.tsx`)
- Calendar views → Planner state: loads items (evidence: `app/(app)/calendar/page.tsx`)
- Calendar views → Day week month: renders views (evidence: `app/(app)/calendar/page.tsx`)
- Today dashboard → Study summaries: renders summaries (evidence: `app/(app)/today/page.tsx`)
- Course detail → Course form: renders form (evidence: `app/(app)/courses/[id]/page.tsx`)
- Course list → Course form: renders form (evidence: `app/(app)/courses/page.tsx`)
- Course detail → Syllabus import: offers import (evidence: `app/(app)/courses/[id]/page.tsx`)
- Course detail → Item editor: opens editor (evidence: `app/(app)/courses/[id]/page.tsx`)
- Today dashboard → Item editor: opens editor (evidence: `app/(app)/today/page.tsx`)
- Item editor → Item form: renders form (evidence: `components/app/ItemEditor.tsx`)
- Today dashboard → Item row: renders rows (evidence: `app/(app)/today/page.tsx`)
- Day week month → Item row: renders rows (evidence: `components/app/CalendarViews.tsx`)
- Planner state → Browser database client: queries data (evidence: `lib/usePlanner.ts`)
- Planner state → Date calculations: derives due dates (evidence: `lib/usePlanner.ts`)
- AI change API → Server database client: loads user data (evidence: `app/api/ai-change/route.ts`)
- AI change API → Gemini: requests changes (evidence: `app/api/ai-change/route.ts`)
- Apply AI changes → Browser database client: writes changes (evidence: `lib/aiChanges.ts`)
- Apply AI changes → Change events: notifies changes (evidence: `lib/aiChanges.ts`)
- Browser database client → Supabase: connects to
- Server database client → Supabase: connects to
