# willy0813/manuscript-system architecture

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

- Interactive diagram: https://gitdiagram.com/willy0813/manuscript-system
- Repository: https://github.com/willy0813/manuscript-system

## Overview

This is a small manuscript-submission and review web app. Authors log in, create or edit drafts, and submit them for review; editors inspect pending manuscripts and approve or return them. The browser client calls Express routes, which enforce role access and read or update PostgreSQL. Startup initializes the schema and seeds accounts. The documented Docker/PostgreSQL setup is represented as an external database. The graph follows shown calls and README capabilities; it omits uninspected HTML and CSS details.

Main entry points: [`public/app.js`](https://github.com/willy0813/manuscript-system/blob/main/public/app.js) (Web interface), [`auth.js`](https://github.com/willy0813/manuscript-system/blob/main/auth.js) (Login and session), [`server.js`](https://github.com/willy0813/manuscript-system/blob/main/server.js) (Author submissions), [`db.js`](https://github.com/willy0813/manuscript-system/blob/main/db.js) (Schema and seed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Browser client"]
  node_web["Web interface<br/>[app.js]"]
end

subgraph group_server["Application server"]
  node_login["Login and session<br/>[auth.js]"]
  node_author_routes["Author submissions<br/>[server.js]"]
  node_editor_routes["Editorial review<br/>[server.js]"]
  node_startup["Schema and seed<br/>[db.js]"]
end

subgraph group_data["Persistence"]
  node_postgres[("PostgreSQL")]
end

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

node_author -->|"uses"| node_web
node_editor -->|"uses"| node_web
node_web -->|"posts credentials"| node_login
node_web -->|"requests articles"| node_author_routes
node_web -->|"requests reviews"| node_editor_routes
node_login -->|"reads users"| node_postgres
node_author_routes -->|"reads and writes"| node_postgres
node_editor_routes -->|"reads and updates"| node_postgres
node_startup -->|"initializes schema"| node_postgres

click node_web "https://github.com/willy0813/manuscript-system/blob/main/public/app.js"
click node_login "https://github.com/willy0813/manuscript-system/blob/main/auth.js"
click node_author_routes "https://github.com/willy0813/manuscript-system/blob/main/server.js"
click node_editor_routes "https://github.com/willy0813/manuscript-system/blob/main/server.js"
click node_startup "https://github.com/willy0813/manuscript-system/blob/main/db.js"

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_web toneBlue
class node_login,node_author_routes,node_editor_routes,node_startup toneAmber
class node_postgres toneMint
class node_author,node_editor toneIndigo
```

## Components

### Browser client

- [Web interface](https://github.com/willy0813/manuscript-system/blob/main/public/app.js): `public/app.js`

### Application server

- [Login and session](https://github.com/willy0813/manuscript-system/blob/main/auth.js): `auth.js`
- [Author submissions](https://github.com/willy0813/manuscript-system/blob/main/server.js): `server.js`
- [Editorial review](https://github.com/willy0813/manuscript-system/blob/main/server.js): `server.js`
- [Schema and seed](https://github.com/willy0813/manuscript-system/blob/main/db.js): `db.js`

### Persistence

- **PostgreSQL**

### Other components

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

## Connections

- Author → Web interface: uses (evidence: `README.md`)
- Editor → Web interface: uses (evidence: `README.md`)
- Web interface → Login and session: posts credentials (evidence: `public/app.js`)
- Web interface → Author submissions: requests articles (evidence: `public/app.js`)
- Web interface → Editorial review: requests reviews (evidence: `public/app.js`)
- Login and session → PostgreSQL: reads users (evidence: `auth.js`)
- Author submissions → PostgreSQL: reads and writes (evidence: `server.js`)
- Editorial review → PostgreSQL: reads and updates (evidence: `server.js`)
- Schema and seed → PostgreSQL: initializes schema (evidence: `db.js`)
