# johnrayyyy/bay-station architecture

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

- Interactive diagram: https://gitdiagram.com/johnrayyyy/bay-station
- Repository: https://github.com/johnrayyyy/bay-station

## Overview

The product is a unified Flask campus kiosk. Students and staff enter through the kiosk dashboard, then use LostLink to report or claim items, RGO to browse and order products, or Grievance to submit and track concerns; administrators manage each workflow. The app also documents a campus calendar and interactive map, plus a dashboard with cross-module statistics. The excerpts show module persistence patterns and the Grievance API’s placeholder behavior, but do not establish every registration, database binding, or notification path; uncertain connections are omitted.

Main entry points: [`app.py`](https://github.com/johnrayyyy/bay-station/blob/main/app.py) (Flask application), [`blueprints/lostlink_bp.py`](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/lostlink_bp.py) (Lost and found workflows), [`blueprints/grievance_bp.py`](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/grievance_bp.py) (Concern workflows), [`blueprints/rgo_bp.py`](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/rgo_bp.py) (Catalog and orders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Kiosk shell"]
  node_app["Flask application<br/>[app.py]"]
  node_dashboard["Unified dashboard<br/>[dashboard.html]"]
  node_calendar["Campus calendar<br/>[calendar.html]"]
  node_map["Campus map<br/>[map.html]"]
  node_extension["Database and mail extensions<br/>[extension.py]"]
end

subgraph group_lostlink["LostLink"]
  node_lostlink_module["Lost and found workflows<br/>[lostlink_bp.py]"]
  node_lostlink_ui["LostLink screens"]
  node_lostlink_db[("LostLink database<br/>[lostlink.db]")]
end

subgraph group_rgo["RGO commerce"]
  node_rgo_module["Catalog and orders<br/>[rgo_bp.py]"]
  node_rgo_ui["RGO screens"]
  node_rgo_db[("RGO database<br/>[rgo.db]")]
end

subgraph group_grievance["Grievance"]
  node_grievance_module["Concern workflows<br/>[grievance_bp.py]"]
  node_grievance_ui["Grievance screens"]
  node_grievance_db[("Grievance database<br/>[grievance.db]")]
  node_grievance_api["Grievance REST API<br/>[grievance_api.py]"]
end

node_visitor(("Campus user"))
node_email["Email service"]

node_visitor -->|"opens kiosk"| node_app
node_app -->|"serves dashboard"| node_dashboard
node_app -->|"serves calendar"| node_calendar
node_app -->|"serves map"| node_map
node_app -->|"routes to"| node_lostlink_module
node_app -->|"routes to"| node_rgo_module
node_app -->|"routes to"| node_grievance_module
node_visitor -->|"uses"| node_lostlink_ui
node_visitor -->|"uses"| node_rgo_ui
node_visitor -->|"uses"| node_grievance_ui
node_lostlink_module -->|"renders"| node_lostlink_ui
node_rgo_module -->|"renders"| node_rgo_ui
node_grievance_module -->|"renders"| node_grievance_ui
node_lostlink_module -->|"uses database"| node_extension
node_rgo_module -->|"uses database"| node_extension
node_grievance_module -->|"uses database"| node_extension
node_lostlink_module -.->|"persists reports"| node_lostlink_db
node_rgo_module -.->|"persists orders"| node_rgo_db
node_grievance_module -.->|"persists concerns"| node_grievance_db
node_app -->|"integrates API"| node_grievance_api
node_lostlink_module -.->|"sends notices"| node_email
node_grievance_module -.->|"sends notices"| node_email

click node_app "https://github.com/johnrayyyy/bay-station/blob/main/app.py"
click node_dashboard "https://github.com/johnrayyyy/bay-station/blob/main/templates/dashboard.html"
click node_calendar "https://github.com/johnrayyyy/bay-station/blob/main/templates/calendar.html"
click node_map "https://github.com/johnrayyyy/bay-station/blob/main/templates/map.html"
click node_extension "https://github.com/johnrayyyy/bay-station/blob/main/extension.py"
click node_lostlink_module "https://github.com/johnrayyyy/bay-station/blob/main/blueprints/lostlink_bp.py"
click node_lostlink_ui "https://github.com/johnrayyyy/bay-station/tree/main/templates/lostlink"
click node_lostlink_db "https://github.com/johnrayyyy/bay-station/blob/main/databases/lostlink.db"
click node_rgo_module "https://github.com/johnrayyyy/bay-station/blob/main/blueprints/rgo_bp.py"
click node_rgo_ui "https://github.com/johnrayyyy/bay-station/tree/main/templates/rgo"
click node_rgo_db "https://github.com/johnrayyyy/bay-station/blob/main/databases/rgo.db"
click node_grievance_module "https://github.com/johnrayyyy/bay-station/blob/main/blueprints/grievance_bp.py"
click node_grievance_ui "https://github.com/johnrayyyy/bay-station/tree/main/templates/grievance"
click node_grievance_db "https://github.com/johnrayyyy/bay-station/blob/main/databases/grievance.db"
click node_grievance_api "https://github.com/johnrayyyy/bay-station/blob/main/blueprints/grievance_api.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_dashboard,node_calendar,node_map,node_extension,node_visitor toneBlue
class node_lostlink_module,node_lostlink_ui,node_lostlink_db toneAmber
class node_rgo_module,node_rgo_ui,node_rgo_db toneMint
class node_grievance_module,node_grievance_ui,node_grievance_db,node_grievance_api toneRose
class node_email toneIndigo
```

## Components

### Kiosk shell

- [Flask application](https://github.com/johnrayyyy/bay-station/blob/main/app.py): `app.py`
- [Unified dashboard](https://github.com/johnrayyyy/bay-station/blob/main/templates/dashboard.html): `templates/dashboard.html`
- [Campus calendar](https://github.com/johnrayyyy/bay-station/blob/main/templates/calendar.html): `templates/calendar.html`
- [Campus map](https://github.com/johnrayyyy/bay-station/blob/main/templates/map.html): `templates/map.html`
- [Database and mail extensions](https://github.com/johnrayyyy/bay-station/blob/main/extension.py): `extension.py`

### LostLink

- [Lost and found workflows](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/lostlink_bp.py): `blueprints/lostlink_bp.py`
- [LostLink screens](https://github.com/johnrayyyy/bay-station/tree/main/templates/lostlink): `templates/lostlink`
- [LostLink database](https://github.com/johnrayyyy/bay-station/blob/main/databases/lostlink.db): `databases/lostlink.db`

### RGO commerce

- [Catalog and orders](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/rgo_bp.py): `blueprints/rgo_bp.py`
- [RGO screens](https://github.com/johnrayyyy/bay-station/tree/main/templates/rgo): `templates/rgo`
- [RGO database](https://github.com/johnrayyyy/bay-station/blob/main/databases/rgo.db): `databases/rgo.db`

### Grievance

- [Concern workflows](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/grievance_bp.py): `blueprints/grievance_bp.py`
- [Grievance screens](https://github.com/johnrayyyy/bay-station/tree/main/templates/grievance): `templates/grievance`
- [Grievance database](https://github.com/johnrayyyy/bay-station/blob/main/databases/grievance.db): `databases/grievance.db`
- [Grievance REST API](https://github.com/johnrayyyy/bay-station/blob/main/blueprints/grievance_api.py): `blueprints/grievance_api.py`

### Other components

- **Campus user**
- **Email service**

## Connections

- Campus user → Flask application: opens kiosk (evidence: `README.md`)
- Flask application → Unified dashboard: serves dashboard (evidence: `README.md`)
- Flask application → Campus calendar: serves calendar (evidence: `README.md`)
- Flask application → Campus map: serves map (evidence: `README.md`)
- Flask application → Lost and found workflows: routes to (evidence: `README.md`)
- Flask application → Catalog and orders: routes to (evidence: `README.md`)
- Flask application → Concern workflows: routes to (evidence: `README.md`)
- Campus user → LostLink screens: uses (evidence: `README.md`)
- Campus user → RGO screens: uses (evidence: `README.md`)
- Campus user → Grievance screens: uses (evidence: `README.md`)
- Lost and found workflows → LostLink screens: renders (evidence: `blueprints/lostlink_bp.py`)
- Catalog and orders → RGO screens: renders (evidence: `blueprints/rgo_bp.py`)
- Concern workflows → Grievance screens: renders (evidence: `blueprints/grievance_bp.py`)
- Lost and found workflows → Database and mail extensions: uses database (evidence: `blueprints/lostlink_bp.py`)
- Catalog and orders → Database and mail extensions: uses database (evidence: `blueprints/rgo_bp.py`)
- Concern workflows → Database and mail extensions: uses database (evidence: `blueprints/grievance_bp.py`)
- Lost and found workflows → LostLink database: persists reports
- Catalog and orders → RGO database: persists orders
- Concern workflows → Grievance database: persists concerns
- Flask application → Grievance REST API: integrates API (evidence: `app.py`)
- Lost and found workflows → Email service: sends notices
- Concern workflows → Email service: sends notices
