# vsimakhin/web-logbook architecture

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

- Interactive diagram: https://gitdiagram.com/vsimakhin/web-logbook
- Repository: https://github.com/vsimakhin/web-logbook

## Overview

Web-logbook is a self-hosted EASA-style flight logbook: pilots manage flight records and related reference data, then review statistics, maps, and printable exports. The sampled frontend establishes browser routing and shared providers; the README documents the broader product capabilities. Backend handlers, database operations, and several feature modules are indexed but not excerpted, so uncertain runtime connections are shown as dashed and uncited rather than inferred as definite calls.

Main entry points: [`app/routes.go`](https://github.com/vsimakhin/web-logbook/blob/main/app/routes.go) (HTTP handlers), [`app/ui/src/main.jsx`](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/main.jsx) (Browser UI), [`app/ui/src/components/FlightRecord/FlightRecord.jsx`](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/FlightRecord/FlightRecord.jsx) (Flight record), [`app/ui/src/components/Logbook/LogbookTable.jsx`](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Logbook/LogbookTable.jsx) (Logbook table)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_browser["Browser UI<br/>[main.jsx]"]
  node_app_shell["App providers<br/>[App.jsx]"]
end

subgraph group_flight["Flight records"]
  node_logbook["Logbook table<br/>[LogbookTable.jsx]"]
  node_flight_record["Flight record<br/>[FlightRecord.jsx]"]
  node_attachments["Flight attachments<br/>[Attachments.jsx]"]
  node_import["CSV import<br/>[Import.jsx]"]
end

subgraph group_reference["Logbook data"]
  node_aircraft["Aircraft<br/>[Aircrafts.jsx]"]
  node_airports["Airports<br/>[Airports.jsx]"]
  node_persons["People<br/>[Persons.jsx]"]
  node_licensing["Licenses<br/>[Licensing.jsx]"]
  node_currency["Currency tracking<br/>[Currency.jsx]"]
  node_settings["Settings and fields<br/>[Settings.jsx]"]
end

subgraph group_insights["Analysis and export"]
  node_map["Flight map<br/>[MapPage.jsx]"]
  node_stats["Statistics dashboard"]
  node_pdf_ui["PDF export setup<br/>[PdfExport.jsx]"]
  node_pdf_engine["PDF generation<br/>[pdfexport.go]"]
end

subgraph group_backend["Application services"]
  node_http_api["HTTP handlers<br/>[routes.go]"]
  node_flight_handler["Flight handlers"]
  node_model_store["Domain models<br/>[flightrecords.go]"]
  node_database[("SQLite or MySQL<br/>[driver.go]")]
  node_nighttime["Night-time calculation<br/>[nighttime.go]"]
end

node_pilot(("Pilot"))

node_pilot -->|"uses"| node_browser
node_browser -->|"mounts"| node_app_shell
node_pilot -.->|"records flights"| node_logbook
node_pilot -.->|"edits details"| node_flight_record
node_pilot -.->|"imports CSV"| node_import
node_pilot -.->|"manages"| node_aircraft
node_pilot -.->|"manages"| node_airports
node_pilot -.->|"manages"| node_persons
node_pilot -.->|"tracks licenses"| node_licensing
node_pilot -.->|"checks currency"| node_currency
node_pilot -.->|"configures"| node_settings
node_pilot -.->|"visualizes flights"| node_map
node_pilot -.->|"reviews statistics"| node_stats
node_pilot -.->|"exports logbook"| node_pdf_ui
node_browser -->|"routes to"| node_logbook
node_browser -->|"routes to"| node_flight_record
node_browser -->|"routes to"| node_licensing
node_app_shell -.->|"provides UI context"| node_http_api
node_logbook -.->|"requests records"| node_http_api
node_flight_record -.->|"saves records"| node_http_api
node_attachments -.->|"manages files"| node_http_api
node_import -.->|"submits import"| node_http_api
node_http_api -.->|"dispatches"| node_flight_handler
node_flight_handler -.->|"uses models"| node_model_store
node_model_store -.->|"persists data"| node_database
node_flight_record -.->|"calculates night time"| node_nighttime
node_pdf_ui -.->|"requests PDF"| node_pdf_engine
node_pdf_engine -.->|"reads flight data"| node_model_store

click node_browser "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/main.jsx"
click node_app_shell "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/App.jsx"
click node_logbook "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Logbook/LogbookTable.jsx"
click node_flight_record "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/FlightRecord/FlightRecord.jsx"
click node_attachments "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/FlightRecordAttachment/Attachments.jsx"
click node_import "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Import/Import.jsx"
click node_aircraft "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Aircrafts/Aircrafts.jsx"
click node_airports "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Airports/Airports.jsx"
click node_persons "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Persons/Persons.jsx"
click node_licensing "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Licensing/Licensing.jsx"
click node_currency "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Currency/Currency.jsx"
click node_settings "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Settings/Settings.jsx"
click node_map "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/pages/MapPage.jsx"
click node_stats "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Stats/Dashboard/TotalsDashboard.jsx"
click node_pdf_ui "https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/PdfExport/PdfExport.jsx"
click node_pdf_engine "https://github.com/vsimakhin/web-logbook/blob/main/internal/pdfexport/pdfexport.go"
click node_http_api "https://github.com/vsimakhin/web-logbook/blob/main/app/routes.go"
click node_flight_handler "https://github.com/vsimakhin/web-logbook/blob/main/app/handlers_flightrecord.go"
click node_model_store "https://github.com/vsimakhin/web-logbook/blob/main/internal/models/flightrecords.go"
click node_database "https://github.com/vsimakhin/web-logbook/blob/main/internal/driver/driver.go"
click node_nighttime "https://github.com/vsimakhin/web-logbook/blob/main/internal/nighttime/nighttime.go"

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_browser,node_app_shell toneBlue
class node_logbook,node_flight_record,node_attachments,node_import toneAmber
class node_aircraft,node_airports,node_persons,node_licensing,node_currency,node_settings toneMint
class node_map,node_stats,node_pdf_ui,node_pdf_engine toneRose
class node_http_api,node_flight_handler,node_model_store,node_database,node_nighttime,node_pilot toneIndigo
```

## Components

### Web experience

- [Browser UI](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/main.jsx): `app/ui/src/main.jsx`
- [App providers](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/App.jsx): `app/ui/src/App.jsx`

### Flight records

- [Logbook table](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Logbook/LogbookTable.jsx): `app/ui/src/components/Logbook/LogbookTable.jsx`
- [Flight record](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/FlightRecord/FlightRecord.jsx): `app/ui/src/components/FlightRecord/FlightRecord.jsx`
- [Flight attachments](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/FlightRecordAttachment/Attachments.jsx): `app/ui/src/components/FlightRecordAttachment/Attachments.jsx`
- [CSV import](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Import/Import.jsx): `app/ui/src/components/Import/Import.jsx`

### Logbook data

- [Aircraft](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Aircrafts/Aircrafts.jsx): `app/ui/src/components/Aircrafts/Aircrafts.jsx`
- [Airports](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Airports/Airports.jsx): `app/ui/src/components/Airports/Airports.jsx`
- [People](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Persons/Persons.jsx): `app/ui/src/components/Persons/Persons.jsx`
- [Licenses](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Licensing/Licensing.jsx): `app/ui/src/components/Licensing/Licensing.jsx`
- [Currency tracking](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Currency/Currency.jsx): `app/ui/src/components/Currency/Currency.jsx`
- [Settings and fields](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Settings/Settings.jsx): `app/ui/src/components/Settings/Settings.jsx`

### Analysis and export

- [Flight map](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/pages/MapPage.jsx): `app/ui/src/pages/MapPage.jsx`
- [Statistics dashboard](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/Stats/Dashboard/TotalsDashboard.jsx): `app/ui/src/components/Stats/Dashboard/TotalsDashboard.jsx`
- [PDF export setup](https://github.com/vsimakhin/web-logbook/blob/main/app/ui/src/components/PdfExport/PdfExport.jsx): `app/ui/src/components/PdfExport/PdfExport.jsx`
- [PDF generation](https://github.com/vsimakhin/web-logbook/blob/main/internal/pdfexport/pdfexport.go): `internal/pdfexport/pdfexport.go`

### Application services

- [HTTP handlers](https://github.com/vsimakhin/web-logbook/blob/main/app/routes.go): `app/routes.go`
- [Flight handlers](https://github.com/vsimakhin/web-logbook/blob/main/app/handlers_flightrecord.go): `app/handlers_flightrecord.go`
- [Domain models](https://github.com/vsimakhin/web-logbook/blob/main/internal/models/flightrecords.go): `internal/models/flightrecords.go`
- [SQLite or MySQL](https://github.com/vsimakhin/web-logbook/blob/main/internal/driver/driver.go): `internal/driver/driver.go`
- [Night-time calculation](https://github.com/vsimakhin/web-logbook/blob/main/internal/nighttime/nighttime.go): `internal/nighttime/nighttime.go`

### Other components

- **Pilot**

## Connections

- Pilot → Browser UI: uses (evidence: `README.md`)
- Browser UI → App providers: mounts (evidence: `app/ui/src/main.jsx`)
- Pilot → Logbook table: records flights (evidence: `README.md`)
- Pilot → Flight record: edits details (evidence: `README.md`)
- Pilot → CSV import: imports CSV (evidence: `README.md`)
- Pilot → Aircraft: manages (evidence: `README.md`)
- Pilot → Airports: manages (evidence: `README.md`)
- Pilot → People: manages (evidence: `README.md`)
- Pilot → Licenses: tracks licenses (evidence: `README.md`)
- Pilot → Currency tracking: checks currency (evidence: `README.md`)
- Pilot → Settings and fields: configures (evidence: `README.md`)
- Pilot → Flight map: visualizes flights (evidence: `README.md`)
- Pilot → Statistics dashboard: reviews statistics (evidence: `README.md`)
- Pilot → PDF export setup: exports logbook (evidence: `README.md`)
- Browser UI → Logbook table: routes to (evidence: `app/ui/src/main.jsx`)
- Browser UI → Flight record: routes to (evidence: `app/ui/src/main.jsx`)
- Browser UI → Licenses: routes to (evidence: `app/ui/src/main.jsx`)
- App providers → HTTP handlers: provides UI context
- Logbook table → HTTP handlers: requests records
- Flight record → HTTP handlers: saves records
- Flight attachments → HTTP handlers: manages files
- CSV import → HTTP handlers: submits import
- HTTP handlers → Flight handlers: dispatches
- Flight handlers → Domain models: uses models
- Domain models → SQLite or MySQL: persists data
- Flight record → Night-time calculation: calculates night time (evidence: `README.md`)
- PDF export setup → PDF generation: requests PDF (evidence: `README.md`)
- PDF generation → Domain models: reads flight data (evidence: `internal/pdfexport/pdfexport.go`)
