# t00ls-dev/nautavo architecture

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

- Interactive diagram: https://gitdiagram.com/t00ls-dev/nautavo
- Repository: https://github.com/t00ls-dev/nautavo

## Overview

nautavo is a browser-based route planner that turns entered or mapped locations into a reviewed route and downloadable GPX. The main workflow is plan and edit points, request road routing, then review route details and export. Separate capabilities import tracks for road alignment, support on-device navigation, provide weather and terrain-related route context, and save/share routes in the browser. The graph preserves these documented branches; source excerpts are partial, so edges between unsampled subsystems are included only where the README describes the relationship.

Main entry points: [`src/main.ts`](https://github.com/t00ls-dev/nautavo/blob/main/src/main.ts) (App entry), [`src/routing.ts`](https://github.com/t00ls-dev/nautavo/blob/main/src/routing.ts) (Route calculation), [`src/point-placement.ts`](https://github.com/t00ls-dev/nautavo/blob/main/src/point-placement.ts) (Point planning), [`src/track-match.ts`](https://github.com/t00ls-dev/nautavo/blob/main/src/track-match.ts) (Track import and match)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_planning["Plan and map"]
  node_app["App entry<br/>[main.ts]"]
  node_planner["Point planning<br/>[point-placement.ts]"]
  node_search["Place search<br/>[search.ts]"]
  node_map["Planner map<br/>[planner-map.ts]"]
end

subgraph group_route["Route and review"]
  node_route["Route calculation<br/>[routing.ts]"]
  node_routecache["Route cache<br/>[routing-cache.ts]"]
  node_core["Route and GPX model<br/>[core.ts]"]
  node_summary["Route summary<br/>[summary-ui.ts]"]
  node_directions["Turn itinerary<br/>[directions.ts]"]
  node_elevation["Elevation and climbs<br/>[elevation-ui.ts]"]
  node_surface["Road surface<br/>[surface-ui.ts]"]
  node_daylight["Daylight<br/>[daylight-ui.ts]"]
  node_weather["Weather along route<br/>[weather-ui.ts]"]
  node_traveltime["Travel-time estimate<br/>[travel-time.ts]"]
  node_units["Units and labels<br/>[units.ts]"]
end

subgraph group_track["Import and navigate"]
  node_trackimport["Track import and match<br/>[track-match.ts]"]
  node_navigation["Navigation<br/>[navigation-ui.ts]"]
  node_position["Track position<br/>[track-position.ts]"]
  node_library["Saved routes and favorites<br/>[library-ui.ts]"]
end

subgraph group_services["Services and state"]
  node_preferences["Preferences<br/>[preferences.ts]"]
  node_searchservice["Search providers<br/>[search.ts]"]
  node_routingservice["Routing providers<br/>[routing.ts]"]
  node_weatherprovider["Weather provider<br/>[open-meteo.ts]"]
  node_browserstore[("Browser storage<br/>[saved-routes.ts]")]
  node_offline["Offline support<br/>[offline.ts]"]
end

node_traveler(("Traveler"))
node_gpx["GPX file"]
node_mapdata{{"Map services"}}
node_trackservice{{"Valhalla trace service"}}
node_meteo{{"Open-Meteo"}}

node_traveler -->|"plans route"| node_app
node_app -->|"sets points"| node_planner
node_planner -->|"searches places"| node_search
node_planner -->|"selects points"| node_map
node_app -->|"requests route"| node_route
node_route -->|"calls router"| node_routingservice
node_routingservice -->|"routes points"| node_mapdata
node_route -.->|"uses cache"| node_routecache
node_route -.->|"builds route"| node_core
node_app -->|"shows review"| node_summary
node_app -->|"shows turns"| node_directions
node_app -->|"estimates time"| node_traveltime
node_traveltime -->|"reads speed"| node_preferences
node_app -->|"shows elevation"| node_elevation
node_app -->|"shows surface"| node_surface
node_app -->|"shows daylight"| node_daylight
node_app -->|"shows forecast"| node_weather
node_weather -->|"requests forecast"| node_weatherprovider
node_weatherprovider -->|"fetches data"| node_meteo
node_traveler -->|"imports track"| node_trackimport
node_trackimport -->|"aligns track"| node_trackservice
node_trackimport -.->|"produces route"| node_core
node_traveler -->|"starts navigation"| node_navigation
node_navigation -.->|"tracks progress"| node_position
node_traveler -->|"saves route"| node_library
node_library -->|"stores routes"| node_browserstore
node_library -->|"exports backup"| node_gpx
node_app -->|"exports route"| node_gpx
node_app -.->|"formats values"| node_units
node_traveler -->|"changes settings"| node_preferences
node_app -->|"enables offline"| node_offline
node_search -->|"queries providers"| node_searchservice
node_searchservice -->|"geocodes places"| node_mapdata

click node_app "https://github.com/t00ls-dev/nautavo/blob/main/src/main.ts"
click node_planner "https://github.com/t00ls-dev/nautavo/blob/main/src/point-placement.ts"
click node_search "https://github.com/t00ls-dev/nautavo/blob/main/src/search.ts"
click node_map "https://github.com/t00ls-dev/nautavo/blob/main/src/planner-map.ts"
click node_route "https://github.com/t00ls-dev/nautavo/blob/main/src/routing.ts"
click node_routecache "https://github.com/t00ls-dev/nautavo/blob/main/src/routing-cache.ts"
click node_core "https://github.com/t00ls-dev/nautavo/blob/main/src/core.ts"
click node_summary "https://github.com/t00ls-dev/nautavo/blob/main/src/summary-ui.ts"
click node_directions "https://github.com/t00ls-dev/nautavo/blob/main/src/directions.ts"
click node_elevation "https://github.com/t00ls-dev/nautavo/blob/main/src/elevation-ui.ts"
click node_surface "https://github.com/t00ls-dev/nautavo/blob/main/src/surface-ui.ts"
click node_daylight "https://github.com/t00ls-dev/nautavo/blob/main/src/daylight-ui.ts"
click node_weather "https://github.com/t00ls-dev/nautavo/blob/main/src/weather-ui.ts"
click node_trackimport "https://github.com/t00ls-dev/nautavo/blob/main/src/track-match.ts"
click node_navigation "https://github.com/t00ls-dev/nautavo/blob/main/src/navigation-ui.ts"
click node_position "https://github.com/t00ls-dev/nautavo/blob/main/src/track-position.ts"
click node_library "https://github.com/t00ls-dev/nautavo/blob/main/src/library-ui.ts"
click node_preferences "https://github.com/t00ls-dev/nautavo/blob/main/src/preferences.ts"
click node_searchservice "https://github.com/t00ls-dev/nautavo/blob/main/src/search.ts"
click node_routingservice "https://github.com/t00ls-dev/nautavo/blob/main/src/routing.ts"
click node_weatherprovider "https://github.com/t00ls-dev/nautavo/blob/main/src/open-meteo.ts"
click node_browserstore "https://github.com/t00ls-dev/nautavo/blob/main/src/saved-routes.ts"
click node_traveltime "https://github.com/t00ls-dev/nautavo/blob/main/src/travel-time.ts"
click node_units "https://github.com/t00ls-dev/nautavo/blob/main/src/units.ts"
click node_offline "https://github.com/t00ls-dev/nautavo/blob/main/src/offline.ts"

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_planner,node_search,node_map toneBlue
class node_route,node_routecache,node_core,node_summary,node_directions,node_elevation,node_surface,node_daylight,node_weather,node_traveltime,node_units toneAmber
class node_trackimport,node_navigation,node_position,node_library toneMint
class node_preferences,node_searchservice,node_routingservice,node_weatherprovider,node_browserstore,node_offline toneRose
class node_traveler,node_gpx,node_mapdata,node_trackservice,node_meteo toneIndigo
```

## Components

### Plan and map

- [App entry](https://github.com/t00ls-dev/nautavo/blob/main/src/main.ts): `src/main.ts`
- [Point planning](https://github.com/t00ls-dev/nautavo/blob/main/src/point-placement.ts): `src/point-placement.ts`
- [Place search](https://github.com/t00ls-dev/nautavo/blob/main/src/search.ts): `src/search.ts`
- [Planner map](https://github.com/t00ls-dev/nautavo/blob/main/src/planner-map.ts): `src/planner-map.ts`

### Route and review

- [Route calculation](https://github.com/t00ls-dev/nautavo/blob/main/src/routing.ts): `src/routing.ts`
- [Route cache](https://github.com/t00ls-dev/nautavo/blob/main/src/routing-cache.ts): `src/routing-cache.ts`
- [Route and GPX model](https://github.com/t00ls-dev/nautavo/blob/main/src/core.ts): `src/core.ts`
- [Route summary](https://github.com/t00ls-dev/nautavo/blob/main/src/summary-ui.ts): `src/summary-ui.ts`
- [Turn itinerary](https://github.com/t00ls-dev/nautavo/blob/main/src/directions.ts): `src/directions.ts`
- [Elevation and climbs](https://github.com/t00ls-dev/nautavo/blob/main/src/elevation-ui.ts): `src/elevation-ui.ts`
- [Road surface](https://github.com/t00ls-dev/nautavo/blob/main/src/surface-ui.ts): `src/surface-ui.ts`
- [Daylight](https://github.com/t00ls-dev/nautavo/blob/main/src/daylight-ui.ts): `src/daylight-ui.ts`
- [Weather along route](https://github.com/t00ls-dev/nautavo/blob/main/src/weather-ui.ts): `src/weather-ui.ts`
- [Travel-time estimate](https://github.com/t00ls-dev/nautavo/blob/main/src/travel-time.ts): `src/travel-time.ts`
- [Units and labels](https://github.com/t00ls-dev/nautavo/blob/main/src/units.ts): `src/units.ts`

### Import and navigate

- [Track import and match](https://github.com/t00ls-dev/nautavo/blob/main/src/track-match.ts): `src/track-match.ts`
- [Navigation](https://github.com/t00ls-dev/nautavo/blob/main/src/navigation-ui.ts): `src/navigation-ui.ts`
- [Track position](https://github.com/t00ls-dev/nautavo/blob/main/src/track-position.ts): `src/track-position.ts`
- [Saved routes and favorites](https://github.com/t00ls-dev/nautavo/blob/main/src/library-ui.ts): `src/library-ui.ts`

### Services and state

- [Preferences](https://github.com/t00ls-dev/nautavo/blob/main/src/preferences.ts): `src/preferences.ts`
- [Search providers](https://github.com/t00ls-dev/nautavo/blob/main/src/search.ts): `src/search.ts`
- [Routing providers](https://github.com/t00ls-dev/nautavo/blob/main/src/routing.ts): `src/routing.ts`
- [Weather provider](https://github.com/t00ls-dev/nautavo/blob/main/src/open-meteo.ts): `src/open-meteo.ts`
- [Browser storage](https://github.com/t00ls-dev/nautavo/blob/main/src/saved-routes.ts): `src/saved-routes.ts`
- [Offline support](https://github.com/t00ls-dev/nautavo/blob/main/src/offline.ts): `src/offline.ts`

### Other components

- **Traveler**
- **GPX file**
- **Map services**
- **Valhalla trace service**
- **Open-Meteo**

## Connections

- Traveler → App entry: plans route (evidence: `README.md`)
- App entry → Point planning: sets points (evidence: `README.md`)
- Point planning → Place search: searches places (evidence: `README.md`)
- Point planning → Planner map: selects points (evidence: `README.md`)
- App entry → Route calculation: requests route (evidence: `README.md`)
- Route calculation → Routing providers: calls router (evidence: `README.md`)
- Routing providers → Map services: routes points (evidence: `README.md`)
- Route calculation → Route cache: uses cache
- Route calculation → Route and GPX model: builds route (evidence: `src/routing.ts`)
- App entry → Route summary: shows review (evidence: `README.md`)
- App entry → Turn itinerary: shows turns (evidence: `README.md`)
- App entry → Travel-time estimate: estimates time (evidence: `README.md`)
- Travel-time estimate → Preferences: reads speed (evidence: `src/travel-time.ts`)
- App entry → Elevation and climbs: shows elevation (evidence: `README.md`)
- App entry → Road surface: shows surface (evidence: `README.md`)
- App entry → Daylight: shows daylight (evidence: `README.md`)
- App entry → Weather along route: shows forecast (evidence: `README.md`)
- Weather along route → Weather provider: requests forecast (evidence: `src/weather-ui.ts`)
- Weather provider → Open-Meteo: fetches data (evidence: `src/open-meteo.ts`)
- Traveler → Track import and match: imports track (evidence: `README.md`)
- Track import and match → Valhalla trace service: aligns track (evidence: `README.md`)
- Track import and match → Route and GPX model: produces route (evidence: `src/track-match.ts`)
- Traveler → Navigation: starts navigation (evidence: `README.md`)
- Navigation → Track position: tracks progress (evidence: `src/navigation-ui.ts`)
- Traveler → Saved routes and favorites: saves route (evidence: `README.md`)
- Saved routes and favorites → Browser storage: stores routes (evidence: `src/saved-routes.ts`)
- Saved routes and favorites → GPX file: exports backup (evidence: `README.md`)
- App entry → GPX file: exports route (evidence: `README.md`)
- App entry → Units and labels: formats values (evidence: `src/main.ts`)
- Traveler → Preferences: changes settings (evidence: `README.md`)
- App entry → Offline support: enables offline (evidence: `README.md`)
- Place search → Search providers: queries providers (evidence: `README.md`)
- Search providers → Map services: geocodes places (evidence: `README.md`)
