# harvey-euph/inter-geo architecture

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

- Interactive diagram: https://gitdiagram.com/harvey-euph/inter-geo
- Repository: https://github.com/harvey-euph/inter-geo

## Overview

Inter-Geo is a front-end GIS and GeoGuessr exploration aid. Users navigate a canvas map from country to finer administrative boundaries, inspect selected places and road clues, and overlay geographic layers; Markdown dossiers and Street View add contextual evidence. The app loads indexes and content from a separate data repository. The graph preserves documented CSV layers, union borders, URL-driven navigation, and developer editing capabilities. Some components are represented from README documentation or index references; their detailed runtime wiring was not sampled, so uncertain connections are omitted.

Main entry points: [`src/components/WorldMap.tsx`](https://github.com/harvey-euph/inter-geo/blob/main/src/components/WorldMap.tsx) (Interactive Map), [`src/layers/csvLayerRegistry.ts`](https://github.com/harvey-euph/inter-geo/blob/main/src/layers/csvLayerRegistry.ts) (CSV Layer Registry), [`src/components/MarkdownInfoCard.tsx`](https://github.com/harvey-euph/inter-geo/blob/main/src/components/MarkdownInfoCard.tsx) (Info Dossiers), [`src/data/geoIndexClient.ts`](https://github.com/harvey-euph/inter-geo/blob/main/src/data/geoIndexClient.ts) (Remote Indexes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and Exploration"]
  node_app["App State<br/>[App.tsx]"]
  node_map["Interactive Map<br/>[WorldMap.tsx]"]
  node_detail["Place Details"]
  node_picker["L3 Picker<br/>[L3ChildPicker.tsx]"]
  node_quiz["Geo Quiz<br/>[QuizModal.tsx]"]
end

subgraph group_geo["Geospatial Data"]
  node_geoindex["Remote Indexes<br/>[geoIndexClient.ts]"]
  node_datasource["Content URLs<br/>[dataSource.ts]"]
  node_countries["Country Catalog<br/>[countries.ts]"]
  node_worker["Geometry Decoder"]
  node_workerclient["Worker Client<br/>[geoWorkerClient.ts]"]
  node_projection["Map Projection<br/>[geo.ts]"]
end

subgraph group_layers["Layers and Rendering"]
  node_csvregistry["CSV Layer Registry"]
  node_csvparser["CSV Parser<br/>[csvLayerParser.ts]"]
  node_assignable["Region Assignment"]
  node_extobjects["External Features<br/>[extObjectLoader.ts]"]
  node_nationwide["Nationwide Layers"]
  node_renderer["Canvas Renderer<br/>[renderLayers.ts]"]
  node_dissolve["Union Borders<br/>[unionDissolve.ts]"]
end

subgraph group_info["Dossiers and Street View"]
  node_infopanel["Info Dossiers"]
  node_inforegistry["Info Registry<br/>[infoRegistry.ts]"]
  node_infoparser["Info Parser<br/>[infoParser.ts]"]
  node_streetview["Street View Embed"]
end

subgraph group_tools["Developer Tools"]
  node_sizecontrols["Layer Size Controls"]
  node_writer["Article Writer"]
end

node_user(("Explorer"))
node_google["Google Maps"]

node_user -->|"interacts with"| node_app
node_app -->|"renders"| node_map
node_app -->|"renders"| node_quiz
node_map -->|"loads indexes"| node_geoindex
node_map -->|"fetches geometry"| node_datasource
node_geoindex -->|"builds index URLs"| node_datasource
node_geoindex -->|"syncs country data"| node_countries
node_map -->|"requests decode"| node_workerclient
node_workerclient -.->|"dispatches decode"| node_worker
node_worker -->|"projects geometry"| node_projection
node_map -->|"loads active layers"| node_csvregistry
node_csvregistry -->|"loads layer index"| node_geoindex
node_csvregistry -->|"fetches CSV"| node_datasource
node_csvregistry -->|"parses CSV"| node_csvparser
node_csvregistry -->|"checks regions"| node_assignable
node_map -->|"loads features"| node_extobjects
node_nationwide -->|"reads registered layers"| node_csvregistry
node_map -->|"draws map"| node_renderer
node_renderer -->|"dissolves borders"| node_dissolve
node_user -->|"navigates"| node_map
node_map -->|"opens selected details"| node_detail
node_detail -->|"offers L3 drilldown"| node_picker
node_detail -.->|"shows dossier"| node_infopanel
node_infopanel -->|"queries dossiers"| node_inforegistry
node_inforegistry -->|"parses entries"| node_infoparser
node_inforegistry -->|"loads info indexes"| node_geoindex
node_infopanel -->|"embeds Street View"| node_streetview
node_streetview -->|"embeds maps"| node_google
node_infopanel -->|"offers size tuning"| node_sizecontrols
node_infopanel -.->|"writes article"| node_writer

click node_app "https://github.com/harvey-euph/inter-geo/blob/main/src/App.tsx"
click node_map "https://github.com/harvey-euph/inter-geo/blob/main/src/components/WorldMap.tsx"
click node_detail "https://github.com/harvey-euph/inter-geo/blob/main/src/components/CountryDetailPanel.tsx"
click node_picker "https://github.com/harvey-euph/inter-geo/blob/main/src/components/L3ChildPicker.tsx"
click node_quiz "https://github.com/harvey-euph/inter-geo/blob/main/src/components/QuizModal.tsx"
click node_geoindex "https://github.com/harvey-euph/inter-geo/blob/main/src/data/geoIndexClient.ts"
click node_datasource "https://github.com/harvey-euph/inter-geo/blob/main/src/data/dataSource.ts"
click node_countries "https://github.com/harvey-euph/inter-geo/blob/main/src/data/countries.ts"
click node_worker "https://github.com/harvey-euph/inter-geo/blob/main/src/map/geoDecode.worker.ts"
click node_workerclient "https://github.com/harvey-euph/inter-geo/blob/main/src/map/geoWorkerClient.ts"
click node_projection "https://github.com/harvey-euph/inter-geo/blob/main/src/map/geo.ts"
click node_csvregistry "https://github.com/harvey-euph/inter-geo/blob/main/src/layers/csvLayerRegistry.ts"
click node_csvparser "https://github.com/harvey-euph/inter-geo/blob/main/src/layers/csvLayerParser.ts"
click node_assignable "https://github.com/harvey-euph/inter-geo/blob/main/src/layers/assignableRegions.ts"
click node_extobjects "https://github.com/harvey-euph/inter-geo/blob/main/src/layers/extObjectLoader.ts"
click node_nationwide "https://github.com/harvey-euph/inter-geo/blob/main/src/data/nationwideLayers.ts"
click node_renderer "https://github.com/harvey-euph/inter-geo/blob/main/src/map/render/renderLayers.ts"
click node_dissolve "https://github.com/harvey-euph/inter-geo/blob/main/src/map/unionDissolve.ts"
click node_infopanel "https://github.com/harvey-euph/inter-geo/blob/main/src/components/MarkdownInfoCard.tsx"
click node_inforegistry "https://github.com/harvey-euph/inter-geo/blob/main/src/info/infoRegistry.ts"
click node_infoparser "https://github.com/harvey-euph/inter-geo/blob/main/src/info/infoParser.ts"
click node_streetview "https://github.com/harvey-euph/inter-geo/blob/main/src/components/GoogleMapsEmbed.tsx"
click node_sizecontrols "https://github.com/harvey-euph/inter-geo/blob/main/src/components/LayerSizeControls.tsx"
click node_writer "https://github.com/harvey-euph/inter-geo/blob/main/scripts/info-article-writer.mjs"

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_map,node_detail,node_picker,node_quiz toneBlue
class node_geoindex,node_datasource,node_countries,node_worker,node_workerclient,node_projection toneAmber
class node_csvregistry,node_csvparser,node_assignable,node_extobjects,node_nationwide,node_renderer,node_dissolve toneMint
class node_infopanel,node_inforegistry,node_infoparser,node_streetview toneRose
class node_sizecontrols,node_writer,node_user,node_google toneIndigo
```

## Components

### App and Exploration

- [App State](https://github.com/harvey-euph/inter-geo/blob/main/src/App.tsx): `src/App.tsx`
- [Interactive Map](https://github.com/harvey-euph/inter-geo/blob/main/src/components/WorldMap.tsx): `src/components/WorldMap.tsx`
- [Place Details](https://github.com/harvey-euph/inter-geo/blob/main/src/components/CountryDetailPanel.tsx): `src/components/CountryDetailPanel.tsx`
- [L3 Picker](https://github.com/harvey-euph/inter-geo/blob/main/src/components/L3ChildPicker.tsx): `src/components/L3ChildPicker.tsx`
- [Geo Quiz](https://github.com/harvey-euph/inter-geo/blob/main/src/components/QuizModal.tsx): `src/components/QuizModal.tsx`

### Geospatial Data

- [Remote Indexes](https://github.com/harvey-euph/inter-geo/blob/main/src/data/geoIndexClient.ts): `src/data/geoIndexClient.ts`
- [Content URLs](https://github.com/harvey-euph/inter-geo/blob/main/src/data/dataSource.ts): `src/data/dataSource.ts`
- [Country Catalog](https://github.com/harvey-euph/inter-geo/blob/main/src/data/countries.ts): `src/data/countries.ts`
- [Geometry Decoder](https://github.com/harvey-euph/inter-geo/blob/main/src/map/geoDecode.worker.ts): `src/map/geoDecode.worker.ts`
- [Worker Client](https://github.com/harvey-euph/inter-geo/blob/main/src/map/geoWorkerClient.ts): `src/map/geoWorkerClient.ts`
- [Map Projection](https://github.com/harvey-euph/inter-geo/blob/main/src/map/geo.ts): `src/map/geo.ts`

### Layers and Rendering

- [CSV Layer Registry](https://github.com/harvey-euph/inter-geo/blob/main/src/layers/csvLayerRegistry.ts): `src/layers/csvLayerRegistry.ts`
- [CSV Parser](https://github.com/harvey-euph/inter-geo/blob/main/src/layers/csvLayerParser.ts): `src/layers/csvLayerParser.ts`
- [Region Assignment](https://github.com/harvey-euph/inter-geo/blob/main/src/layers/assignableRegions.ts): `src/layers/assignableRegions.ts`
- [External Features](https://github.com/harvey-euph/inter-geo/blob/main/src/layers/extObjectLoader.ts): `src/layers/extObjectLoader.ts`
- [Nationwide Layers](https://github.com/harvey-euph/inter-geo/blob/main/src/data/nationwideLayers.ts): `src/data/nationwideLayers.ts`
- [Canvas Renderer](https://github.com/harvey-euph/inter-geo/blob/main/src/map/render/renderLayers.ts): `src/map/render/renderLayers.ts`
- [Union Borders](https://github.com/harvey-euph/inter-geo/blob/main/src/map/unionDissolve.ts): `src/map/unionDissolve.ts`

### Dossiers and Street View

- [Info Dossiers](https://github.com/harvey-euph/inter-geo/blob/main/src/components/MarkdownInfoCard.tsx): `src/components/MarkdownInfoCard.tsx`
- [Info Registry](https://github.com/harvey-euph/inter-geo/blob/main/src/info/infoRegistry.ts): `src/info/infoRegistry.ts`
- [Info Parser](https://github.com/harvey-euph/inter-geo/blob/main/src/info/infoParser.ts): `src/info/infoParser.ts`
- [Street View Embed](https://github.com/harvey-euph/inter-geo/blob/main/src/components/GoogleMapsEmbed.tsx): `src/components/GoogleMapsEmbed.tsx`

### Developer Tools

- [Layer Size Controls](https://github.com/harvey-euph/inter-geo/blob/main/src/components/LayerSizeControls.tsx): `src/components/LayerSizeControls.tsx`
- [Article Writer](https://github.com/harvey-euph/inter-geo/blob/main/scripts/info-article-writer.mjs): `scripts/info-article-writer.mjs`

### Other components

- **Explorer**
- **Google Maps**

## Connections

- Explorer → App State: interacts with (evidence: `README.md`)
- App State → Interactive Map: renders (evidence: `src/App.tsx`)
- App State → Geo Quiz: renders (evidence: `src/App.tsx`)
- Interactive Map → Remote Indexes: loads indexes (evidence: `src/components/WorldMap.tsx`)
- Interactive Map → Content URLs: fetches geometry (evidence: `src/components/WorldMap.tsx`)
- Remote Indexes → Content URLs: builds index URLs (evidence: `src/data/geoIndexClient.ts`)
- Remote Indexes → Country Catalog: syncs country data (evidence: `src/data/countries.ts`)
- Interactive Map → Worker Client: requests decode (evidence: `src/components/WorldMap.tsx`)
- Worker Client → Geometry Decoder: dispatches decode
- Geometry Decoder → Map Projection: projects geometry (evidence: `src/map/geoDecode.worker.ts`)
- Interactive Map → CSV Layer Registry: loads active layers (evidence: `src/components/WorldMap.tsx`)
- CSV Layer Registry → Remote Indexes: loads layer index (evidence: `src/layers/csvLayerRegistry.ts`)
- CSV Layer Registry → Content URLs: fetches CSV (evidence: `src/layers/csvLayerRegistry.ts`)
- CSV Layer Registry → CSV Parser: parses CSV (evidence: `src/layers/csvLayerRegistry.ts`)
- CSV Layer Registry → Region Assignment: checks regions (evidence: `src/layers/csvLayerRegistry.ts`)
- Interactive Map → External Features: loads features (evidence: `src/components/WorldMap.tsx`)
- Nationwide Layers → CSV Layer Registry: reads registered layers (evidence: `src/data/nationwideLayers.ts`)
- Interactive Map → Canvas Renderer: draws map (evidence: `README.md`)
- Canvas Renderer → Union Borders: dissolves borders (evidence: `src/map/render/renderLayers.ts`)
- Explorer → Interactive Map: navigates (evidence: `README.md`)
- Interactive Map → Place Details: opens selected details (evidence: `README.md`)
- Place Details → L3 Picker: offers L3 drilldown (evidence: `README.md`)
- Place Details → Info Dossiers: shows dossier
- Info Dossiers → Info Registry: queries dossiers (evidence: `src/components/MarkdownInfoCard.tsx`)
- Info Registry → Info Parser: parses entries (evidence: `src/info/infoRegistry.ts`)
- Info Registry → Remote Indexes: loads info indexes (evidence: `src/info/infoRegistry.ts`)
- Info Dossiers → Street View Embed: embeds Street View (evidence: `src/components/MarkdownInfoCard.tsx`)
- Street View Embed → Google Maps: embeds maps (evidence: `README.md`)
- Info Dossiers → Layer Size Controls: offers size tuning (evidence: `src/components/MarkdownInfoCard.tsx`)
- Info Dossiers → Article Writer: writes article
