# 2117duppy/feedboard architecture

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

- Interactive diagram: https://gitdiagram.com/2117duppy/feedboard
- Repository: https://github.com/2117duppy/feedboard

## Overview

This is a small Flask message-board app: users view messages, add or delete them, and see a live-session count and a randomly selected joke. Flask routes coordinate session tracking, joke selection, template rendering, and MySQL access. The source excerpt supports those app-level calls; template interactions and deployment wiring are not shown, so they are not mapped.

Main entry points: [`app.py`](https://github.com/2117duppy/feedboard/blob/main/app.py) (Flask routes), [`templates/index.html`](https://github.com/2117duppy/feedboard/blob/main/templates/index.html) (Message page), [`sql/init.sql`](https://github.com/2117duppy/feedboard/blob/main/sql/init.sql) (MySQL messages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_routes["Flask routes<br/>[app.py]"]
  node_page["Message page<br/>[index.html]"]
  node_jokes["Joke selector<br/>[app.py]"]
end

subgraph group_state["State and data"]
  node_sessions["Session tracker<br/>[app.py]"]
  node_mysql[("MySQL messages<br/>[init.sql]")]
end

node_user(("User"))

node_user -->|"sends requests"| node_routes
node_routes -->|"tracks sessions"| node_sessions
node_routes -->|"reads and writes"| node_mysql
node_routes -->|"selects joke"| node_jokes
node_routes -->|"renders page"| node_page

click node_routes "https://github.com/2117duppy/feedboard/blob/main/app.py"
click node_page "https://github.com/2117duppy/feedboard/blob/main/templates/index.html"
click node_sessions "https://github.com/2117duppy/feedboard/blob/main/app.py"
click node_jokes "https://github.com/2117duppy/feedboard/blob/main/app.py"
click node_mysql "https://github.com/2117duppy/feedboard/blob/main/sql/init.sql"

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_routes,node_page,node_jokes,node_user toneBlue
class node_sessions,node_mysql toneAmber
```

## Components

### Web application

- [Flask routes](https://github.com/2117duppy/feedboard/blob/main/app.py): `app.py`
- [Message page](https://github.com/2117duppy/feedboard/blob/main/templates/index.html): `templates/index.html`
- [Joke selector](https://github.com/2117duppy/feedboard/blob/main/app.py): `app.py`

### State and data

- [Session tracker](https://github.com/2117duppy/feedboard/blob/main/app.py): `app.py`
- [MySQL messages](https://github.com/2117duppy/feedboard/blob/main/sql/init.sql): `sql/init.sql`

### Other components

- **User**

## Connections

- User → Flask routes: sends requests (evidence: `app.py`)
- Flask routes → Session tracker: tracks sessions (evidence: `app.py`)
- Flask routes → MySQL messages: reads and writes (evidence: `app.py`)
- Flask routes → Joke selector: selects joke (evidence: `app.py`)
- Flask routes → Message page: renders page (evidence: `app.py`)
