# sebo05/zakladna architecture

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

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

## Overview

Základna is a personal and small-business dashboard for cars, finances, goals, and household management. Users sign in, then manage domain records through Nette presenters backed by Nextras ORM and a MariaDB/MySQL database. Major documented branches include fleet maintenance and route planning, banking imports and scheduled notifications, household sharing, and a token-protected desktop widget. The graph combines README-documented capabilities with relationships visible in sampled source/index references; unsampled internals are represented only at supported directory paths.

Main entry points: [`app/Presentation/App`](https://github.com/sebo05/zakladna/tree/main/app/Presentation/App) (App presenters), [`app/Presentation/App/Garage/GaragePresenter.php`](https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Garage/GaragePresenter.php) (Garage records), [`app/Model/Orm.php`](https://github.com/sebo05/zakladna/blob/main/app/Model/Orm.php) (ORM repositories), [`app/Presentation/App/Service/ServicePresenter.php`](https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Service/ServicePresenter.php) (Service records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Access and presentation"]
  node_auth["Sign-in<br/>[AuthPresenter.php]"]
  node_google["Google OAuth<br/>[GoogleAuth.php]"]
  node_appui["App presenters"]
  node_admin["Administration"]
end

subgraph group_fleet["Fleet management"]
  node_garage["Garage records"]
  node_service["Service records"]
  node_forecast["Maintenance forecast"]
  node_routes["Route planner"]
  node_routejs["Route map client<br/>[route-planner.js]"]
  node_fleetdata["Fleet domain"]
end

subgraph group_money["Finance and household"]
  node_finances["Transactions and budgets"]
  node_bank["Bank connections"]
  node_bankapi["Bank provider APIs"]
  node_household["Shared household"]
  node_goals["Goals and recurring"]
end

subgraph group_platform["Services and persistence"]
  node_cron["Scheduled tasks<br/>[cron.php]"]
  node_notifier["Notifications<br/>[Notifier.php]"]
  node_widgetapi["Widget API"]
  node_widgettoken["Widget tokens"]
  node_orm["ORM repositories<br/>[Orm.php]"]
  node_database[("MariaDB / MySQL")]
  node_bootstrap["Application bootstrap<br/>[Bootstrap.php]"]
end

node_user(("User"))
node_desktop["Windows widget<br/>[AnoWidget.cs]"]

node_user -->|"signs in"| node_auth
node_auth -->|"uses OAuth"| node_google
node_user -->|"uses"| node_appui
node_user -->|"manages"| node_admin
node_appui -->|"opens fleet"| node_garage
node_garage -->|"loads records"| node_fleetdata
node_garage -->|"uses forecast"| node_forecast
node_service -->|"updates records"| node_fleetdata
node_service -->|"records costs"| node_finances
node_appui -->|"opens planner"| node_routes
node_routes -->|"renders routes"| node_routejs
node_routejs -.->|"requests routes"| node_user
node_appui -->|"opens finances"| node_finances
node_cron -->|"syncs accounts"| node_bank
node_bank -->|"fetches movements"| node_bankapi
node_bank -->|"imports transactions"| node_finances
node_appui -->|"opens household"| node_household
node_appui -->|"opens goals"| node_goals
node_cron -->|"sends reminders"| node_notifier
node_desktop -->|"requests data"| node_widgetapi
node_widgetapi -.->|"validates token"| node_widgettoken
node_appui -->|"issues token"| node_widgettoken
node_garage -->|"reads and writes"| node_orm
node_service -->|"persists records"| node_orm
node_orm -->|"stores entities"| node_database
node_bootstrap -.->|"configures runtime"| node_orm

click node_auth "https://github.com/sebo05/zakladna/blob/main/app/Presentation/Frontend/Auth/AuthPresenter.php"
click node_google "https://github.com/sebo05/zakladna/blob/main/app/Security/GoogleAuth.php"
click node_appui "https://github.com/sebo05/zakladna/tree/main/app/Presentation/App"
click node_admin "https://github.com/sebo05/zakladna/tree/main/app/Presentation/Admin"
click node_garage "https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Garage/GaragePresenter.php"
click node_service "https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Service/ServicePresenter.php"
click node_forecast "https://github.com/sebo05/zakladna/blob/main/app/Model/ServicePlan/ServiceForecast.php"
click node_routes "https://github.com/sebo05/zakladna/tree/main/app/Presentation/App/Route"
click node_routejs "https://github.com/sebo05/zakladna/blob/main/www/Frontend/js/route-planner.js"
click node_fleetdata "https://github.com/sebo05/zakladna/tree/main/app/Model/Car"
click node_finances "https://github.com/sebo05/zakladna/tree/main/app/Presentation/App/Finance"
click node_bank "https://github.com/sebo05/zakladna/blob/main/app/Model/Bank/BankSyncService.php"
click node_bankapi "https://github.com/sebo05/zakladna/tree/main/app/Model/Bank"
click node_household "https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Household/HouseholdPresenter.php"
click node_goals "https://github.com/sebo05/zakladna/tree/main/app/Model/Goal"
click node_cron "https://github.com/sebo05/zakladna/blob/main/bin/cron.php"
click node_notifier "https://github.com/sebo05/zakladna/blob/main/app/Model/Notification/Notifier.php"
click node_widgetapi "https://github.com/sebo05/zakladna/blob/main/app/Presentation/Api/Widget/WidgetPresenter.php"
click node_widgettoken "https://github.com/sebo05/zakladna/blob/main/app/Model/Widget/WidgetTokenService.php"
click node_desktop "https://github.com/sebo05/zakladna/blob/main/widget/AnoWidget.cs"
click node_orm "https://github.com/sebo05/zakladna/blob/main/app/Model/Orm.php"
click node_bootstrap "https://github.com/sebo05/zakladna/blob/main/app/Bootstrap.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_auth,node_google,node_appui,node_admin,node_user toneBlue
class node_garage,node_service,node_forecast,node_routes,node_routejs,node_fleetdata toneAmber
class node_finances,node_bank,node_bankapi,node_household,node_goals toneMint
class node_cron,node_notifier,node_widgetapi,node_widgettoken,node_orm,node_database,node_bootstrap toneRose
class node_desktop toneTeal
```

## Components

### Access and presentation

- [Sign-in](https://github.com/sebo05/zakladna/blob/main/app/Presentation/Frontend/Auth/AuthPresenter.php): `app/Presentation/Frontend/Auth/AuthPresenter.php`
- [Google OAuth](https://github.com/sebo05/zakladna/blob/main/app/Security/GoogleAuth.php): `app/Security/GoogleAuth.php`
- [App presenters](https://github.com/sebo05/zakladna/tree/main/app/Presentation/App): `app/Presentation/App`
- [Administration](https://github.com/sebo05/zakladna/tree/main/app/Presentation/Admin): `app/Presentation/Admin`

### Fleet management

- [Garage records](https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Garage/GaragePresenter.php): `app/Presentation/App/Garage/GaragePresenter.php`
- [Service records](https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Service/ServicePresenter.php): `app/Presentation/App/Service/ServicePresenter.php`
- [Maintenance forecast](https://github.com/sebo05/zakladna/blob/main/app/Model/ServicePlan/ServiceForecast.php): `app/Model/ServicePlan/ServiceForecast.php`
- [Route planner](https://github.com/sebo05/zakladna/tree/main/app/Presentation/App/Route): `app/Presentation/App/Route`
- [Route map client](https://github.com/sebo05/zakladna/blob/main/www/Frontend/js/route-planner.js): `www/Frontend/js/route-planner.js`
- [Fleet domain](https://github.com/sebo05/zakladna/tree/main/app/Model/Car): `app/Model/Car`

### Finance and household

- [Transactions and budgets](https://github.com/sebo05/zakladna/tree/main/app/Presentation/App/Finance): `app/Presentation/App/Finance`
- [Bank connections](https://github.com/sebo05/zakladna/blob/main/app/Model/Bank/BankSyncService.php): `app/Model/Bank/BankSyncService.php`
- [Bank provider APIs](https://github.com/sebo05/zakladna/tree/main/app/Model/Bank): `app/Model/Bank`
- [Shared household](https://github.com/sebo05/zakladna/blob/main/app/Presentation/App/Household/HouseholdPresenter.php): `app/Presentation/App/Household/HouseholdPresenter.php`
- [Goals and recurring](https://github.com/sebo05/zakladna/tree/main/app/Model/Goal): `app/Model/Goal`

### Services and persistence

- [Scheduled tasks](https://github.com/sebo05/zakladna/blob/main/bin/cron.php): `bin/cron.php`
- [Notifications](https://github.com/sebo05/zakladna/blob/main/app/Model/Notification/Notifier.php): `app/Model/Notification/Notifier.php`
- [Widget API](https://github.com/sebo05/zakladna/blob/main/app/Presentation/Api/Widget/WidgetPresenter.php): `app/Presentation/Api/Widget/WidgetPresenter.php`
- [Widget tokens](https://github.com/sebo05/zakladna/blob/main/app/Model/Widget/WidgetTokenService.php): `app/Model/Widget/WidgetTokenService.php`
- [ORM repositories](https://github.com/sebo05/zakladna/blob/main/app/Model/Orm.php): `app/Model/Orm.php`
- **MariaDB / MySQL**
- [Application bootstrap](https://github.com/sebo05/zakladna/blob/main/app/Bootstrap.php): `app/Bootstrap.php`

### Other components

- **User**
- [Windows widget](https://github.com/sebo05/zakladna/blob/main/widget/AnoWidget.cs): `widget/AnoWidget.cs`

## Connections

- User → Sign-in: signs in
- Sign-in → Google OAuth: uses OAuth (evidence: `app/Presentation/Frontend/Auth/AuthPresenter.php`)
- User → App presenters: uses
- User → Administration: manages
- App presenters → Garage records: opens fleet (evidence: `app/Presentation/App/BasePresenter.php`)
- Garage records → Fleet domain: loads records (evidence: `app/Presentation/App/Garage/GaragePresenter.php`)
- Garage records → Maintenance forecast: uses forecast (evidence: `app/Presentation/App/Garage/GaragePresenter.php`)
- Service records → Fleet domain: updates records (evidence: `app/Presentation/App/Service/ServicePresenter.php`)
- Service records → Transactions and budgets: records costs (evidence: `app/Presentation/App/Service/ServicePresenter.php`)
- App presenters → Route planner: opens planner
- Route planner → Route map client: renders routes
- Route map client → User: requests routes
- App presenters → Transactions and budgets: opens finances (evidence: `app/Presentation/App/BasePresenter.php`)
- Scheduled tasks → Bank connections: syncs accounts
- Bank connections → Bank provider APIs: fetches movements (evidence: `app/Model/Bank/BankSyncService.php`)
- Bank connections → Transactions and budgets: imports transactions (evidence: `app/Model/Bank/BankSyncService.php`)
- App presenters → Shared household: opens household (evidence: `app/Presentation/App/BasePresenter.php`)
- App presenters → Goals and recurring: opens goals (evidence: `app/Presentation/App/BasePresenter.php`)
- Scheduled tasks → Notifications: sends reminders
- Windows widget → Widget API: requests data
- Widget API → Widget tokens: validates token
- App presenters → Widget tokens: issues token
- Garage records → ORM repositories: reads and writes (evidence: `app/Presentation/App/Garage/GaragePresenter.php`)
- Service records → ORM repositories: persists records (evidence: `app/Presentation/App/Service/ServicePresenter.php`)
- ORM repositories → MariaDB / MySQL: stores entities
- Application bootstrap → ORM repositories: configures runtime
