# poienexis/poi-zoeker architecture

> Architecture diagram of the GitHub repository poienexis/poi-zoeker, 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/poienexis/poi-zoeker
- Repository: https://github.com/poienexis/poi-zoeker

## Overview

StationZoeker is a browser-based POI finder for Dutch locations. Its main workflow loads and cleans POI datasets, lets users search, filter, and sort results by location, then opens a detail view for navigation or sharing. It also tracks favorites and recent locations and provides offline caching. The README documents Apple Maps, Google Maps, Waze, TomTom GO, and sharing to other apps. The map follows the sampled app code; unsampled page markup and styling are not expanded into separate components.

Main entry points: [`app.js`](https://github.com/poienexis/poi-zoeker/blob/main/app.js) (Load and parse), [`service-worker.js`](https://github.com/poienexis/poi-zoeker/blob/main/service-worker.js) (Offline cache), [`poi_e_station.csv`](https://github.com/poienexis/poi-zoeker/blob/main/poi_e_station.csv) (Station data), [`poi_e_verdeelkast.csv`](https://github.com/poienexis/poi-zoeker/blob/main/poi_e_verdeelkast.csv) (Charging data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["POI data"]
  node_loader["Load and parse<br/>[app.js]"]
  node_stations["Station data<br/>[poi_e_station.csv]"]
  node_chargers["Charging data"]
  node_toilets["Toilet data"]
  node_gas["Gas station data"]
  node_valves["Shutoff data"]
end

subgraph group_discovery["Find locations"]
  node_app["StationZoeker app<br/>[app.js]"]
  node_search["Search and filters<br/>[app.js]"]
  node_location["Nearby sorting<br/>[app.js]"]
  node_results["Result list<br/>[app.js]"]
end

subgraph group_actions["Location actions"]
  node_detail["POI details<br/>[app.js]"]
  node_history["Favorites and recents<br/>[app.js]"]
  node_navigation["Navigation choices<br/>[app.js]"]
  node_sharing["Share destination<br/>[app.js]"]
end

subgraph group_platform["Browser platform"]
  node_localstore[("Browser storage")]
  node_worker["Offline cache<br/>[service-worker.js]"]
end

node_user(("Visitor"))
node_remote["POI data host"]
node_navapps["Navigation apps"]
node_geolocation["Device location"]
node_shareapi["Share and clipboard"]

node_user -.->|"uses"| node_app
node_app -->|"loads data"| node_loader
node_loader -->|"fetches CSV"| node_remote
node_loader -->|"loads dataset"| node_stations
node_loader -->|"loads dataset"| node_chargers
node_loader -->|"loads dataset"| node_toilets
node_loader -->|"loads dataset"| node_gas
node_loader -->|"loads dataset"| node_valves
node_app -->|"filters results"| node_search
node_search -->|"sorts nearby"| node_location
node_location -.->|"reads position"| node_geolocation
node_search -->|"renders"| node_results
node_results -->|"opens selection"| node_detail
node_detail -->|"records visit"| node_history
node_history -->|"reads and writes"| node_localstore
node_detail -->|"builds destination"| node_navigation
node_navigation -->|"reads preference"| node_localstore
node_navigation -->|"opens app"| node_navapps
node_detail -->|"offers sharing"| node_sharing
node_sharing -->|"shares or copies"| node_shareapi
node_app -->|"registers worker"| node_worker
node_worker -->|"caches data responses"| node_remote

click node_app "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_loader "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_stations "https://github.com/poienexis/poi-zoeker/blob/main/poi_e_station.csv"
click node_chargers "https://github.com/poienexis/poi-zoeker/blob/main/poi_e_verdeelkast.csv"
click node_toilets "https://github.com/poienexis/poi-zoeker/blob/main/poi_e_toiletten.csv"
click node_gas "https://github.com/poienexis/poi-zoeker/blob/main/poi_g_gasstation.csv"
click node_valves "https://github.com/poienexis/poi-zoeker/blob/main/poi_g_grondafsluiter.csv"
click node_search "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_location "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_results "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_detail "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_history "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_navigation "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_sharing "https://github.com/poienexis/poi-zoeker/blob/main/app.js"
click node_worker "https://github.com/poienexis/poi-zoeker/blob/main/service-worker.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_loader,node_stations,node_chargers,node_toilets,node_gas,node_valves toneBlue
class node_app,node_search,node_location,node_results toneAmber
class node_detail,node_history,node_navigation,node_sharing toneMint
class node_localstore,node_worker toneRose
class node_user,node_remote,node_navapps,node_geolocation,node_shareapi toneIndigo
```

## Components

### POI data

- [Load and parse](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Station data](https://github.com/poienexis/poi-zoeker/blob/main/poi_e_station.csv): `poi_e_station.csv`
- [Charging data](https://github.com/poienexis/poi-zoeker/blob/main/poi_e_verdeelkast.csv): `poi_e_verdeelkast.csv`
- [Toilet data](https://github.com/poienexis/poi-zoeker/blob/main/poi_e_toiletten.csv): `poi_e_toiletten.csv`
- [Gas station data](https://github.com/poienexis/poi-zoeker/blob/main/poi_g_gasstation.csv): `poi_g_gasstation.csv`
- [Shutoff data](https://github.com/poienexis/poi-zoeker/blob/main/poi_g_grondafsluiter.csv): `poi_g_grondafsluiter.csv`

### Find locations

- [StationZoeker app](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Search and filters](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Nearby sorting](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Result list](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`

### Location actions

- [POI details](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Favorites and recents](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Navigation choices](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`
- [Share destination](https://github.com/poienexis/poi-zoeker/blob/main/app.js): `app.js`

### Browser platform

- **Browser storage**
- [Offline cache](https://github.com/poienexis/poi-zoeker/blob/main/service-worker.js): `service-worker.js`

### Other components

- **Visitor**
- **POI data host**
- **Navigation apps**
- **Device location**
- **Share and clipboard**

## Connections

- Visitor → StationZoeker app: uses
- StationZoeker app → Load and parse: loads data (evidence: `app.js`)
- Load and parse → POI data host: fetches CSV (evidence: `app.js`)
- Load and parse → Station data: loads dataset (evidence: `app.js`)
- Load and parse → Charging data: loads dataset (evidence: `app.js`)
- Load and parse → Toilet data: loads dataset (evidence: `app.js`)
- Load and parse → Gas station data: loads dataset (evidence: `app.js`)
- Load and parse → Shutoff data: loads dataset (evidence: `app.js`)
- StationZoeker app → Search and filters: filters results (evidence: `app.js`)
- Search and filters → Nearby sorting: sorts nearby (evidence: `app.js`)
- Nearby sorting → Device location: reads position
- Search and filters → Result list: renders (evidence: `app.js`)
- Result list → POI details: opens selection (evidence: `app.js`)
- POI details → Favorites and recents: records visit (evidence: `app.js`)
- Favorites and recents → Browser storage: reads and writes (evidence: `app.js`)
- POI details → Navigation choices: builds destination (evidence: `app.js`)
- Navigation choices → Browser storage: reads preference (evidence: `app.js`)
- Navigation choices → Navigation apps: opens app (evidence: `app.js`)
- POI details → Share destination: offers sharing (evidence: `app.js`)
- Share destination → Share and clipboard: shares or copies (evidence: `app.js`)
- StationZoeker app → Offline cache: registers worker (evidence: `app.js`)
- Offline cache → POI data host: caches data responses (evidence: `service-worker.js`)
