# nardo-webbie/camperroute architecture

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

- Interactive diagram: https://gitdiagram.com/nardo-webbie/camperroute
- Repository: https://github.com/nardo-webbie/camperroute

## Overview

This is a camper-trip planning web app: users can browse and generate multi-day trips or weekend ideas, then add trip-specific tips. The sampled API handlers show AI generation, optional Campz lookups, weather and place-rating endpoints, and GitHub Gist persistence. The tree identifies index.html as the frontend, but its source was not excerpted, so frontend-to-API wiring and other UI behavior cannot be verified. The one-off data-fill scripts are excluded as maintenance tooling.

Main entry points: [`api/generate-weekend.js`](https://github.com/nardo-webbie/camperroute/blob/master/api/generate-weekend.js) (Weekend planning), [`api/generate-trip.js`](https://github.com/nardo-webbie/camperroute/blob/master/api/generate-trip.js) (Trip generation), [`api/tips.js`](https://github.com/nardo-webbie/camperroute/blob/master/api/tips.js) (Trip tips), [`api/weather.js`](https://github.com/nardo-webbie/camperroute/blob/master/api/weather.js) (Weather forecast)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_site["Planning interface<br/>[index.html]"]
end

subgraph group_planning["Trip planning"]
  node_trip_api["Trip generation<br/>[generate-trip.js]"]
  node_weekend_api["Weekend planning"]
  node_tips_api["Trip tips<br/>[tips.js]"]
  node_ai["Anthropic AI"]
end

subgraph group_enrichment["Travel enrichment"]
  node_campz["Campz places"]
  node_weather_api["Weather forecast<br/>[weather.js]"]
  node_weather_service["Xweather forecast"]
  node_places_api["Place ratings<br/>[gplace.js]"]
  node_google_places["Google Places"]
end

subgraph group_storage["Shared persistence"]
  node_gist[("GitHub Gist")]
end

node_traveler(("Traveler"))

node_traveler -->|"uses"| node_site
node_trip_api -->|"generates with"| node_ai
node_trip_api -->|"reads and writes"| node_gist
node_weekend_api -->|"generates with"| node_ai
node_weekend_api -.->|"optionally queries"| node_campz
node_weekend_api -->|"reads and writes"| node_gist
node_tips_api -->|"generates with"| node_ai
node_tips_api -->|"reads and writes"| node_gist
node_weather_api -->|"fetches forecast"| node_weather_service
node_places_api -->|"searches places"| node_google_places

click node_site "https://github.com/nardo-webbie/camperroute/blob/master/index.html"
click node_trip_api "https://github.com/nardo-webbie/camperroute/blob/master/api/generate-trip.js"
click node_weekend_api "https://github.com/nardo-webbie/camperroute/blob/master/api/generate-weekend.js"
click node_tips_api "https://github.com/nardo-webbie/camperroute/blob/master/api/tips.js"
click node_weather_api "https://github.com/nardo-webbie/camperroute/blob/master/api/weather.js"
click node_places_api "https://github.com/nardo-webbie/camperroute/blob/master/api/gplace.js"

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_site toneBlue
class node_trip_api,node_weekend_api,node_tips_api,node_ai toneAmber
class node_campz,node_weather_api,node_weather_service,node_places_api,node_google_places toneMint
class node_gist toneRose
class node_traveler toneIndigo
```

## Components

### Web interface

- [Planning interface](https://github.com/nardo-webbie/camperroute/blob/master/index.html): `index.html`

### Trip planning

- [Trip generation](https://github.com/nardo-webbie/camperroute/blob/master/api/generate-trip.js): `api/generate-trip.js`
- [Weekend planning](https://github.com/nardo-webbie/camperroute/blob/master/api/generate-weekend.js): `api/generate-weekend.js`
- [Trip tips](https://github.com/nardo-webbie/camperroute/blob/master/api/tips.js): `api/tips.js`
- **Anthropic AI**

### Travel enrichment

- **Campz places**
- [Weather forecast](https://github.com/nardo-webbie/camperroute/blob/master/api/weather.js): `api/weather.js`
- **Xweather forecast**
- [Place ratings](https://github.com/nardo-webbie/camperroute/blob/master/api/gplace.js): `api/gplace.js`
- **Google Places**

### Shared persistence

- **GitHub Gist**

### Other components

- **Traveler**

## Connections

- Traveler → Planning interface: uses
- Trip generation → Anthropic AI: generates with (evidence: `api/generate-trip.js`)
- Trip generation → GitHub Gist: reads and writes (evidence: `api/generate-trip.js`)
- Weekend planning → Anthropic AI: generates with (evidence: `api/generate-weekend.js`)
- Weekend planning → Campz places: optionally queries (evidence: `api/generate-weekend.js`)
- Weekend planning → GitHub Gist: reads and writes (evidence: `api/generate-weekend.js`)
- Trip tips → Anthropic AI: generates with (evidence: `api/tips.js`)
- Trip tips → GitHub Gist: reads and writes (evidence: `api/tips.js`)
- Weather forecast → Xweather forecast: fetches forecast (evidence: `api/weather.js`)
- Place ratings → Google Places: searches places (evidence: `api/gplace.js`)
