# ssmoter/szarotka architecture

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

- Interactive diagram: https://gitdiagram.com/ssmoter/szarotka
- Repository: https://github.com/ssmoter/szarotka

## Overview

SzarotkaBlazor is a cross-platform app with two operational areas: driver-route planning and inventory tracking, backed by shared database services. The documented-by-tree route workflow starts from route selection, filters customer stops by weekday, and presents them on a map; route/customer editing and navigation are separate capabilities. Inventory includes daily and date-range views, product/price management, graphs, and CSV output. Source excerpts confirm route selection, database writes, Google route requests, and app startup; wiring for unsampled screens is intentionally not asserted.

Main entry points: [`DataBase/Data/AccessDataBase.cs`](https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/AccessDataBase.cs) (Database access), [`DriversRoutes/Pages/Main/MainVDriversRoutesVM.cs`](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Main/MainVDriversRoutesVM.cs) (Route selection), [`DriversRoutes/Pages/Maps/MapAndPoints/MapsVM.cs`](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Maps/MapAndPoints/MapsVM.cs) (Route map), [`Inventory/Pages/Main/MainVM.cs`](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/Main/MainVM.cs) (Inventory overview)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app["App startup<br/>[App.xaml.cs]"]
end

subgraph group_routes["Driver routes"]
  node_routehome["Route selection"]
  node_routedb["Route records<br/>[SelectRoutes.cs]"]
  node_stops["Customer stops<br/>[ListOfPointsVM.cs]"]
  node_customeredit["Customer editing<br/>[AddCustomerVM.cs]"]
  node_schedule["Stop schedules"]
  node_maps["Route map<br/>[MapsVM.cs]"]
  node_navigation["Turn navigation<br/>[NavigateVM.cs]"]
  node_location["Device location<br/>[CurrentLocation.cs]"]
  node_address["Address lookup"]
  node_directions["Route directions<br/>[Routes.cs]"]
end

subgraph group_inventory["Inventory"]
  node_inventorymain["Inventory overview<br/>[MainVM.cs]"]
  node_singleday["Daily inventory<br/>[SingleDayVM.cs]"]
  node_rangeday["Date range<br/>[RangeDayVM.cs]"]
  node_graphs["Inventory graphs<br/>[GraphVM.cs]"]
  node_products["Product catalog<br/>[ListProductVM.cs]"]
  node_csv["CSV export<br/>[CSVFile.cs]"]
end

subgraph group_shared["Shared data"]
  node_dbaccess["Database access<br/>[AccessDataBase.cs]"]
  node_routestore[("Local route store")]
  node_inventorytables[("Inventory store<br/>[InventoryTables.cs]")]
  node_saveroutes["Route persistence<br/>[SaveRoutes.cs]"]
  node_saveday["Daily persistence<br/>[SaveDayService.cs]"]
end

node_user(("User"))
node_google["Google Maps API"]

node_user -->|"opens"| node_app
node_app -->|"starts route area"| node_routehome
node_routehome -->|"loads routes"| node_dbaccess
node_routehome -->|"opens selected route"| node_maps
node_routehome -->|"opens stop list"| node_stops
node_maps -->|"requests location"| node_location
node_maps -.->|"resolves coordinates"| node_address
node_maps -.->|"requests directions"| node_directions
node_navigation -.->|"uses location"| node_location
node_address -.->|"calls geocoding"| node_google
node_directions -.->|"requests routes"| node_google
node_customeredit -->|"saves customer"| node_saveroutes
node_saveroutes -->|"writes records"| node_dbaccess
node_dbaccess -->|"accesses tables"| node_routestore
node_user -->|"opens inventory"| node_inventorymain
node_inventorymain -->|"opens daily view"| node_singleday
node_inventorymain -->|"opens date range"| node_rangeday
node_rangeday -->|"presents graph"| node_graphs
node_singleday -.->|"exports data"| node_csv
node_singleday -->|"saves daily data"| node_saveday
node_saveday -->|"writes records"| node_dbaccess
node_inventorymain -->|"opens products"| node_products
node_dbaccess -->|"accesses tables"| node_inventorytables

