# aanatasya/submission_demo architecture

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

## Overview

This is a PHP submission-review system: users log in, authors create and manage article drafts, and editors review submitted articles, approving them or returning them for editing. The PHP pages combine request handling and rendered panels; db.php initializes sessions and the MySQL connection. The excerpts show the article state changes and login routing. They do not show the database schema or the contents of the standalone HTML files, so those details are omitted.

Main entry points: [`index.php`](https://github.com/aanatasya/submission_demo/blob/main/index.php) (Login), [`db.php`](https://github.com/aanatasya/submission_demo/blob/main/db.php) (DB connection), [`author.php`](https://github.com/aanatasya/submission_demo/blob/main/author.php) (Author panel), [`editor.php`](https://github.com/aanatasya/submission_demo/blob/main/editor.php) (Editor panel)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and sessions"]
  node_login["Login<br/>[index.php]"]
  node_session[("PHP session")]
  node_logout["Logout<br/>[logout.php]"]
  node_dbconfig["DB connection<br/>[db.php]"]
end

subgraph group_authoring["Author submissions"]
  node_author["Author panel<br/>[author.php]"]
end

subgraph group_review["Editorial review"]
  node_editor["Editor panel<br/>[editor.php]"]
end

node_user(("User"))
node_mysql[("MySQL database")]

node_user -->|"submits credentials"| node_login
node_login -->|"checks credentials"| node_mysql
node_login -->|"sets identity"| node_session
node_login -->|"routes author"| node_author
node_login -->|"routes editor"| node_editor
node_author -->|"manages articles"| node_mysql
node_editor -->|"reviews articles"| node_mysql
node_author -->|"links to"| node_logout
node_editor -->|"links to"| node_logout
node_logout -->|"destroys session"| node_session
node_logout -->|"redirects to"| node_login
node_login -->|"loads connection"| node_dbconfig
node_author -->|"loads connection"| node_dbconfig
node_editor -->|"loads connection"| node_dbconfig
node_dbconfig -->|"starts session"| node_session
node_dbconfig -->|"connects to"| node_mysql

click node_login "https://github.com/aanatasya/submission_demo/blob/main/index.php"
click node_author "https://github.com/aanatasya/submission_demo/blob/main/author.php"
click node_editor "https://github.com/aanatasya/submission_demo/blob/main/editor.php"
click node_logout "https://github.com/aanatasya/submission_demo/blob/main/logout.php"
click node_dbconfig "https://github.com/aanatasya/submission_demo/blob/main/db.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_login,node_session,node_logout,node_dbconfig,node_user toneBlue
class node_author,node_mysql toneAmber
class node_editor toneMint
```

## Components

### Access and sessions

- [Login](https://github.com/aanatasya/submission_demo/blob/main/index.php): `index.php`
- **PHP session**
- [Logout](https://github.com/aanatasya/submission_demo/blob/main/logout.php): `logout.php`
- [DB connection](https://github.com/aanatasya/submission_demo/blob/main/db.php): `db.php`

### Author submissions

- [Author panel](https://github.com/aanatasya/submission_demo/blob/main/author.php): `author.php`

### Editorial review

- [Editor panel](https://github.com/aanatasya/submission_demo/blob/main/editor.php): `editor.php`

### Other components

- **User**
- **MySQL database**

## Connections

- User → Login: submits credentials (evidence: `index.php`)
- Login → MySQL database: checks credentials (evidence: `index.php`)
- Login → PHP session: sets identity (evidence: `index.php`)
- Login → Author panel: routes author (evidence: `index.php`)
- Login → Editor panel: routes editor (evidence: `index.php`)
- Author panel → MySQL database: manages articles (evidence: `author.php`)
- Editor panel → MySQL database: reviews articles (evidence: `editor.php`)
- Author panel → Logout: links to (evidence: `author.php`)
- Editor panel → Logout: links to (evidence: `editor.php`)
- Logout → PHP session: destroys session (evidence: `logout.php`)
- Logout → Login: redirects to (evidence: `logout.php`)
- Login → DB connection: loads connection (evidence: `index.php`)
- Author panel → DB connection: loads connection (evidence: `author.php`)
- Editor panel → DB connection: loads connection (evidence: `editor.php`)
- DB connection → PHP session: starts session (evidence: `db.php`)
- DB connection → MySQL database: connects to (evidence: `db.php`)
