# colinchristianson/hold architecture

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

- Interactive diagram: https://gitdiagram.com/colinchristianson/hold
- Repository: https://github.com/colinchristianson/hold

## Overview

Hold is a Flask office-hours booking board: students register or sign in, browse and hold TA slots, then view, cancel, or transfer bookings; TAs post slots and review their schedules. The route handlers in app.py orchestrate these workflows, render Jinja pages, and read or write SQLite through db.py. The README documents device handoff via a session link. The excerpts show only parts of app.py, so unsampled route relationships are included only where documented by the README.

Main entry points: [`db.py`](https://github.com/colinchristianson/hold/blob/Main/db.py) (SQLite Access), [`app.py`](https://github.com/colinchristianson/hold/blob/Main/app.py) (Account Routes), [`templates/mine.html`](https://github.com/colinchristianson/hold/blob/Main/templates/mine.html) (My Bookings Page), [`seed.py`](https://github.com/colinchristianson/hold/blob/Main/seed.py) (Demo Data Seed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_identity["Accounts &amp; Sessions"]
  node_account_routes["Account Routes<br/>[app.py]"]
  node_session_routes["Session Handoff<br/>[app.py]"]
end

subgraph group_booking["Slots &amp; Bookings"]
  node_public_board["Public Slot Board<br/>[app.py]"]
  node_slot_management["TA Slot Management<br/>[app.py]"]
  node_booking_actions["Booking Actions<br/>[app.py]"]
  node_booking_details["Booking Details<br/>[app.py]"]
end

subgraph group_storage["Persistence"]
  node_sqlite_access["SQLite Access<br/>[db.py]"]
  node_officehours_db[("Office Hours Data")]
  node_demo_seed["Demo Data Seed<br/>[seed.py]"]
end

subgraph group_ui["Web Views"]
  node_account_pages["Account Pages<br/>[login.html]"]
  node_registration_page["Registration Page<br/>[register.html]"]
  node_home_page["Public Board Page<br/>[home.html]"]
  node_slot_form["New Slot Page<br/>[new_slot.html]"]
  node_booking_page["Booking Page<br/>[booking.html]"]
  node_student_bookings_page["My Bookings Page<br/>[mine.html]"]
  node_ta_schedule_page["TA Schedule Page<br/>[ta_schedule.html]"]
end

node_student_ta(("Students and TAs"))

node_student_ta -->|"registers or signs in"| node_account_routes
node_account_routes -->|"checks or creates accounts"| node_sqlite_access
node_account_routes -->|"renders sign-in"| node_account_pages
node_account_routes -->|"renders registration"| node_registration_page
node_student_ta -->|"returns with cookie or link"| node_session_routes
node_session_routes -->|"looks up session"| node_sqlite_access
node_session_routes -->|"persists session"| node_officehours_db
node_student_ta -->|"browses slots"| node_public_board
node_public_board -->|"queries upcoming slots"| node_sqlite_access
node_public_board -->|"renders board"| node_home_page
node_student_ta -->|"posts slots"| node_slot_management
node_slot_management -->|"writes slots"| node_sqlite_access
node_slot_management -->|"renders slot form"| node_slot_form
node_student_ta -->|"holds, cancels, transfers"| node_booking_actions
node_booking_actions -->|"changes bookings"| node_sqlite_access
node_student_ta -->|"opens booking detail"| node_booking_details
node_booking_details -->|"queries booking"| node_sqlite_access
node_booking_details -->|"shows booking and note"| node_booking_page
node_student_ta -->|"views own bookings"| node_student_bookings_page
node_student_bookings_page -->|"loads bookings"| node_sqlite_access
node_student_ta -->|"reviews booked slots"| node_ta_schedule_page
node_ta_schedule_page -->|"loads TA schedule"| node_sqlite_access
node_sqlite_access -->|"reads and writes"| node_officehours_db
node_demo_seed -->|"creates demo records"| node_sqlite_access
node_account_routes -->|"initializes demo data"| node_demo_seed
node_student_bookings_page -->|"offers handoff link"| node_home_page

click node_account_routes "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_session_routes "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_public_board "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_slot_management "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_booking_actions "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_booking_details "https://github.com/colinchristianson/hold/blob/Main/app.py"
click node_sqlite_access "https://github.com/colinchristianson/hold/blob/Main/db.py"
click node_officehours_db "https://github.com/colinchristianson/hold/tree/Main/data"
click node_demo_seed "https://github.com/colinchristianson/hold/blob/Main/seed.py"
click node_account_pages "https://github.com/colinchristianson/hold/blob/Main/templates/login.html"
click node_registration_page "https://github.com/colinchristianson/hold/blob/Main/templates/register.html"
click node_home_page "https://github.com/colinchristianson/hold/blob/Main/templates/home.html"
click node_slot_form "https://github.com/colinchristianson/hold/blob/Main/templates/new_slot.html"
click node_booking_page "https://github.com/colinchristianson/hold/blob/Main/templates/booking.html"
click node_student_bookings_page "https://github.com/colinchristianson/hold/blob/Main/templates/mine.html"
click node_ta_schedule_page "https://github.com/colinchristianson/hold/blob/Main/templates/ta_schedule.html"

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_account_routes,node_session_routes toneBlue
class node_public_board,node_slot_management,node_booking_actions,node_booking_details toneAmber
class node_sqlite_access,node_officehours_db,node_demo_seed toneMint
class node_account_pages,node_registration_page,node_home_page,node_slot_form,node_booking_page,node_student_bookings_page,node_ta_schedule_page toneRose
class node_student_ta toneIndigo
```

## Components

### Accounts & Sessions

- [Account Routes](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`
- [Session Handoff](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`

### Slots & Bookings

- [Public Slot Board](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`
- [TA Slot Management](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`
- [Booking Actions](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`
- [Booking Details](https://github.com/colinchristianson/hold/blob/Main/app.py): `app.py`

### Persistence

- [SQLite Access](https://github.com/colinchristianson/hold/blob/Main/db.py): `db.py`
- [Office Hours Data](https://github.com/colinchristianson/hold/tree/Main/data): `data`
- [Demo Data Seed](https://github.com/colinchristianson/hold/blob/Main/seed.py): `seed.py`

### Web Views

- [Account Pages](https://github.com/colinchristianson/hold/blob/Main/templates/login.html): `templates/login.html`
- [Registration Page](https://github.com/colinchristianson/hold/blob/Main/templates/register.html): `templates/register.html`
- [Public Board Page](https://github.com/colinchristianson/hold/blob/Main/templates/home.html): `templates/home.html`
- [New Slot Page](https://github.com/colinchristianson/hold/blob/Main/templates/new_slot.html): `templates/new_slot.html`
- [Booking Page](https://github.com/colinchristianson/hold/blob/Main/templates/booking.html): `templates/booking.html`
- [My Bookings Page](https://github.com/colinchristianson/hold/blob/Main/templates/mine.html): `templates/mine.html`
- [TA Schedule Page](https://github.com/colinchristianson/hold/blob/Main/templates/ta_schedule.html): `templates/ta_schedule.html`

### Other components

- **Students and TAs**

## Connections

- Students and TAs → Account Routes: registers or signs in (evidence: `README.md`)
- Account Routes → SQLite Access: checks or creates accounts (evidence: `app.py`)
- Account Routes → Account Pages: renders sign-in (evidence: `app.py`)
- Account Routes → Registration Page: renders registration (evidence: `README.md`)
- Students and TAs → Session Handoff: returns with cookie or link (evidence: `README.md`)
- Session Handoff → SQLite Access: looks up session (evidence: `app.py`)
- Session Handoff → Office Hours Data: persists session (evidence: `app.py`)
- Students and TAs → Public Slot Board: browses slots (evidence: `README.md`)
- Public Slot Board → SQLite Access: queries upcoming slots (evidence: `app.py`)
- Public Slot Board → Public Board Page: renders board (evidence: `README.md`)
- Students and TAs → TA Slot Management: posts slots (evidence: `README.md`)
- TA Slot Management → SQLite Access: writes slots (evidence: `app.py`)
- TA Slot Management → New Slot Page: renders slot form (evidence: `app.py`)
- Students and TAs → Booking Actions: holds, cancels, transfers (evidence: `README.md`)
- Booking Actions → SQLite Access: changes bookings (evidence: `app.py`)
- Students and TAs → Booking Details: opens booking detail (evidence: `README.md`)
- Booking Details → SQLite Access: queries booking (evidence: `app.py`)
- Booking Details → Booking Page: shows booking and note (evidence: `README.md`)
- Students and TAs → My Bookings Page: views own bookings (evidence: `README.md`)
- My Bookings Page → SQLite Access: loads bookings
- Students and TAs → TA Schedule Page: reviews booked slots (evidence: `README.md`)
- TA Schedule Page → SQLite Access: loads TA schedule
- SQLite Access → Office Hours Data: reads and writes (evidence: `db.py`)
- Demo Data Seed → SQLite Access: creates demo records (evidence: `seed.py`)
- Account Routes → Demo Data Seed: initializes demo data (evidence: `app.py`)
- My Bookings Page → Public Board Page: offers handoff link (evidence: `README.md`)