click node_app "https://github.com/ssmoter/szarotka/blob/master/SzarotkaBlazor/App.xaml.cs"
click node_routehome "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Main/MainVDriversRoutesVM.cs"
click node_routedb "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/SelectRoutes.cs"
click node_stops "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/ListOfPoints/ListOfPointsVM.cs"
click node_customeredit "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Customer/AddCustomer/AddCustomerVM.cs"
click node_schedule "https://github.com/ssmoter/szarotka/blob/master/DataBase/Model/EntitiesRoutes/SelectedDayOfWeek.cs"
click node_maps "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Maps/MapAndPoints/MapsVM.cs"
click node_navigation "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Maps/Navigate/NavigateVM.cs"
click node_location "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/ActionLocation/CurrentLocation.cs"
click node_address "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/GoogleApi/AddressFromCoordinates.cs"
click node_directions "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/GoogleApi/Routes.cs"
click node_inventorymain "https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/Main/MainVM.cs"
click node_singleday "https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/SingleDay/SingleDayVM.cs"
click node_rangeday "https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/RangeDay/RangeDayVM.cs"
click node_graphs "https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/RangeDay/Graph/GraphVM.cs"
click node_products "https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/Products/ListProduct/ListProductVM.cs"
click node_csv "https://github.com/ssmoter/szarotka/blob/master/Inventory/Data/File/CSVFile.cs"
click node_dbaccess "https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/AccessDataBase.cs"
click node_routestore "https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/DriversRoutesTables.cs"
click node_inventorytables "https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/InventoryTables.cs"
click node_saveroutes "https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/SaveRoutes.cs"
click node_saveday "https://github.com/ssmoter/szarotka/blob/master/Inventory/Data/SaveDayService.cs"

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_app,node_user toneBlue
class node_routehome,node_routedb,node_stops,node_customeredit,node_schedule,node_maps,node_navigation,node_location,node_address,node_directions toneAmber
class node_inventorymain,node_singleday,node_rangeday,node_graphs,node_products,node_csv,node_google toneMint
class node_dbaccess,node_routestore,node_inventorytables,node_saveroutes,node_saveday toneRose
```

## Components

### Application

- [App startup](https://github.com/ssmoter/szarotka/blob/master/SzarotkaBlazor/App.xaml.cs): `SzarotkaBlazor/App.xaml.cs`

### Driver routes

- [Route selection](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Main/MainVDriversRoutesVM.cs): `DriversRoutes/Pages/Main/MainVDriversRoutesVM.cs`
- [Route records](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/SelectRoutes.cs): `DriversRoutes/Data/SelectRoutes.cs`
- [Customer stops](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/ListOfPoints/ListOfPointsVM.cs): `DriversRoutes/Pages/ListOfPoints/ListOfPointsVM.cs`
- [Customer editing](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Customer/AddCustomer/AddCustomerVM.cs): `DriversRoutes/Pages/Customer/AddCustomer/AddCustomerVM.cs`
- [Stop schedules](https://github.com/ssmoter/szarotka/blob/master/DataBase/Model/EntitiesRoutes/SelectedDayOfWeek.cs): `DataBase/Model/EntitiesRoutes/SelectedDayOfWeek.cs`
- [Route map](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Maps/MapAndPoints/MapsVM.cs): `DriversRoutes/Pages/Maps/MapAndPoints/MapsVM.cs`
- [Turn navigation](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Pages/Maps/Navigate/NavigateVM.cs): `DriversRoutes/Pages/Maps/Navigate/NavigateVM.cs`
- [Device location](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/ActionLocation/CurrentLocation.cs): `DriversRoutes/Data/ActionLocation/CurrentLocation.cs`
- [Address lookup](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/GoogleApi/AddressFromCoordinates.cs): `DriversRoutes/Data/GoogleApi/AddressFromCoordinates.cs`
- [Route directions](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/GoogleApi/Routes.cs): `DriversRoutes/Data/GoogleApi/Routes.cs`

### Inventory

- [Inventory overview](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/Main/MainVM.cs): `Inventory/Pages/Main/MainVM.cs`
- [Daily inventory](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/SingleDay/SingleDayVM.cs): `Inventory/Pages/SingleDay/SingleDayVM.cs`
- [Date range](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/RangeDay/RangeDayVM.cs): `Inventory/Pages/RangeDay/RangeDayVM.cs`
- [Inventory graphs](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/RangeDay/Graph/GraphVM.cs): `Inventory/Pages/RangeDay/Graph/GraphVM.cs`
- [Product catalog](https://github.com/ssmoter/szarotka/blob/master/Inventory/Pages/Products/ListProduct/ListProductVM.cs): `Inventory/Pages/Products/ListProduct/ListProductVM.cs`
- [CSV export](https://github.com/ssmoter/szarotka/blob/master/Inventory/Data/File/CSVFile.cs): `Inventory/Data/File/CSVFile.cs`

### Shared data

- [Database access](https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/AccessDataBase.cs): `DataBase/Data/AccessDataBase.cs`
- [Local route store](https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/DriversRoutesTables.cs): `DataBase/Data/DriversRoutesTables.cs`
- [Inventory store](https://github.com/ssmoter/szarotka/blob/master/DataBase/Data/InventoryTables.cs): `DataBase/Data/InventoryTables.cs`
- [Route persistence](https://github.com/ssmoter/szarotka/blob/master/DriversRoutes/Data/SaveRoutes.cs): `DriversRoutes/Data/SaveRoutes.cs`
- [Daily persistence](https://github.com/ssmoter/szarotka/blob/master/Inventory/Data/SaveDayService.cs): `Inventory/Data/SaveDayService.cs`

### Other components

- **User**
- **Google Maps API**

## Connections

- User → App startup: opens
- App startup → Route selection: starts route area
- Route selection → Database access: loads routes
- Route selection → Route map: opens selected route
- Route selection → Customer stops: opens stop list
- Route map → Device location: requests location
- Route map → Address lookup: resolves coordinates
- Route map → Route directions: requests directions
- Turn navigation → Device location: uses location
- Address lookup → Google Maps API: calls geocoding
- Route directions → Google Maps API: requests routes
- Customer editing → Route persistence: saves customer
- Route persistence → Database access: writes records
- Database access → Local route store: accesses tables
- User → Inventory overview: opens inventory
- Inventory overview → Daily inventory: opens daily view
- Inventory overview → Date range: opens date range
- Date range → Inventory graphs: presents graph
- Daily inventory → CSV export: exports data
- Daily inventory → Daily persistence: saves daily data
- Daily persistence → Database access: writes records
- Inventory overview → Product catalog: opens products
- Database access → Inventory store: accesses tables
