# ryannpy/yourdeadlines architecture

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

- Interactive diagram: https://gitdiagram.com/ryannpy/yourdeadlines
- Repository: https://github.com/ryannpy/yourdeadlines

## Overview

YourDeadline is a student academic-planning app: users manage semesters and courses, then track deadlines, schedules, attendance, and course files. Protected pages provide the workspace, with server actions representing mutations and Supabase providing authentication and persistence. The tree documents the feature areas, but most page and action implementations were not sampled, so their detailed call and storage links are omitted; the schedule page, forms, authentication flow, and middleware are connected only where source excerpts support the relationship.

Main entry points: [`src/app/(protected)/schedule/page.tsx`](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/schedule/page.tsx) (Schedule View), [`src/middleware.ts`](https://github.com/ryannpy/yourdeadlines/blob/main/src/middleware.ts) (Route Guard), [`src/app/actions/auth.ts`](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/auth.ts) (Sign-out Action), [`src/lib/supabase/client.ts`](https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/client.ts) (Browser Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Navigation"]
  node_middleware["Route Guard<br/>[middleware.ts]"]
  node_session["Session Refresh<br/>[middleware.ts]"]
  node_navigation["Workspace Navigation<br/>[Navigation.tsx]"]
  node_auth["Sign-out Action<br/>[auth.ts]"]
  node_register["Registration<br/>[page.tsx]"]
end

subgraph group_planning["Academic Planning"]
  node_semesters["Semester Management<br/>[page.tsx]"]
  node_courses["Course Management<br/>[page.tsx]"]
  node_schedule["Schedule View<br/>[page.tsx]"]
  node_scheduleform["Schedule Editor<br/>[ScheduleForm.tsx]"]
  node_scheduleactions["Schedule Actions<br/>[schedules.ts]"]
  node_recurrence["Recurrence Helpers<br/>[recurrence.ts]"]
end

subgraph group_tracking["Study Tracking"]
  node_dashboard["Dashboard<br/>[page.tsx]"]
  node_deadlines["Deadline Tracking<br/>[page.tsx]"]
  node_deadlineactions["Deadline Actions<br/>[deadlines.ts]"]
  node_attendance["Attendance Tracking<br/>[page.tsx]"]
  node_attendanceactions["Attendance Actions<br/>[attendance.ts]"]
  node_files["Course Files<br/>[page.tsx]"]
  node_fileform["File Editor<br/>[FileForm.tsx]"]
  node_fileactions["File Actions<br/>[files.ts]"]
end

subgraph group_platform["Backend Services"]
  node_browserclient["Browser Client<br/>[client.ts]"]
  node_serverclient["Server Client<br/>[server.ts]"]
  node_supabase[("Supabase")]
end

node_user(("Student"))

node_user -->|"requests"| node_middleware
node_middleware -->|"refreshes session"| node_session
node_navigation -->|"signs out"| node_auth
node_register -->|"creates client"| node_browserclient
node_browserclient -->|"authenticates"| node_supabase
node_schedule -->|"creates client"| node_serverclient
node_schedule -->|"uses dates"| node_recurrence
node_scheduleform -->|"creates or updates"| node_scheduleactions
node_fileform -->|"creates or updates"| node_fileactions
node_auth -->|"creates client"| node_serverclient

click node_middleware "https://github.com/ryannpy/yourdeadlines/blob/main/src/middleware.ts"
click node_session "https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/middleware.ts"
click node_navigation "https://github.com/ryannpy/yourdeadlines/blob/main/src/components/layout/Navigation.tsx"
click node_auth "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/auth.ts"
click node_register "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/register/page.tsx"
click node_semesters "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/semesters/page.tsx"
click node_courses "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/semesters/%5Bid%5D/courses/page.tsx"
click node_schedule "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/schedule/page.tsx"
click node_scheduleform "https://github.com/ryannpy/yourdeadlines/blob/main/src/components/schedule/ScheduleForm.tsx"
click node_scheduleactions "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/schedules.ts"
click node_recurrence "https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/schedule/recurrence.ts"
click node_dashboard "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/dashboard/page.tsx"
click node_deadlines "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/deadlines/page.tsx"
click node_deadlineactions "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/deadlines.ts"
click node_attendance "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/attendance/page.tsx"
click node_attendanceactions "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/attendance.ts"
click node_files "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/files/page.tsx"
click node_fileform "https://github.com/ryannpy/yourdeadlines/blob/main/src/components/files/FileForm.tsx"
click node_fileactions "https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/files.ts"
click node_browserclient "https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/client.ts"
click node_serverclient "https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/server.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_middleware,node_session,node_navigation,node_auth,node_register toneBlue
class node_semesters,node_courses,node_schedule,node_scheduleform,node_scheduleactions,node_recurrence toneAmber
class node_dashboard,node_deadlines,node_deadlineactions,node_attendance,node_attendanceactions,node_files,node_fileform,node_fileactions toneMint
class node_browserclient,node_serverclient,node_supabase toneRose
class node_user toneIndigo
```

## Components

### Access and Navigation

- [Route Guard](https://github.com/ryannpy/yourdeadlines/blob/main/src/middleware.ts): `src/middleware.ts`
- [Session Refresh](https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/middleware.ts): `src/lib/supabase/middleware.ts`
- [Workspace Navigation](https://github.com/ryannpy/yourdeadlines/blob/main/src/components/layout/Navigation.tsx): `src/components/layout/Navigation.tsx`
- [Sign-out Action](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/auth.ts): `src/app/actions/auth.ts`
- [Registration](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/register/page.tsx): `src/app/register/page.tsx`

### Academic Planning

- [Semester Management](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/semesters/page.tsx): `src/app/(protected)/semesters/page.tsx`
- [Course Management](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/semesters/%5Bid%5D/courses/page.tsx): `src/app/(protected)/semesters/[id]/courses/page.tsx`
- [Schedule View](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/schedule/page.tsx): `src/app/(protected)/schedule/page.tsx`
- [Schedule Editor](https://github.com/ryannpy/yourdeadlines/blob/main/src/components/schedule/ScheduleForm.tsx): `src/components/schedule/ScheduleForm.tsx`
- [Schedule Actions](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/schedules.ts): `src/app/actions/schedules.ts`
- [Recurrence Helpers](https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/schedule/recurrence.ts): `src/lib/schedule/recurrence.ts`

### Study Tracking

- [Dashboard](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/dashboard/page.tsx): `src/app/(protected)/dashboard/page.tsx`
- [Deadline Tracking](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/deadlines/page.tsx): `src/app/(protected)/deadlines/page.tsx`
- [Deadline Actions](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/deadlines.ts): `src/app/actions/deadlines.ts`
- [Attendance Tracking](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/attendance/page.tsx): `src/app/(protected)/attendance/page.tsx`
- [Attendance Actions](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/attendance.ts): `src/app/actions/attendance.ts`
- [Course Files](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/(protected)/files/page.tsx): `src/app/(protected)/files/page.tsx`
- [File Editor](https://github.com/ryannpy/yourdeadlines/blob/main/src/components/files/FileForm.tsx): `src/components/files/FileForm.tsx`
- [File Actions](https://github.com/ryannpy/yourdeadlines/blob/main/src/app/actions/files.ts): `src/app/actions/files.ts`

### Backend Services

- [Browser Client](https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/client.ts): `src/lib/supabase/client.ts`
- [Server Client](https://github.com/ryannpy/yourdeadlines/blob/main/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- **Supabase**

### Other components

- **Student**

## Connections

- Student → Route Guard: requests
- Route Guard → Session Refresh: refreshes session
- Workspace Navigation → Sign-out Action: signs out
- Registration → Browser Client: creates client
- Browser Client → Supabase: authenticates
- Schedule View → Server Client: creates client
- Schedule View → Recurrence Helpers: uses dates
- Schedule Editor → Schedule Actions: creates or updates
- File Editor → File Actions: creates or updates
- Sign-out Action → Server Client: creates client
