# osutitanic/stern architecture

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

- Interactive diagram: https://gitdiagram.com/osutitanic/stern
- Repository: https://github.com/osutitanic/stern

## Overview

Stern is Titanic!’s deprecated Flask frontend: visitors browse public game and community pages, while signed-in users manage accounts and participate in forums. The application registers route blueprints and establishes session and login handling; route handlers then serve domain-specific pages and actions. The tree also shows a wiki rendering subsystem and browser-side interactions. Sampled code supports specific account, forum, rankings, and wiki data flows, but many route implementations and shared Titanic! services were not included, so uncertain wiring is omitted.

Main entry points: [`app/app.py`](https://github.com/osutitanic/stern/blob/main/app/app.py) (Flask application), [`app/routes/__init__.py`](https://github.com/osutitanic/stern/blob/main/app/routes/__init__.py) (Route blueprints), [`app/routes/account/register.py`](https://github.com/osutitanic/stern/blob/main/app/routes/account/register.py) (Registration), [`app/routes/public`](https://github.com/osutitanic/stern/tree/main/app/routes/public) (Public routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask application<br/>[app.py]"]
  node_blueprints["Route blueprints<br/>[__init__.py]"]
  node_auth["Login and errors<br/>[handlers.py]"]
  node_browser["Browser interactions<br/>[main.js]"]
end

subgraph group_accounts["Accounts"]
  node_account_routes["Account routes"]
  node_registration["Registration<br/>[register.py]"]
  node_account_service["Session accounts<br/>[accounts.py]"]
end

subgraph group_community["Community"]
  node_forum_routes["Forum routes"]
  node_forum_posts["Post actions<br/>[post.py]"]
  node_rankings["Player rankings<br/>[rankings.py]"]
end

subgraph group_content["Game content"]
  node_public_routes["Public routes"]
  node_wiki_routes["Wiki pages<br/>[wiki.py]"]
  node_wiki_engine["Wiki engine<br/>[engine.py]"]
  node_wiki_processing["Markdown processing<br/>[processor.py]"]
end

node_visitor(("Visitor"))
node_member(("Signed-in member"))
node_titanic_store[("Titanic! data services")]
node_wiki_source["Wiki Markdown source"]
node_captcha["reCAPTCHA"]

node_visitor -->|"requests pages"| node_flask
node_member -->|"requests actions"| node_flask
node_flask -->|"registers"| node_blueprints
node_flask -->|"configures login"| node_auth
node_blueprints -->|"registers"| node_account_routes
node_blueprints -->|"registers"| node_forum_routes
node_blueprints -->|"registers"| node_public_routes
node_account_routes -->|"includes"| node_registration
node_auth -->|"validates sessions"| node_account_service
node_account_service -->|"loads users"| node_titanic_store
node_registration -->|"creates account data"| node_titanic_store
node_registration -.->|"verifies response"| node_captcha
node_forum_routes -->|"includes"| node_forum_posts
node_forum_posts -->|"reads and writes posts"| node_titanic_store
node_rankings -->|"loads ranking data"| node_titanic_store
node_public_routes -->|"includes"| node_rankings
node_public_routes -->|"includes"| node_wiki_routes
node_wiki_engine -->|"reads and writes pages"| node_titanic_store
node_wiki_engine -->|"fetches Markdown"| node_wiki_source
node_browser -->|"sends API requests"| node_flask

click node_flask "https://github.com/osutitanic/stern/blob/main/app/app.py"
click node_blueprints "https://github.com/osutitanic/stern/blob/main/app/routes/__init__.py"
click node_auth "https://github.com/osutitanic/stern/blob/main/app/handlers.py"
click node_browser "https://github.com/osutitanic/stern/blob/main/app/static/js/main.js"
click node_account_routes "https://github.com/osutitanic/stern/tree/main/app/routes/account"
click node_registration "https://github.com/osutitanic/stern/blob/main/app/routes/account/register.py"
click node_account_service "https://github.com/osutitanic/stern/blob/main/app/accounts.py"
click node_forum_routes "https://github.com/osutitanic/stern/tree/main/app/routes/forum"
click node_forum_posts "https://github.com/osutitanic/stern/blob/main/app/routes/forum/post.py"
click node_rankings "https://github.com/osutitanic/stern/blob/main/app/routes/public/rankings.py"
click node_public_routes "https://github.com/osutitanic/stern/tree/main/app/routes/public"
click node_wiki_routes "https://github.com/osutitanic/stern/blob/main/app/routes/public/wiki.py"
click node_wiki_engine "https://github.com/osutitanic/stern/blob/main/app/wiki/engine.py"
click node_wiki_processing "https://github.com/osutitanic/stern/blob/main/app/wiki/processor.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_flask,node_blueprints,node_auth,node_browser toneBlue
class node_account_routes,node_registration,node_account_service,node_titanic_store toneAmber
class node_forum_routes,node_forum_posts,node_rankings toneMint
class node_public_routes,node_wiki_routes,node_wiki_engine,node_wiki_processing toneRose
class node_visitor,node_member,node_wiki_source,node_captcha toneIndigo
```

## Components

### Web application

- [Flask application](https://github.com/osutitanic/stern/blob/main/app/app.py): `app/app.py`
- [Route blueprints](https://github.com/osutitanic/stern/blob/main/app/routes/__init__.py): `app/routes/__init__.py`
- [Login and errors](https://github.com/osutitanic/stern/blob/main/app/handlers.py): `app/handlers.py`
- [Browser interactions](https://github.com/osutitanic/stern/blob/main/app/static/js/main.js): `app/static/js/main.js`

### Accounts

- [Account routes](https://github.com/osutitanic/stern/tree/main/app/routes/account): `app/routes/account`
- [Registration](https://github.com/osutitanic/stern/blob/main/app/routes/account/register.py): `app/routes/account/register.py`
- [Session accounts](https://github.com/osutitanic/stern/blob/main/app/accounts.py): `app/accounts.py`

### Community

- [Forum routes](https://github.com/osutitanic/stern/tree/main/app/routes/forum): `app/routes/forum`
- [Post actions](https://github.com/osutitanic/stern/blob/main/app/routes/forum/post.py): `app/routes/forum/post.py`
- [Player rankings](https://github.com/osutitanic/stern/blob/main/app/routes/public/rankings.py): `app/routes/public/rankings.py`

### Game content

- [Public routes](https://github.com/osutitanic/stern/tree/main/app/routes/public): `app/routes/public`
- [Wiki pages](https://github.com/osutitanic/stern/blob/main/app/routes/public/wiki.py): `app/routes/public/wiki.py`
- [Wiki engine](https://github.com/osutitanic/stern/blob/main/app/wiki/engine.py): `app/wiki/engine.py`
- [Markdown processing](https://github.com/osutitanic/stern/blob/main/app/wiki/processor.py): `app/wiki/processor.py`

### Other components

- **Visitor**
- **Signed-in member**
- **Titanic! data services**
- **Wiki Markdown source**
- **reCAPTCHA**

## Connections

- Visitor → Flask application: requests pages
- Signed-in member → Flask application: requests actions
- Flask application → Route blueprints: registers
- Flask application → Login and errors: configures login
- Route blueprints → Account routes: registers
- Route blueprints → Forum routes: registers
- Route blueprints → Public routes: registers
- Account routes → Registration: includes
- Login and errors → Session accounts: validates sessions
- Session accounts → Titanic! data services: loads users
- Registration → Titanic! data services: creates account data
- Registration → reCAPTCHA: verifies response
- Forum routes → Post actions: includes
- Post actions → Titanic! data services: reads and writes posts
- Player rankings → Titanic! data services: loads ranking data
- Public routes → Player rankings: includes
- Public routes → Wiki pages: includes
- Wiki engine → Titanic! data services: reads and writes pages
- Wiki engine → Wiki Markdown source: fetches Markdown
- Browser interactions → Flask application: sends API requests
