# definitelynotlaw/cs3b-bulletin architecture

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

- Interactive diagram: https://gitdiagram.com/definitelynotlaw/cs3b-bulletin
- Repository: https://github.com/definitelynotlaw/cs3b-bulletin

## Overview

CS3B Bulletin is a PHP/MySQL class bulletin. Visitors browse and search announcements, view event dates and the officer directory, and submit acknowledgments or reports; authenticated staff create and schedule posts, manage their lifecycle, and administer reports and accounts. The graph separates public discovery, staff publishing and curation, identity, and feedback. MySQL is the shared persistence layer. Source excerpts establish only some endpoint-to-helper calls; documented but unsampled features are included without speculative edges.

Main entry points: [`config.php`](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/config.php) (PDO connection), [`functions.php`](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/functions.php) (Session and security), [`announcement_form.php`](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/announcement_form.php) (Announcement editor), [`profile.php`](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/profile.php) (Staff profiles)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public bulletin"]
  node_announcement_browse["Announcement browse<br/>[index.php]"]
  node_calendar["Event calendar<br/>[calendar.php]"]
  node_officer_directory["Officer directory<br/>[officers.php]"]
  node_archive_view["Public archive<br/>[index.php]"]
end

subgraph group_publishing["Publishing and curation"]
  node_editor["Announcement editor"]
  node_save_announcement["Save announcements"]
  node_staff_dashboard["Staff dashboard<br/>[dashboard.php]"]
  node_lifecycle_actions["Lifecycle management"]
  node_revision_history["Revision history"]
  node_revision_restore["Revision restore"]
  node_pinning["Announcement pinning"]
end

subgraph group_identity["Staff identity"]
  node_login["Staff login<br/>[login.php]"]
  node_profile["Staff profiles<br/>[profile.php]"]
  node_password["Password management"]
end

subgraph group_feedback["Community feedback"]
  node_report_form["Problem report form<br/>[report.php]"]
  node_report_submit["Report submission<br/>[submit_report.php]"]
  node_acknowledgment["Visitor acknowledgments<br/>[acknowledge.php]"]
  node_votes["Announcement votes<br/>[upvote.php]"]
end

subgraph group_shared["Shared runtime"]
  node_pdo["PDO connection<br/>[config.php]"]
  node_security_helpers["Session and security<br/>[functions.php]"]
  node_mysql[("MySQL database<br/>[database.sql]")]
  node_upload_store[("Uploaded media")]
end

node_visitor(("Visitor"))
node_staff(("Staff"))
node_email_service["Email service"]

node_visitor -->|"browses"| node_announcement_browse
node_visitor -->|"views dates"| node_calendar
node_visitor -->|"views officers"| node_officer_directory
node_visitor -->|"browses archive"| node_archive_view
node_staff -->|"signs in"| node_login
node_staff -->|"creates or edits"| node_editor
node_staff -->|"manages posts"| node_staff_dashboard
node_staff -->|"updates profile"| node_profile
node_staff -->|"changes password"| node_password
node_visitor -->|"reports concern"| node_report_form
node_visitor -->|"acknowledges"| node_acknowledgment
node_visitor -.->|"votes"| node_votes
node_editor -->|"submits"| node_save_announcement
node_announcement_browse -->|"queries"| node_pdo
node_announcement_browse -->|"uses access helpers"| node_security_helpers
node_calendar -->|"queries"| node_pdo
node_calendar -->|"uses time helpers"| node_security_helpers
node_officer_directory -->|"queries"| node_pdo
node_editor -->|"loads announcement"| node_pdo
node_editor -->|"uses tag helpers"| node_security_helpers
node_save_announcement -->|"writes announcement"| node_pdo
node_save_announcement -->|"checks access and input"| node_security_helpers
node_staff_dashboard -->|"loads posts and reports"| node_pdo
node_lifecycle_actions -->|"changes lifecycle"| node_pdo
node_revision_history -->|"reads revisions"| node_pdo
node_revision_restore -->|"restores revision"| node_pdo
node_revision_restore -->|"uses revision helpers"| node_security_helpers
node_pinning -->|"updates pin"| node_pdo
node_login -->|"authenticates"| node_pdo
node_login -->|"uses session helpers"| node_security_helpers
node_profile -->|"reads and updates"| node_pdo
node_profile -->|"validates uploads"| node_security_helpers
node_report_form -->|"submits"| node_report_submit
node_report_submit -->|"stores report"| node_pdo
node_report_submit -->|"forwards report"| node_email_service
node_acknowledgment -->|"records response"| node_pdo
node_votes -->|"records vote"| node_pdo
node_pdo -->|"connects"| node_mysql
node_security_helpers -->|"stores uploads"| node_upload_store
node_profile -->|"stores photo"| node_upload_store

