# sebo05/prvotniverzeadminu architecture

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

- Interactive diagram: https://gitdiagram.com/sebo05/prvotniverzeadminu
- Repository: https://github.com/sebo05/prvotniverzeadminu

## Overview

This is a small Nette PHP web application for browsing and publishing posts. A request enters through the web front controller, is bootstrapped and routed, then reaches a presenter that fetches or saves post data; the home page uses a facade for public posts, while detail and edit actions access the database directly. Error presenters handle client and server failures. The excerpts establish these data and routing paths; view rendering follows framework conventions, so template links are omitted rather than inferred.

Main entry points: [`www/index.php`](https://github.com/sebo05/prvotniverzeadminu/blob/main/www/index.php) (Web front controller), [`app/Bootstrap.php`](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Bootstrap.php) (Application bootstrap), [`app/Core/RouterFactory.php`](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Core/RouterFactory.php) (Request router), [`app/UI/Home/HomePresenter.php`](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Home/HomePresenter.php) (Post listing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request setup"]
  node_front["Web front controller<br/>[index.php]"]
  node_bootstrap["Application bootstrap<br/>[Bootstrap.php]"]
  node_router["Request router<br/>[RouterFactory.php]"]
end

subgraph group_posts["Post workflows"]
  node_home["Post listing<br/>[HomePresenter.php]"]
  node_facade["Public post query<br/>[PostFacade.php]"]
  node_detail["Post detail<br/>[PostPresenter.php]"]
  node_editor["Post editor<br/>[EditPresenter.php]"]
end

subgraph group_errors["Error handling"]
  node_clienterrors["Client error pages"]
  node_servererrors["Server error handler"]
end

subgraph group_presentation["Presentation support"]
  node_latte["Latte extension<br/>[LatteExtension.php]"]
end

node_visitor(("Web visitor"))
node_database[("Posts database")]

node_visitor -->|"requests"| node_front
node_front -->|"boots"| node_bootstrap
node_bootstrap -.-> node_router
node_router -->|"routes default"| node_home
node_home -->|"queries posts"| node_facade
node_facade -->|"reads public posts"| node_database
node_detail -->|"reads post"| node_database
node_editor -->|"reads and writes"| node_database

click node_front "https://github.com/sebo05/prvotniverzeadminu/blob/main/www/index.php"
click node_bootstrap "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Bootstrap.php"
click node_router "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Core/RouterFactory.php"
click node_home "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Home/HomePresenter.php"
click node_facade "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Model/PostFacade.php"
click node_detail "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Post/PostPresenter.php"
click node_editor "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Edit/EditPresenter.php"
click node_clienterrors "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Error/Error4xx/Error4xxPresenter.php"
click node_servererrors "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Error/Error5xx/Error5xxPresenter.php"
click node_latte "https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Accessory/LatteExtension.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_bootstrap,node_router toneBlue
class node_home,node_facade,node_detail,node_editor,node_database toneAmber
class node_clienterrors,node_servererrors toneMint
class node_latte toneRose
class node_visitor toneIndigo
```

## Components

### Request setup

- [Web front controller](https://github.com/sebo05/prvotniverzeadminu/blob/main/www/index.php): `www/index.php`
- [Application bootstrap](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Bootstrap.php): `app/Bootstrap.php`
- [Request router](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Core/RouterFactory.php): `app/Core/RouterFactory.php`

### Post workflows

- [Post listing](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Home/HomePresenter.php): `app/UI/Home/HomePresenter.php`
- [Public post query](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/Model/PostFacade.php): `app/Model/PostFacade.php`
- [Post detail](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Post/PostPresenter.php): `app/UI/Post/PostPresenter.php`
- [Post editor](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Edit/EditPresenter.php): `app/UI/Edit/EditPresenter.php`

### Error handling

- [Client error pages](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Error/Error4xx/Error4xxPresenter.php): `app/UI/Error/Error4xx/Error4xxPresenter.php`
- [Server error handler](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Error/Error5xx/Error5xxPresenter.php): `app/UI/Error/Error5xx/Error5xxPresenter.php`

### Presentation support

- [Latte extension](https://github.com/sebo05/prvotniverzeadminu/blob/main/app/UI/Accessory/LatteExtension.php): `app/UI/Accessory/LatteExtension.php`

### Other components

- **Web visitor**
- **Posts database**

## Connections

- Web visitor → Web front controller: requests (evidence: `www/index.php`)
- Web front controller → Application bootstrap: boots (evidence: `www/index.php`)
- Application bootstrap → Request router
- Request router → Post listing: routes default (evidence: `app/Core/RouterFactory.php`)
- Post listing → Public post query: queries posts (evidence: `app/UI/Home/HomePresenter.php`)
- Public post query → Posts database: reads public posts (evidence: `app/Model/PostFacade.php`)
- Post detail → Posts database: reads post (evidence: `app/UI/Post/PostPresenter.php`)
- Post editor → Posts database: reads and writes (evidence: `app/UI/Edit/EditPresenter.php`)
