# justmycode37/santiago-de-claude architecture

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

- Interactive diagram: https://gitdiagram.com/justmycode37/santiago-de-claude
- Repository: https://github.com/justmycode37/santiago-de-claude

## Overview

Santiago de Claude is a Swiss community-event map and public-transport journey planner. A user searches for a place or sets trip endpoints, requests route options from the Kante engine, then views a selected journey on the map and follows its live times and progress. The repository also includes Kante’s server and routing/search engine, station and indoor-navigation features, camera stop scanning, and a native iPhone companion. Edges use the supplied excerpts, source index references, or README statements; unsampled internals are represented without guessed call links.

Main entry points: [`src/app/pill.ts`](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/pill.ts) (Map and journey UI), [`src/app/live-engine.ts`](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/live-engine.ts) (Live trip polling), [`src/engine.ts`](https://github.com/justmycode37/santiago-de-claude/blob/main/src/engine.ts) (Kante client), [`kante/engine/crates/server/src/api.rs`](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/api.rs) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_webapp["Map and journey UI<br/>[pill.ts]"]
  node_appstate["Shared app state<br/>[state.ts]"]
  node_journey_api["Kante client<br/>[engine.ts]"]
  node_journey_model["Journey model<br/>[engine-journey.ts]"]
  node_journey_steps["Journey presentation<br/>[journey-steps.ts]"]
  node_route_shapes["Route geometry<br/>[routing.ts]"]
  node_live_engine["Live trip polling<br/>[live-engine.ts]"]
  node_live_tracking["GPS and trip tracking<br/>[tracking.ts]"]
  node_location["Location sensing<br/>[location.ts]"]
  node_vehicle_map["Live vehicle display<br/>[live-vehicles.ts]"]
  node_journey_map["Journey map<br/>[journey-map.ts]"]
  node_settings["Settings and language<br/>[settings.ts]"]
  node_ticket_pricing["Ticket pricing<br/>[pricing-engine.ts]"]
end

subgraph group_kante["Kante engine"]
  node_kante_server["HTTP server<br/>[main.rs]"]
  node_kante_api["API routes<br/>[api.rs]"]
  node_kante_json["Journey and data encoding<br/>[json.rs]"]
  node_kante_live["Live API<br/>[liveapi.rs]"]
  node_kante_search["Place and address search<br/>[query.rs]"]
  node_kante_walk["Pedestrian routing<br/>[search.rs]"]
end

subgraph group_discovery["Places and events"]
  node_place_search["Place search<br/>[search.ts]"]
  node_event_map["Events and amenities<br/>[events.ts]"]
end

subgraph group_station["Station navigation"]
  node_station_view["3D station guidance<br/>[station-view.ts]"]
  node_indoor_position["Indoor positioning<br/>[indoorloc.ts]"]
  node_stop_scan["Camera stop scan<br/>[stopvision.ts]"]
end

subgraph group_companion["Companion products"]
  node_ios_companion["RightSide iPhone app<br/>[RightSideApp.swift]"]
  node_livemap["Live vehicle prototype<br/>[server.mts]"]
end

node_traveller(("Traveller"))

node_traveller -->|"uses"| node_webapp
node_webapp -->|"searches places"| node_place_search
node_webapp -->|"requests journeys"| node_journey_api
node_journey_api -->|"calls engine"| node_kante_server
node_kante_server -->|"serves routes"| node_kante_api
node_kante_api -->|"uses encoding"| node_kante_json
node_kante_api -->|"routes live requests"| node_kante_live
node_journey_api -->|"provides journey data"| node_journey_model
node_journey_model -->|"lays out journey"| node_journey_steps
node_journey_steps -->|"receives live times"| node_live_engine
node_live_engine -->|"polls trip data"| node_journey_api
node_live_engine -->|"updates trip position"| node_live_tracking
node_live_engine -->|"updates vehicles"| node_vehicle_map
node_live_engine -->|"refreshes journey UI"| node_webapp
node_live_tracking -->|"reads GPS"| node_location
node_webapp -->|"reads shared state"| node_appstate
node_webapp -->|"highlights route"| node_journey_map
node_webapp -->|"draws route geometry"| node_route_shapes
node_place_search -->|"searches engine"| node_kante_search
node_traveller -->|"opens station guidance"| node_station_view
node_traveller -->|"scans nearby stops"| node_stop_scan
node_traveller -->|"uses companion app"| node_ios_companion
node_traveller -->|"views live prototype"| node_livemap
node_traveller -->|"browses events"| node_event_map
node_webapp -->|"shows ticket pricing"| node_ticket_pricing
node_webapp -->|"uses preferences"| node_settings

click node_webapp "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/pill.ts"
click node_appstate "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/state.ts"
click node_place_search "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/search.ts"
click node_event_map "https://github.com/justmycode37/santiago-de-claude/blob/main/src/events.ts"
click node_journey_api "https://github.com/justmycode37/santiago-de-claude/blob/main/src/engine.ts"
click node_journey_model "https://github.com/justmycode37/santiago-de-claude/blob/main/src/engine-journey.ts"
click node_journey_steps "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/journey-steps.ts"
click node_route_shapes "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/routing.ts"
click node_live_engine "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/live-engine.ts"
click node_live_tracking "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/tracking.ts"
click node_location "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/location.ts"
click node_vehicle_map "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/live-vehicles.ts"
click node_journey_map "https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/journey-map.ts"
click node_kante_server "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/main.rs"
click node_kante_api "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/api.rs"
click node_kante_json "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/json.rs"
click node_kante_live "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/liveapi.rs"
click node_kante_search "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/search/src/query.rs"
click node_kante_walk "https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/walk/src/search.rs"
click node_station_view "https://github.com/justmycode37/santiago-de-claude/blob/main/src/station-view.ts"
click node_indoor_position "https://github.com/justmycode37/santiago-de-claude/blob/main/src/indoorloc.ts"
click node_stop_scan "https://github.com/justmycode37/santiago-de-claude/blob/main/src/stopvision.ts"
click node_settings "https://github.com/justmycode37/santiago-de-claude/blob/main/src/settings.ts"
click node_ticket_pricing "https://github.com/justmycode37/santiago-de-claude/blob/main/src/pricing-engine.ts"
click node_ios_companion "https://github.com/justmycode37/santiago-de-claude/blob/main/rightside/redesign/apps/ios/RightSide/RightSideApp.swift"
click node_livemap "https://github.com/justmycode37/santiago-de-claude/blob/main/livemap/server.mts"

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_webapp,node_appstate,node_journey_api,node_journey_model,node_journey_steps,node_route_shapes,node_live_engine,node_live_tracking,node_location,node_vehicle_map,node_journey_map,node_settings,node_ticket_pricing toneBlue
class node_kante_server,node_kante_api,node_kante_json,node_kante_live,node_kante_search,node_kante_walk toneAmber
class node_place_search,node_event_map toneMint
class node_station_view,node_indoor_position,node_stop_scan toneRose
class node_ios_companion,node_livemap,node_traveller toneIndigo
```

## Components

### Web app

- [Map and journey UI](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/pill.ts): `src/app/pill.ts`
- [Shared app state](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/state.ts): `src/app/state.ts`
- [Kante client](https://github.com/justmycode37/santiago-de-claude/blob/main/src/engine.ts): `src/engine.ts`
- [Journey model](https://github.com/justmycode37/santiago-de-claude/blob/main/src/engine-journey.ts): `src/engine-journey.ts`
- [Journey presentation](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/journey-steps.ts): `src/app/journey-steps.ts`
- [Route geometry](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/routing.ts): `src/app/routing.ts`
- [Live trip polling](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/live-engine.ts): `src/app/live-engine.ts`
- [GPS and trip tracking](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/tracking.ts): `src/app/tracking.ts`
- [Location sensing](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/location.ts): `src/app/location.ts`
- [Live vehicle display](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/live-vehicles.ts): `src/app/live-vehicles.ts`
- [Journey map](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/journey-map.ts): `src/app/journey-map.ts`
- [Settings and language](https://github.com/justmycode37/santiago-de-claude/blob/main/src/settings.ts): `src/settings.ts`
- [Ticket pricing](https://github.com/justmycode37/santiago-de-claude/blob/main/src/pricing-engine.ts): `src/pricing-engine.ts`

### Kante engine

- [HTTP server](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/main.rs): `kante/engine/crates/server/src/main.rs`
- [API routes](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/api.rs): `kante/engine/crates/server/src/api.rs`
- [Journey and data encoding](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/json.rs): `kante/engine/crates/server/src/json.rs`
- [Live API](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/server/src/liveapi.rs): `kante/engine/crates/server/src/liveapi.rs`
- [Place and address search](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/search/src/query.rs): `kante/engine/crates/search/src/query.rs`
- [Pedestrian routing](https://github.com/justmycode37/santiago-de-claude/blob/main/kante/engine/crates/walk/src/search.rs): `kante/engine/crates/walk/src/search.rs`

### Places and events

- [Place search](https://github.com/justmycode37/santiago-de-claude/blob/main/src/app/search.ts): `src/app/search.ts`
- [Events and amenities](https://github.com/justmycode37/santiago-de-claude/blob/main/src/events.ts): `src/events.ts`

### Station navigation

- [3D station guidance](https://github.com/justmycode37/santiago-de-claude/blob/main/src/station-view.ts): `src/station-view.ts`
- [Indoor positioning](https://github.com/justmycode37/santiago-de-claude/blob/main/src/indoorloc.ts): `src/indoorloc.ts`
- [Camera stop scan](https://github.com/justmycode37/santiago-de-claude/blob/main/src/stopvision.ts): `src/stopvision.ts`

### Companion products

- [RightSide iPhone app](https://github.com/justmycode37/santiago-de-claude/blob/main/rightside/redesign/apps/ios/RightSide/RightSideApp.swift): `rightside/redesign/apps/ios/RightSide/RightSideApp.swift`
- [Live vehicle prototype](https://github.com/justmycode37/santiago-de-claude/blob/main/livemap/server.mts): `livemap/server.mts`

### Other components

- **Traveller**

## Connections

- Traveller → Map and journey UI: uses (evidence: `README.md`)
- Map and journey UI → Place search: searches places (evidence: `README.md`)
- Map and journey UI → Kante client: requests journeys (evidence: `README.md`)
- Kante client → HTTP server: calls engine (evidence: `README.md`)
- HTTP server → API routes: serves routes (evidence: `kante/engine/crates/server/src/main.rs`)
- API routes → Journey and data encoding: uses encoding (evidence: `kante/engine/crates/server/src/api.rs`)
- API routes → Live API: routes live requests (evidence: `kante/engine/crates/server/src/api.rs`)
- Kante client → Journey model: provides journey data (evidence: `src/engine-journey.ts`)
- Journey model → Journey presentation: lays out journey (evidence: `src/engine-journey.ts`)
- Journey presentation → Live trip polling: receives live times (evidence: `src/app/live-engine.ts`)
- Live trip polling → Kante client: polls trip data (evidence: `src/app/live-engine.ts`)
- Live trip polling → GPS and trip tracking: updates trip position (evidence: `src/app/live-engine.ts`)
- Live trip polling → Live vehicle display: updates vehicles (evidence: `src/app/live-engine.ts`)
- Live trip polling → Map and journey UI: refreshes journey UI (evidence: `src/app/live-engine.ts`)
- GPS and trip tracking → Location sensing: reads GPS (evidence: `src/app/tracking.ts`)
- Map and journey UI → Shared app state: reads shared state (evidence: `src/app/pill.ts`)
- Map and journey UI → Journey map: highlights route (evidence: `src/app/pill.ts`)
- Map and journey UI → Route geometry: draws route geometry (evidence: `src/app/routing.ts`)
- Place search → Place and address search: searches engine (evidence: `README.md`)
- Traveller → 3D station guidance: opens station guidance (evidence: `README.md`)
- Traveller → Camera stop scan: scans nearby stops (evidence: `README.md`)
- Traveller → RightSide iPhone app: uses companion app (evidence: `README.md`)
- Traveller → Live vehicle prototype: views live prototype (evidence: `README.md`)
- Traveller → Events and amenities: browses events (evidence: `README.md`)
- Map and journey UI → Ticket pricing: shows ticket pricing
- Map and journey UI → Settings and language: uses preferences (evidence: `README.md`)
