# chrisyonoiskandar-ctrl/midterm architecture

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

- Interactive diagram: https://gitdiagram.com/chrisyonoiskandar-ctrl/midterm
- Repository: https://github.com/chrisyonoiskandar-ctrl/midterm

## Overview

This is a small FastAPI article-submission and editorial-review application. Authors create or edit drafts, delete them, and submit them for review; editors can inspect pending submissions and approve or return them to editing. The single app.py module handles both workflows, renders the HTML templates, and reads or updates SQLite state. The template contents were not sampled, so their detailed presentation and form wiring are not represented.

Main entry points: [`app.py`](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/app.py) (Author workflow), [`submissions.db`](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/submissions.db) (Submissions database), [`templates/index.html`](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/index.html) (Home view), [`templates/author.html`](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/author.html) (Author view)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Submission workflow"]
  node_author_workflow["Author workflow<br/>[app.py]"]
  node_editor_review["Editorial review<br/>[app.py]"]
end

subgraph group_views["HTML views"]
  node_home_view["Home view<br/>[index.html]"]
  node_author_view["Author view<br/>[author.html]"]
  node_editor_view["Editor view<br/>[editor.html]"]
end

subgraph group_state["Persistence"]
  node_submissions_db[("Submissions database<br/>[submissions.db]")]
end

node_author(("Author"))
node_editor(("Editor"))

node_author -->|"uses"| node_author_workflow
node_editor -->|"uses"| node_editor_review
node_author_workflow -->|"reads and writes"| node_submissions_db
node_editor_review -->|"reads and updates"| node_submissions_db
node_author_workflow -->|"renders"| node_author_view
node_editor_review -->|"renders"| node_editor_view
node_author_workflow -->|"home renders"| node_home_view

click node_author_workflow "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/app.py"
click node_editor_review "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/app.py"
click node_home_view "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/index.html"
click node_author_view "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/author.html"
click node_editor_view "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/editor.html"
click node_submissions_db "https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/submissions.db"

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_author_workflow,node_editor_review toneBlue
class node_home_view,node_author_view,node_editor_view toneAmber
class node_submissions_db toneMint
class node_author,node_editor toneIndigo
```

## Components

### Submission workflow

- [Author workflow](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/app.py): `app.py`
- [Editorial review](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/app.py): `app.py`

### HTML views

- [Home view](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/index.html): `templates/index.html`
- [Author view](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/author.html): `templates/author.html`
- [Editor view](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/templates/editor.html): `templates/editor.html`

### Persistence

- [Submissions database](https://github.com/chrisyonoiskandar-ctrl/midterm/blob/main/submissions.db): `submissions.db`

### Other components

- **Author**
- **Editor**

## Connections

- Author → Author workflow: uses (evidence: `app.py`)
- Editor → Editorial review: uses (evidence: `app.py`)
- Author workflow → Submissions database: reads and writes (evidence: `app.py`)
- Editorial review → Submissions database: reads and updates (evidence: `app.py`)
- Author workflow → Author view: renders (evidence: `app.py`)
- Editorial review → Editor view: renders (evidence: `app.py`)
- Author workflow → Home view: home renders (evidence: `app.py`)
