# luluh19/bundle-events architecture

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

- Interactive diagram: https://gitdiagram.com/luluh19/bundle-events
- Repository: https://github.com/luluh19/bundle-events

## Overview

Bundle Events is a trip-planning web app for building an event trip with lodging and onward transport, comparing multimodal routes and emissions, viewing routes on a map, and saving or reopening a bundle. The visible workflow spans bundle setup, route selection, hotel search, and saved-bundle access; the README also documents travel-time, distance, and CO₂ comparisons. The tree and excerpts establish several API integrations and map usage, but do not expose the full page-to-service wiring, so uncertain links are omitted.

Main entry points: [`src/app/api/trains/route-geometry/route.ts`](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/trains/route-geometry/route.ts) (Route geometry), [`src/lib/supabase/server.ts`](https://github.com/luluh19/bundle-events/blob/dev/src/lib/supabase/server.ts) (Supabase client), [`src/adapters/hotels/liteapi.adapter.ts`](https://github.com/luluh19/bundle-events/blob/dev/src/adapters/hotels/liteapi.adapter.ts) (LiteAPI adapter), [`src/components/views/RoutesView.tsx`](https://github.com/luluh19/bundle-events/blob/dev/src/components/views/RoutesView.tsx) (Route choices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Trip experience"]
  node_app["App shell<br/>[layout.tsx]"]
  node_home["Trip setup<br/>[HomeView.tsx]"]
  node_builder["Bundle builder<br/>[BundleBuilder.tsx]"]
  node_bundleview["Bundle view<br/>[BundleView.tsx]"]
  node_routesview["Route choices<br/>[RoutesView.tsx]"]
  node_hotelsview["Hotel choices<br/>[HotelsView.tsx]"]
  node_map["Travel map<br/>[TravelMap.tsx]"]
end

subgraph group_planning["Route planning"]
  node_travelapi["Travel services<br/>[travel.ts]"]
  node_eventsapi["Event services<br/>[events.ts]"]
  node_geocoding["Geocoding<br/>[geocoding.ts]"]
  node_routes["Route geometry<br/>[route.ts]"]
end

subgraph group_integrations["Travel integrations"]
  node_stations["Station search<br/>[route.ts]"]
  node_trainsearch["Train search<br/>[route.ts]"]
  node_flightsearch["Flight search<br/>[route.ts]"]
  node_hotelsearch["Hotel search<br/>[route.ts]"]
  node_hoteladapter["LiteAPI adapter<br/>[liteapi.adapter.ts]"]
  node_bookingtrain["Train booking link<br/>[route.ts]"]
  node_bookingbus["Bus booking link<br/>[route.ts]"]
end

subgraph group_persistence["Bundle persistence"]
  node_bundleapi["Bundle API<br/>[route.ts]"]
  node_bundleitem["Saved bundle API<br/>[route.ts]"]
  node_supabase["Supabase client<br/>[server.ts]"]
  node_bundledb[("Bundles store")]
end

node_traveler(("Traveler"))
node_sncf["SNCF API"]
node_travelpayouts["Travelpayouts"]
node_liteapi["LiteAPI"]
node_railrouting["Rail routing"]
node_osrm["OSRM"]
node_trainline["Trainline"]
node_flixbus["FlixBus"]

node_traveler -->|"opens"| node_app
node_routesview -->|"renders"| node_map
node_stations -->|"fetches stations"| node_sncf
node_trainsearch -->|"searches journeys"| node_sncf
node_routes -->|"fetches journeys"| node_sncf
node_routes -->|"requests rail geometry"| node_railrouting
node_routes -->|"requests fallback geometry"| node_osrm
node_flightsearch -->|"searches fares"| node_travelpayouts
node_hotelsearch -->|"calls"| node_hoteladapter
node_hoteladapter -->|"searches hotels"| node_liteapi
node_bookingtrain -->|"resolves locations"| node_trainline
node_bookingbus -->|"resolves cities"| node_flixbus
node_bundleapi -->|"uses client"| node_supabase
node_bundleitem -->|"uses client"| node_supabase
node_supabase -->|"reads and writes"| node_bundledb

click node_app "https://github.com/luluh19/bundle-events/blob/dev/src/app/layout.tsx"
click node_home "https://github.com/luluh19/bundle-events/blob/dev/src/components/views/HomeView.tsx"
click node_builder "https://github.com/luluh19/bundle-events/blob/dev/src/components/BundleBuilder.tsx"
click node_bundleview "https://github.com/luluh19/bundle-events/blob/dev/src/components/views/BundleView.tsx"
click node_routesview "https://github.com/luluh19/bundle-events/blob/dev/src/components/views/RoutesView.tsx"
click node_hotelsview "https://github.com/luluh19/bundle-events/blob/dev/src/components/views/HotelsView.tsx"
click node_map "https://github.com/luluh19/bundle-events/blob/dev/src/components/TravelMap.tsx"
click node_travelapi "https://github.com/luluh19/bundle-events/blob/dev/src/services/travel.ts"
click node_eventsapi "https://github.com/luluh19/bundle-events/blob/dev/src/services/events.ts"
click node_geocoding "https://github.com/luluh19/bundle-events/blob/dev/src/services/geocoding.ts"
click node_routes "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/trains/route-geometry/route.ts"
click node_stations "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/stations/route.ts"
click node_trainsearch "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/trains/search/route.ts"
click node_flightsearch "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/flights/search/route.ts"
click node_hotelsearch "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/hotels/search/route.ts"
click node_hoteladapter "https://github.com/luluh19/bundle-events/blob/dev/src/adapters/hotels/liteapi.adapter.ts"
click node_bookingtrain "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/booking/train/route.ts"
click node_bookingbus "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/booking/bus/route.ts"
click node_bundleapi "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/bundles/route.ts"
click node_bundleitem "https://github.com/luluh19/bundle-events/blob/dev/src/app/api/bundles/%5Buuid%5D/route.ts"
click node_supabase "https://github.com/luluh19/bundle-events/blob/dev/src/lib/supabase/server.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_home,node_builder,node_bundleview,node_routesview,node_hotelsview,node_map toneBlue
class node_travelapi,node_eventsapi,node_geocoding,node_routes toneAmber
class node_stations,node_trainsearch,node_flightsearch,node_hotelsearch,node_hoteladapter,node_bookingtrain,node_bookingbus,node_sncf,node_liteapi toneMint
class node_bundleapi,node_bundleitem,node_supabase,node_bundledb toneRose
class node_traveler,node_travelpayouts,node_railrouting,node_osrm,node_trainline,node_flixbus toneIndigo
```

## Components

### Trip experience

- [App shell](https://github.com/luluh19/bundle-events/blob/dev/src/app/layout.tsx): `src/app/layout.tsx`
- [Trip setup](https://github.com/luluh19/bundle-events/blob/dev/src/components/views/HomeView.tsx): `src/components/views/HomeView.tsx`
- [Bundle builder](https://github.com/luluh19/bundle-events/blob/dev/src/components/BundleBuilder.tsx): `src/components/BundleBuilder.tsx`
- [Bundle view](https://github.com/luluh19/bundle-events/blob/dev/src/components/views/BundleView.tsx): `src/components/views/BundleView.tsx`
- [Route choices](https://github.com/luluh19/bundle-events/blob/dev/src/components/views/RoutesView.tsx): `src/components/views/RoutesView.tsx`
- [Hotel choices](https://github.com/luluh19/bundle-events/blob/dev/src/components/views/HotelsView.tsx): `src/components/views/HotelsView.tsx`
- [Travel map](https://github.com/luluh19/bundle-events/blob/dev/src/components/TravelMap.tsx): `src/components/TravelMap.tsx`

### Route planning

- [Travel services](https://github.com/luluh19/bundle-events/blob/dev/src/services/travel.ts): `src/services/travel.ts`
- [Event services](https://github.com/luluh19/bundle-events/blob/dev/src/services/events.ts): `src/services/events.ts`
- [Geocoding](https://github.com/luluh19/bundle-events/blob/dev/src/services/geocoding.ts): `src/services/geocoding.ts`
- [Route geometry](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/trains/route-geometry/route.ts): `src/app/api/trains/route-geometry/route.ts`

### Travel integrations

- [Station search](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/stations/route.ts): `src/app/api/stations/route.ts`
- [Train search](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/trains/search/route.ts): `src/app/api/trains/search/route.ts`
- [Flight search](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/flights/search/route.ts): `src/app/api/flights/search/route.ts`
- [Hotel search](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/hotels/search/route.ts): `src/app/api/hotels/search/route.ts`
- [LiteAPI adapter](https://github.com/luluh19/bundle-events/blob/dev/src/adapters/hotels/liteapi.adapter.ts): `src/adapters/hotels/liteapi.adapter.ts`
- [Train booking link](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/booking/train/route.ts): `src/app/api/booking/train/route.ts`
- [Bus booking link](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/booking/bus/route.ts): `src/app/api/booking/bus/route.ts`

### Bundle persistence

- [Bundle API](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/bundles/route.ts): `src/app/api/bundles/route.ts`
- [Saved bundle API](https://github.com/luluh19/bundle-events/blob/dev/src/app/api/bundles/%5Buuid%5D/route.ts): `src/app/api/bundles/[uuid]/route.ts`
- [Supabase client](https://github.com/luluh19/bundle-events/blob/dev/src/lib/supabase/server.ts): `src/lib/supabase/server.ts`
- **Bundles store**

### Other components

- **Traveler**
- **SNCF API**
- **Travelpayouts**
- **LiteAPI**
- **Rail routing**
- **OSRM**
- **Trainline**
- **FlixBus**

## Connections

- Traveler → App shell: opens
- Route choices → Travel map: renders
- Station search → SNCF API: fetches stations
- Train search → SNCF API: searches journeys
- Route geometry → SNCF API: fetches journeys
- Route geometry → Rail routing: requests rail geometry
- Route geometry → OSRM: requests fallback geometry
- Flight search → Travelpayouts: searches fares
- Hotel search → LiteAPI adapter: calls
- LiteAPI adapter → LiteAPI: searches hotels
- Train booking link → Trainline: resolves locations
- Bus booking link → FlixBus: resolves cities
- Bundle API → Supabase client: uses client
- Saved bundle API → Supabase client: uses client
- Supabase client → Bundles store: reads and writes
