# forkship/forkathon2026-team-code_and_caffeine architecture

> Architecture diagram of the GitHub repository forkship/forkathon2026-team-code_and_caffeine, 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/forkship/forkathon2026-team-code_and_caffeine
- Repository: https://github.com/forkship/forkathon2026-team-code_and_caffeine

## Overview

CampusPulse is a role-aware campus announcement inbox. Users authenticate, set profile and topic preferences, then receive a matched announcement feed; publishers create targeted or scheduled notices, with live delivery, acknowledgments, and a daily digest. The README documents bookmarking, calendar export, and push notifications as additional capabilities. Source excerpts show selected backend and browser behavior, but not the full routing, scheduling, or persistence implementation; those limits are reflected by omitting uncertain edges.

Main entry points: [`public/app.js`](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/app.js) (CampusPulse interface), [`app.py`](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py) (Announcement management), [`public/sw.js`](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/sw.js) (Push display)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser experience"]
  node_webapp["CampusPulse interface<br/>[app.js]"]
end

subgraph group_server["Application backend"]
  node_auth["Account access<br/>[app.py]"]
  node_preferences["Profile preferences<br/>[app.py]"]
  node_announcements["Announcement management<br/>[app.py]"]
  node_matching["Audience matching<br/>[app.py]"]
  node_digest["Morning digest<br/>[app.py]"]
  node_acknowledgment["Acknowledgment tracking<br/>[app.py]"]
  node_calendar["Calendar export<br/>[app.py]"]
end

subgraph group_delivery["Notification delivery"]
  node_websocket["WebSocket delivery<br/>[app.py]"]
  node_push["Push subscriptions<br/>[app.py]"]
  node_serviceworker["Push display<br/>[sw.js]"]
end

subgraph group_state["User and notice state"]
  node_database[("SQLite database<br/>[app.py]")]
end

node_student(("Campus user"))
node_publisher(("Notice publisher"))
node_browser(("Browser notifications"))

node_student -->|"uses"| node_webapp
node_publisher -->|"publishes"| node_webapp
node_webapp -->|"authenticates"| node_auth
node_auth -->|"reads users"| node_database
node_webapp -->|"requests feed"| node_announcements
node_announcements -->|"reads notices"| node_database
node_announcements -->|"filters audience"| node_matching
node_matching -->|"checks topics"| node_preferences
node_preferences -.->|"stores preferences"| node_database
node_webapp -->|"records seen"| node_acknowledgment
node_acknowledgment -.->|"records receipt"| node_database
node_webapp -->|"requests briefing"| node_digest
node_webapp -->|"exports deadline"| node_calendar
node_announcements -.->|"broadcasts notices"| node_websocket
node_websocket -->|"sends events"| node_webapp
node_webapp -->|"registers subscription"| node_push
node_push -.->|"delivers push"| node_serviceworker
node_serviceworker -->|"shows alert"| node_browser

click node_webapp "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/app.js"
click node_auth "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_preferences "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_announcements "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_matching "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_digest "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_acknowledgment "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_calendar "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_websocket "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_push "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py"
click node_serviceworker "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/sw.js"
click node_database "https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.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_webapp,node_student,node_browser toneBlue
class node_auth,node_preferences,node_announcements,node_matching,node_digest,node_acknowledgment,node_calendar toneAmber
class node_websocket,node_push,node_serviceworker toneMint
class node_database toneRose
class node_publisher toneIndigo
```

## Components

### Browser experience

- [CampusPulse interface](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/app.js): `public/app.js`

### Application backend

- [Account access](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Profile preferences](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Announcement management](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Audience matching](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Morning digest](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Acknowledgment tracking](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Calendar export](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`

### Notification delivery

- [WebSocket delivery](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Push subscriptions](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`
- [Push display](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/public/sw.js): `public/sw.js`

### User and notice state

- [SQLite database](https://github.com/forkship/forkathon2026-team-code_and_caffeine/blob/main/app.py): `app.py`

### Other components

- **Campus user**
- **Notice publisher**
- **Browser notifications**

## Connections

- Campus user → CampusPulse interface: uses (evidence: `README.md`)
- Notice publisher → CampusPulse interface: publishes (evidence: `README.md`)
- CampusPulse interface → Account access: authenticates (evidence: `public/app.js`)
- Account access → SQLite database: reads users (evidence: `app.py`)
- CampusPulse interface → Announcement management: requests feed (evidence: `public/app.js`)
- Announcement management → SQLite database: reads notices (evidence: `app.py`)
- Announcement management → Audience matching: filters audience (evidence: `app.py`)
- Audience matching → Profile preferences: checks topics (evidence: `README.md`)
- Profile preferences → SQLite database: stores preferences (evidence: `app.py`)
- CampusPulse interface → Acknowledgment tracking: records seen (evidence: `public/app.js`)
- Acknowledgment tracking → SQLite database: records receipt (evidence: `app.py`)
- CampusPulse interface → Morning digest: requests briefing (evidence: `public/app.js`)
- CampusPulse interface → Calendar export: exports deadline (evidence: `README.md`)
- Announcement management → WebSocket delivery: broadcasts notices (evidence: `app.py`)
- WebSocket delivery → CampusPulse interface: sends events (evidence: `public/app.js`)
- CampusPulse interface → Push subscriptions: registers subscription (evidence: `public/app.js`)
- Push subscriptions → Push display: delivers push
- Push display → Browser notifications: shows alert (evidence: `public/sw.js`)
