# dec-olgen/websiet architecture

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

- Interactive diagram: https://gitdiagram.com/dec-olgen/websiet
- Repository: https://github.com/dec-olgen/websiet

## Overview

This is a small PHP guestbook. Visitors submit a name and message; the page stores valid submissions in MySQL, then reads messages and renders them. The README only calls it exam practice, so the guestbook workflow is inferred from index.php. The database schema is represented in the tree, but db.sql was not sampled; styling is present without a runtime role in the data flow.

Main entry points: [`index.php`](https://github.com/dec-olgen/websiet/blob/main/index.php) (Guestbook workflow), [`style.css`](https://github.com/dec-olgen/websiet/blob/main/style.css) (Page styling), [`config.php`](https://github.com/dec-olgen/websiet/blob/main/config.php) (MySQL connection), [`db.sql`](https://github.com/dec-olgen/websiet/blob/main/db.sql) (Messages table)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Guestbook page"]
  node_page["Guestbook workflow<br/>[index.php]"]
  node_styles["Page styling<br/>[style.css]"]
end

subgraph group_storage["Persistence"]
  node_connection["MySQL connection<br/>[config.php]"]
  node_messages[("Messages table<br/>[db.sql]")]
end

node_visitor(("Visitor"))

node_visitor -->|"submits or views"| node_page
node_page -->|"loads connection"| node_connection
node_page -->|"inserts and queries"| node_messages
node_page -->|"renders messages"| node_visitor
node_page -->|"links stylesheet"| node_styles

click node_page "https://github.com/dec-olgen/websiet/blob/main/index.php"
click node_styles "https://github.com/dec-olgen/websiet/blob/main/style.css"
click node_connection "https://github.com/dec-olgen/websiet/blob/main/config.php"
click node_messages "https://github.com/dec-olgen/websiet/blob/main/db.sql"

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_page,node_styles toneBlue
class node_connection,node_messages toneAmber
class node_visitor toneIndigo
```

## Components

### Guestbook page

- [Guestbook workflow](https://github.com/dec-olgen/websiet/blob/main/index.php): `index.php`
- [Page styling](https://github.com/dec-olgen/websiet/blob/main/style.css): `style.css`

### Persistence

- [MySQL connection](https://github.com/dec-olgen/websiet/blob/main/config.php): `config.php`
- [Messages table](https://github.com/dec-olgen/websiet/blob/main/db.sql): `db.sql`

### Other components

- **Visitor**

## Connections

- Visitor → Guestbook workflow: submits or views
- Guestbook workflow → MySQL connection: loads connection
- Guestbook workflow → Messages table: inserts and queries
- Guestbook workflow → Visitor: renders messages
- Guestbook workflow → Page styling: links stylesheet
