# jay350451119-star/se architecture

> Architecture diagram of the GitHub repository jay350451119-star/se, 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/jay350451119-star/se
- Repository: https://github.com/jay350451119-star/se

## Overview

This PHP/SQLite manuscript-review website takes authors from account creation or login through drafting, editing, and submission; editors then review submissions, returning them for revision or approving them for read-only access. A single PHP front controller renders both role-specific workspaces and dispatches their actions to repository functions, which enforce ownership and status rules while persisting data in SQLite. The README also documents a command-line manuscript listing tool. The front-controller excerpt is partial, so finer internal routing details are not inferred.

Main entry points: [`repository.php`](https://github.com/jay350451119-star/se/blob/main/repository.php) (Repository Operations), [`public/index.php`](https://github.com/jay350451119-star/se/blob/main/public/index.php) (Web Front Controller), [`data/manuscripts.sqlite`](https://github.com/jay350451119-star/se/blob/main/data/manuscripts.sqlite) (Manuscript SQLite), [`查詢稿件.php`](https://github.com/jay350451119-star/se/blob/main/%E6%9F%A5%E8%A9%A2%E7%A8%BF%E4%BB%B6.php) (Manuscript Listing CLI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Workspaces"]
  node_front["Web Front Controller<br/>[index.php]"]
  node_styling["Workspace Styling<br/>[style.css]"]
  node_accounts["Login and Registration<br/>[index.php]"]
end

subgraph group_author["Author Workflow"]
  node_author_workspace["Author Workspace<br/>[index.php]"]
  node_drafts["Draft Management<br/>[index.php]"]
  node_submission["Manuscript Submission<br/>[index.php]"]
  node_author_reading["Author Full-Text View<br/>[index.php]"]
end

subgraph group_review["Editorial Review"]
  node_editor_workspace["Editor Workspace<br/>[index.php]"]
  node_review_decision["Review Decisions<br/>[index.php]"]
  node_approved_archive["Approved Manuscripts<br/>[index.php]"]
end

subgraph group_storage["Persistence"]
  node_repository["Repository Operations<br/>[repository.php]"]
  node_schema["Database Schema<br/>[schema.sql]"]
  node_database[("Manuscript SQLite<br/>[manuscripts.sqlite]")]
  node_listing["Manuscript Listing CLI<br/>[查詢稿件.php]"]
end

node_browser(("Browser User"))

node_browser -->|"uses"| node_front
node_front -->|"loads styles"| node_styling
node_front -->|"dispatches"| node_accounts
node_front -->|"renders"| node_author_workspace
node_front -->|"renders"| node_editor_workspace
node_front -->|"calls"| node_repository
node_author_workspace -->|"offers edits"| node_drafts
node_drafts -->|"creates and updates"| node_repository
node_author_workspace -->|"offers submission"| node_submission
node_submission -->|"submits"| node_repository
node_author_workspace -->|"offers full text"| node_author_reading
node_author_reading -->|"loads manuscript"| node_repository
node_editor_workspace -->|"offers review"| node_review_decision
node_review_decision -->|"approves or returns"| node_repository
node_editor_workspace -->|"shows approved"| node_approved_archive
node_approved_archive -->|"loads manuscripts"| node_repository
node_repository -->|"reads and writes"| node_database
node_repository -->|"initializes"| node_schema
node_listing -->|"queries"| node_database

click node_front "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_styling "https://github.com/jay350451119-star/se/blob/main/public/style.css"
click node_accounts "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_author_workspace "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_drafts "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_submission "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_author_reading "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_editor_workspace "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_review_decision "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_approved_archive "https://github.com/jay350451119-star/se/blob/main/public/index.php"
click node_repository "https://github.com/jay350451119-star/se/blob/main/repository.php"
click node_schema "https://github.com/jay350451119-star/se/blob/main/schema.sql"
click node_database "https://github.com/jay350451119-star/se/blob/main/data/manuscripts.sqlite"
click node_listing "https://github.com/jay350451119-star/se/blob/main/%E6%9F%A5%E8%A9%A2%E7%A8%BF%E4%BB%B6.php"

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_front,node_styling,node_accounts,node_browser toneBlue
class node_author_workspace,node_drafts,node_submission,node_author_reading toneAmber
class node_editor_workspace,node_review_decision,node_approved_archive toneMint
class node_repository,node_schema,node_database,node_listing toneRose
```

## Components

### Web Workspaces

- [Web Front Controller](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Workspace Styling](https://github.com/jay350451119-star/se/blob/main/public/style.css): `public/style.css`
- [Login and Registration](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`

### Author Workflow

- [Author Workspace](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Draft Management](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Manuscript Submission](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Author Full-Text View](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`

### Editorial Review

- [Editor Workspace](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Review Decisions](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`
- [Approved Manuscripts](https://github.com/jay350451119-star/se/blob/main/public/index.php): `public/index.php`

### Persistence

- [Repository Operations](https://github.com/jay350451119-star/se/blob/main/repository.php): `repository.php`
- [Database Schema](https://github.com/jay350451119-star/se/blob/main/schema.sql): `schema.sql`
- [Manuscript SQLite](https://github.com/jay350451119-star/se/blob/main/data/manuscripts.sqlite): `data/manuscripts.sqlite`
- [Manuscript Listing CLI](https://github.com/jay350451119-star/se/blob/main/%E6%9F%A5%E8%A9%A2%E7%A8%BF%E4%BB%B6.php): `查詢稿件.php`

### Other components

- **Browser User**

## Connections

- Browser User → Web Front Controller: uses (evidence: `README.md`)
- Web Front Controller → Workspace Styling: loads styles (evidence: `README.md`)
- Web Front Controller → Login and Registration: dispatches (evidence: `public/index.php`)
- Web Front Controller → Author Workspace: renders (evidence: `public/index.php`)
- Web Front Controller → Editor Workspace: renders (evidence: `public/index.php`)
- Web Front Controller → Repository Operations: calls (evidence: `public/index.php`)
- Author Workspace → Draft Management: offers edits (evidence: `public/index.php`)
- Draft Management → Repository Operations: creates and updates (evidence: `public/index.php`)
- Author Workspace → Manuscript Submission: offers submission (evidence: `public/index.php`)
- Manuscript Submission → Repository Operations: submits (evidence: `public/index.php`)
- Author Workspace → Author Full-Text View: offers full text (evidence: `public/index.php`)
- Author Full-Text View → Repository Operations: loads manuscript (evidence: `public/index.php`)
- Editor Workspace → Review Decisions: offers review (evidence: `public/index.php`)
- Review Decisions → Repository Operations: approves or returns (evidence: `public/index.php`)
- Editor Workspace → Approved Manuscripts: shows approved (evidence: `README.md`)
- Approved Manuscripts → Repository Operations: loads manuscripts (evidence: `public/index.php`)
- Repository Operations → Manuscript SQLite: reads and writes (evidence: `repository.php`)
- Repository Operations → Database Schema: initializes (evidence: `repository.php`)
- Manuscript Listing CLI → Manuscript SQLite: queries (evidence: `查詢稿件.php`)