click node_announcement_browse "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/index.php"
click node_calendar "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/calendar.php"
click node_officer_directory "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/officers.php"
click node_archive_view "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/index.php"
click node_editor "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/announcement_form.php"
click node_save_announcement "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/save_announcement.php"
click node_staff_dashboard "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/dashboard.php"
click node_lifecycle_actions "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/archive_announcement.php"
click node_revision_history "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/announcement-history.php"
click node_revision_restore "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/restore-announcement.php"
click node_pinning "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/pin-announcement.php"
click node_login "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/login.php"
click node_profile "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/profile.php"
click node_password "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/change-password.php"
click node_report_form "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/report.php"
click node_report_submit "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/submit_report.php"
click node_acknowledgment "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/acknowledge.php"
click node_votes "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/upvote.php"
click node_pdo "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/config.php"
click node_security_helpers "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/functions.php"
click node_mysql "https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/database.sql"
click node_upload_store "https://github.com/definitelynotlaw/cs3b-bulletin/tree/main/uploads"

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_announcement_browse,node_calendar,node_officer_directory,node_archive_view toneBlue
class node_editor,node_save_announcement,node_staff_dashboard,node_lifecycle_actions,node_revision_history,node_revision_restore,node_pinning toneAmber
class node_login,node_profile,node_password toneMint
class node_report_form,node_report_submit,node_acknowledgment,node_votes toneRose
class node_pdo,node_security_helpers,node_mysql,node_upload_store,node_visitor,node_staff,node_email_service toneIndigo
```

## Components

### Public bulletin

- [Announcement browse](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/index.php): `index.php`
- [Event calendar](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/calendar.php): `calendar.php`
- [Officer directory](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/officers.php): `officers.php`
- [Public archive](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/index.php): `index.php`

### Publishing and curation

- [Announcement editor](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/announcement_form.php): `announcement_form.php`
- [Save announcements](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/save_announcement.php): `save_announcement.php`
- [Staff dashboard](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/dashboard.php): `dashboard.php`
- [Lifecycle management](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/archive_announcement.php): `archive_announcement.php`
- [Revision history](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/announcement-history.php): `announcement-history.php`
- [Revision restore](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/restore-announcement.php): `restore-announcement.php`
- [Announcement pinning](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/pin-announcement.php): `pin-announcement.php`

### Staff identity

- [Staff login](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/login.php): `login.php`
- [Staff profiles](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/profile.php): `profile.php`
- [Password management](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/change-password.php): `change-password.php`

### Community feedback

- [Problem report form](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/report.php): `report.php`
- [Report submission](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/submit_report.php): `submit_report.php`
- [Visitor acknowledgments](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/acknowledge.php): `acknowledge.php`
- [Announcement votes](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/upvote.php): `upvote.php`

### Shared runtime

- [PDO connection](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/config.php): `config.php`
- [Session and security](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/functions.php): `functions.php`
- [MySQL database](https://github.com/definitelynotlaw/cs3b-bulletin/blob/main/database.sql): `database.sql`
- [Uploaded media](https://github.com/definitelynotlaw/cs3b-bulletin/tree/main/uploads): `uploads`

### Other components

- **Visitor**
- **Staff**
- **Email service**

## Connections

- Visitor → Announcement browse: browses (evidence: `README.md`)
- Visitor → Event calendar: views dates (evidence: `README.md`)
- Visitor → Officer directory: views officers (evidence: `README.md`)
- Visitor → Public archive: browses archive (evidence: `README.md`)
- Staff → Staff login: signs in (evidence: `README.md`)
- Staff → Announcement editor: creates or edits (evidence: `README.md`)
- Staff → Staff dashboard: manages posts (evidence: `README.md`)
- Staff → Staff profiles: updates profile (evidence: `README.md`)
- Staff → Password management: changes password (evidence: `README.md`)
- Visitor → Problem report form: reports concern (evidence: `README.md`)
- Visitor → Visitor acknowledgments: acknowledges (evidence: `README.md`)
- Visitor → Announcement votes: votes
- Announcement editor → Save announcements: submits (evidence: `README.md`)
- Announcement browse → PDO connection: queries (evidence: `index.php`)
- Announcement browse → Session and security: uses access helpers (evidence: `index.php`)
- Event calendar → PDO connection: queries (evidence: `calendar.php`)
- Event calendar → Session and security: uses time helpers (evidence: `calendar.php`)
- Officer directory → PDO connection: queries (evidence: `officers.php`)
- Announcement editor → PDO connection: loads announcement (evidence: `announcement_form.php`)
- Announcement editor → Session and security: uses tag helpers (evidence: `announcement_form.php`)
- Save announcements → PDO connection: writes announcement (evidence: `save_announcement.php`)
- Save announcements → Session and security: checks access and input (evidence: `save_announcement.php`)
- Staff dashboard → PDO connection: loads posts and reports (evidence: `dashboard.php`)
- Lifecycle management → PDO connection: changes lifecycle (evidence: `README.md`)
- Revision history → PDO connection: reads revisions (evidence: `announcement-history.php`)
- Revision restore → PDO connection: restores revision (evidence: `restore-announcement.php`)
- Revision restore → Session and security: uses revision helpers (evidence: `restore-announcement.php`)
- Announcement pinning → PDO connection: updates pin (evidence: `pin-announcement.php`)
- Staff login → PDO connection: authenticates (evidence: `login.php`)
- Staff login → Session and security: uses session helpers (evidence: `login.php`)
- Staff profiles → PDO connection: reads and updates (evidence: `profile.php`)
- Staff profiles → Session and security: validates uploads (evidence: `profile.php`)
- Problem report form → Report submission: submits (evidence: `README.md`)
- Report submission → PDO connection: stores report (evidence: `submit_report.php`)
- Report submission → Email service: forwards report (evidence: `README.md`)
- Visitor acknowledgments → PDO connection: records response (evidence: `acknowledge.php`)
- Announcement votes → PDO connection: records vote (evidence: `upvote.php`)
- PDO connection → MySQL database: connects (evidence: `config.php`)
- Session and security → Uploaded media: stores uploads (evidence: `functions.php`)
- Staff profiles → Uploaded media: stores photo (evidence: `profile.php`)
