# stevenyonduan/deadlinesync architecture

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

- Interactive diagram: https://gitdiagram.com/stevenyonduan/deadlinesync
- Repository: https://github.com/stevenyonduan/deadlinesync

## Overview

DeadlineSync is a FastAPI deadline tracker. The visible workflow imports Canvas courses and assignments, stores assignments in SQLite, and exposes stored assignments through a dashboard route. Google sign-in is wired through session-backed routes; the README also describes a Bootstrap task interface and SendGrid reminders, though their implementation is not shown in the excerpts. The task routes and email service are present in the tree but empty in the excerpts, so their runtime connections are not established here.

Main entry points: [`app/main.py`](https://github.com/stevenyonduan/deadlinesync/blob/main/app/main.py) (FastAPI app), [`app/routes/canvas.py`](https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/canvas.py) (Canvas routes), [`app/database.py`](https://github.com/stevenyonduan/deadlinesync/blob/main/app/database.py) (SQLite database), [`app/routes/dashboard_routes.py`](https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/dashboard_routes.py) (Assignment listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application and auth"]
  node_app["FastAPI app<br/>[main.py]"]
  node_google_oauth["Google OAuth<br/>[google_oauth.py]"]
end

subgraph group_canvas["Canvas assignments"]
  node_canvas_routes["Canvas routes<br/>[canvas.py]"]
end

subgraph group_storage["Persistence"]
  node_assignment_model["Assignment model<br/>[assignment.py]"]
  node_user_model["User model<br/>[user.py]"]
  node_database[("SQLite database<br/>[database.py]")]
end

subgraph group_experience["Task experience"]
  node_dashboard_routes["Assignment listing"]
  node_task_routes["Task routes<br/>[tasks.py]"]
  node_schemas["Request schemas<br/>[schemas.py]"]
  node_templates["Web templates"]
end

subgraph group_reminders["Email reminders"]
  node_email_service["Email service<br/>[email.py]"]
end

node_user(("User"))
node_google["Google identity"]
node_canvas_service["Canvas API"]
node_sendgrid["SendGrid"]

node_user -->|"uses"| node_app
node_app -->|"uses OAuth"| node_google_oauth
node_google_oauth -->|"registers provider"| node_google
node_app -->|"mounts routes"| node_canvas_routes
node_app -->|"mounts routes"| node_dashboard_routes
node_canvas_routes -->|"fetches courses"| node_canvas_service
node_canvas_routes -->|"fetches assignments"| node_canvas_service
node_canvas_routes -->|"creates records"| node_assignment_model
node_canvas_routes -->|"queries and commits"| node_database
node_dashboard_routes -->|"queries records"| node_assignment_model
node_dashboard_routes -->|"opens session"| node_database
node_app -->|"creates tables"| node_database
node_assignment_model -->|"uses base"| node_database
node_user_model -->|"uses base"| node_database
node_user -.->|"views tasks"| node_templates
node_email_service -.->|"sends reminders"| node_sendgrid
node_app -.->|"schedules reminders"| node_email_service

click node_app "https://github.com/stevenyonduan/deadlinesync/blob/main/app/main.py"
click node_google_oauth "https://github.com/stevenyonduan/deadlinesync/blob/main/app/auth/google_oauth.py"
click node_canvas_routes "https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/canvas.py"
click node_assignment_model "https://github.com/stevenyonduan/deadlinesync/blob/main/app/models/assignment.py"
click node_user_model "https://github.com/stevenyonduan/deadlinesync/blob/main/app/models/user.py"
click node_database "https://github.com/stevenyonduan/deadlinesync/blob/main/app/database.py"
click node_dashboard_routes "https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/dashboard_routes.py"
click node_task_routes "https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/tasks.py"
click node_schemas "https://github.com/stevenyonduan/deadlinesync/blob/main/app/schemas.py"
click node_templates "https://github.com/stevenyonduan/deadlinesync/tree/main/app/templates"
click node_email_service "https://github.com/stevenyonduan/deadlinesync/blob/main/app/services/email.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_google_oauth,node_user toneBlue
class node_canvas_routes toneAmber
class node_assignment_model,node_user_model,node_database,node_canvas_service toneMint
class node_dashboard_routes,node_task_routes,node_schemas,node_templates toneRose
class node_email_service,node_google,node_sendgrid toneIndigo
```

## Components

### Application and auth

- [FastAPI app](https://github.com/stevenyonduan/deadlinesync/blob/main/app/main.py): `app/main.py`
- [Google OAuth](https://github.com/stevenyonduan/deadlinesync/blob/main/app/auth/google_oauth.py): `app/auth/google_oauth.py`

### Canvas assignments

- [Canvas routes](https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/canvas.py): `app/routes/canvas.py`

### Persistence

- [Assignment model](https://github.com/stevenyonduan/deadlinesync/blob/main/app/models/assignment.py): `app/models/assignment.py`
- [User model](https://github.com/stevenyonduan/deadlinesync/blob/main/app/models/user.py): `app/models/user.py`
- [SQLite database](https://github.com/stevenyonduan/deadlinesync/blob/main/app/database.py): `app/database.py`

### Task experience

- [Assignment listing](https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/dashboard_routes.py): `app/routes/dashboard_routes.py`
- [Task routes](https://github.com/stevenyonduan/deadlinesync/blob/main/app/routes/tasks.py): `app/routes/tasks.py`
- [Request schemas](https://github.com/stevenyonduan/deadlinesync/blob/main/app/schemas.py): `app/schemas.py`
- [Web templates](https://github.com/stevenyonduan/deadlinesync/tree/main/app/templates): `app/templates`

### Email reminders

- [Email service](https://github.com/stevenyonduan/deadlinesync/blob/main/app/services/email.py): `app/services/email.py`

### Other components

- **User**
- **Google identity**
- **Canvas API**
- **SendGrid**

## Connections

- User → FastAPI app: uses (evidence: `README.md`)
- FastAPI app → Google OAuth: uses OAuth (evidence: `app/main.py`)
- Google OAuth → Google identity: registers provider (evidence: `app/auth/google_oauth.py`)
- FastAPI app → Canvas routes: mounts routes (evidence: `app/main.py`)
- FastAPI app → Assignment listing: mounts routes (evidence: `app/main.py`)
- Canvas routes → Canvas API: fetches courses (evidence: `app/routes/canvas.py`)
- Canvas routes → Canvas API: fetches assignments (evidence: `app/routes/canvas.py`)
- Canvas routes → Assignment model: creates records (evidence: `app/routes/canvas.py`)
- Canvas routes → SQLite database: queries and commits (evidence: `app/routes/canvas.py`)
- Assignment listing → Assignment model: queries records (evidence: `app/routes/dashboard_routes.py`)
- Assignment listing → SQLite database: opens session (evidence: `app/routes/dashboard_routes.py`)
- FastAPI app → SQLite database: creates tables (evidence: `app/main.py`)
- Assignment model → SQLite database: uses base (evidence: `app/models/assignment.py`)
- User model → SQLite database: uses base (evidence: `app/models/user.py`)
- User → Web templates: views tasks (evidence: `README.md`)
- Email service → SendGrid: sends reminders (evidence: `README.md`)
- FastAPI app → Email service: schedules reminders (evidence: `README.md`)
