# belluxx/aleph architecture

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

- Interactive diagram: https://gitdiagram.com/belluxx/aleph
- Repository: https://github.com/belluxx/aleph

## Overview

Aleph is a Python tool for downloading geographic data: users define an area in the local dashboard or request a place/point through the CLI, then save imagery, terrain, map data, Street View, or 3D meshes. The main area workflow is planned and executed as a resumable capture; quick CLI requests cover point and route-based imagery. The README documents preview, estimates, layer browsing, and 3D exploration. Some subsystem links below rely on README documentation or the SOURCE INDEX; unsampled implementation details are not inferred.

Main entry points: [`src/capture.py`](https://github.com/belluxx/aleph/blob/main/src/capture.py) (Capture planning), [`src/dashboard.py`](https://github.com/belluxx/aleph/blob/main/src/dashboard.py) (Local dashboard), [`src/places.py`](https://github.com/belluxx/aleph/blob/main/src/places.py) (Place search), [`src/quick.py`](https://github.com/belluxx/aleph/blob/main/src/quick.py) (Quick requests)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI commands<br/>[cli.py]"]
  node_entry["Command entry<br/>[aleph.py]"]
  node_dashboard["Local dashboard<br/>[dashboard.py]"]
  node_webui["Dashboard UI<br/>[app.js]"]
end

subgraph group_capture["Capture workflow"]
  node_captureplan["Capture planning<br/>[capture.py]"]
  node_capturefiles[("Capture checkpoints<br/>[capture.py]")]
  node_layerbrowser["Layer browsing<br/>[layers.py]"]
  node_quickrequests["Quick requests<br/>[quick.py]"]
end

subgraph group_geodata["Places and maps"]
  node_placefinder["Place search<br/>[places.py]"]
  node_osmdata["OSM data source<br/>[osm.py]"]
  node_pbfreader["PBF extraction<br/>[pbf.py]"]
  node_routes["Street route matching<br/>[routes.py]"]
end

subgraph group_media["Imagery and models"]
  node_streetview["Street View<br/>[streetview.py]"]
  node_satellite["Satellite imagery<br/>[satellite.py]"]
  node_terrain["Terrain tiles<br/>[terrain.py]"]
  node_mesh["3D mesh processing<br/>[mesh.py]"]
end

subgraph group_runtime["Shared runtime"]
  node_geometry["Geographic geometry<br/>[geo.py]"]
  node_httpclient["HTTP and cache<br/>[common.py]"]
end

node_user(("User"))
node_browser(("Browser"))
node_geocoder{{"Geocoding service"}}
node_mapprovider{{"OSM map provider"}}
node_imageryproviders{{"Imagery providers"}}
node_basemap{{"OpenFreeMap"}}

node_user -->|"runs commands"| node_entry
node_entry -->|"dispatches to"| node_cli
node_user -->|"opens dashboard"| node_browser
node_browser -->|"uses"| node_webui
node_webui -.->|"sends requests"| node_dashboard
node_entry -->|"starts"| node_dashboard
node_cli -->|"plans captures"| node_captureplan
node_cli -->|"resolves places"| node_placefinder
node_dashboard -->|"plans and runs"| node_captureplan
node_dashboard -->|"serves layers"| node_layerbrowser
node_dashboard -->|"uses place search"| node_placefinder
node_dashboard -->|"reads captures"| node_capturefiles
node_captureplan -->|"saves checkpoints"| node_capturefiles
node_captureplan -->|"downloads"| node_satellite
node_captureplan -->|"downloads"| node_streetview
node_captureplan -->|"downloads"| node_terrain
node_captureplan -->|"builds models"| node_mesh
node_captureplan -->|"uses requests"| node_httpclient
node_captureplan -->|"uses geometry"| node_geometry
node_layerbrowser -->|"reads terrain"| node_terrain
node_layerbrowser -.->|"reads capture data"| node_capturefiles
node_cli -->|"runs quick requests"| node_quickrequests
node_quickrequests -->|"plans satellite capture"| node_captureplan
node_quickrequests -->|"resolves places"| node_placefinder
node_quickrequests -->|"matches routes"| node_routes
node_quickrequests -->|"requests photos"| node_streetview
node_routes -->|"filters and matches"| node_streetview
node_placefinder -->|"requests geocoding"| node_httpclient
node_placefinder -->|"uses OSM keys"| node_osmdata
node_osmdata -->|"extracts PBF"| node_pbfreader
node_httpclient -->|"creates map source"| node_osmdata
node_osmdata -->|"downloads map data"| node_mapprovider
node_streetview -->|"fetches panoramas"| node_imageryproviders
node_satellite -.->|"fetches imagery"| node_imageryproviders
node_terrain -.->|"fetches tiles"| node_imageryproviders
node_mesh -.->|"fetches 3D data"| node_imageryproviders
node_placefinder -->|"queries"| node_geocoder
node_webui -->|"displays basemap"| node_basemap

click node_cli "https://github.com/belluxx/aleph/blob/main/src/cli.py"
click node_entry "https://github.com/belluxx/aleph/blob/main/aleph.py"
click node_dashboard "https://github.com/belluxx/aleph/blob/main/src/dashboard.py"
click node_webui "https://github.com/belluxx/aleph/blob/main/src/web/app.js"
click node_captureplan "https://github.com/belluxx/aleph/blob/main/src/capture.py"
click node_capturefiles "https://github.com/belluxx/aleph/blob/main/src/capture.py"
click node_layerbrowser "https://github.com/belluxx/aleph/blob/main/src/layers.py"
click node_placefinder "https://github.com/belluxx/aleph/blob/main/src/places.py"
click node_osmdata "https://github.com/belluxx/aleph/blob/main/src/osm.py"
click node_pbfreader "https://github.com/belluxx/aleph/blob/main/src/pbf.py"
click node_geometry "https://github.com/belluxx/aleph/blob/main/src/geo.py"
click node_quickrequests "https://github.com/belluxx/aleph/blob/main/src/quick.py"
click node_routes "https://github.com/belluxx/aleph/blob/main/src/routes.py"
click node_streetview "https://github.com/belluxx/aleph/blob/main/src/streetview.py"
click node_satellite "https://github.com/belluxx/aleph/blob/main/src/satellite.py"
click node_terrain "https://github.com/belluxx/aleph/blob/main/src/terrain.py"
click node_mesh "https://github.com/belluxx/aleph/blob/main/src/mesh.py"
click node_httpclient "https://github.com/belluxx/aleph/blob/main/src/common.py"

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_cli,node_entry,node_dashboard,node_webui,node_user,node_browser toneBlue
class node_captureplan,node_capturefiles,node_layerbrowser,node_quickrequests toneAmber
class node_placefinder,node_osmdata,node_pbfreader,node_routes toneMint
class node_streetview,node_satellite,node_terrain,node_mesh toneRose
class node_geometry,node_httpclient,node_geocoder,node_mapprovider,node_imageryproviders,node_basemap toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/belluxx/aleph/blob/main/src/cli.py): `src/cli.py`
- [Command entry](https://github.com/belluxx/aleph/blob/main/aleph.py): `aleph.py`
- [Local dashboard](https://github.com/belluxx/aleph/blob/main/src/dashboard.py): `src/dashboard.py`
- [Dashboard UI](https://github.com/belluxx/aleph/blob/main/src/web/app.js): `src/web/app.js`

### Capture workflow

- [Capture planning](https://github.com/belluxx/aleph/blob/main/src/capture.py): `src/capture.py`
- [Capture checkpoints](https://github.com/belluxx/aleph/blob/main/src/capture.py): `src/capture.py`
- [Layer browsing](https://github.com/belluxx/aleph/blob/main/src/layers.py): `src/layers.py`
- [Quick requests](https://github.com/belluxx/aleph/blob/main/src/quick.py): `src/quick.py`

### Places and maps

- [Place search](https://github.com/belluxx/aleph/blob/main/src/places.py): `src/places.py`
- [OSM data source](https://github.com/belluxx/aleph/blob/main/src/osm.py): `src/osm.py`
- [PBF extraction](https://github.com/belluxx/aleph/blob/main/src/pbf.py): `src/pbf.py`
- [Street route matching](https://github.com/belluxx/aleph/blob/main/src/routes.py): `src/routes.py`

### Imagery and models

- [Street View](https://github.com/belluxx/aleph/blob/main/src/streetview.py): `src/streetview.py`
- [Satellite imagery](https://github.com/belluxx/aleph/blob/main/src/satellite.py): `src/satellite.py`
- [Terrain tiles](https://github.com/belluxx/aleph/blob/main/src/terrain.py): `src/terrain.py`
- [3D mesh processing](https://github.com/belluxx/aleph/blob/main/src/mesh.py): `src/mesh.py`

### Shared runtime

- [Geographic geometry](https://github.com/belluxx/aleph/blob/main/src/geo.py): `src/geo.py`
- [HTTP and cache](https://github.com/belluxx/aleph/blob/main/src/common.py): `src/common.py`

### Other components

- **User**
- **Browser**
- **Geocoding service**
- **OSM map provider**
- **Imagery providers**
- **OpenFreeMap**

## Connections

- User → Command entry: runs commands (evidence: `README.md`)
- Command entry → CLI commands: dispatches to (evidence: `aleph.py`)
- User → Browser: opens dashboard (evidence: `README.md`)
- Browser → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Local dashboard: sends requests
- Command entry → Local dashboard: starts (evidence: `aleph.py`)
- CLI commands → Capture planning: plans captures (evidence: `src/cli.py`)
- CLI commands → Place search: resolves places (evidence: `src/cli.py`)
- Local dashboard → Capture planning: plans and runs (evidence: `src/dashboard.py`)
- Local dashboard → Layer browsing: serves layers (evidence: `src/dashboard.py`)
- Local dashboard → Place search: uses place search (evidence: `src/dashboard.py`)
- Local dashboard → Capture checkpoints: reads captures (evidence: `src/dashboard.py`)
- Capture planning → Capture checkpoints: saves checkpoints (evidence: `src/capture.py`)
- Capture planning → Satellite imagery: downloads (evidence: `src/capture.py`)
- Capture planning → Street View: downloads (evidence: `src/capture.py`)
- Capture planning → Terrain tiles: downloads (evidence: `src/capture.py`)
- Capture planning → 3D mesh processing: builds models (evidence: `src/capture.py`)
- Capture planning → HTTP and cache: uses requests (evidence: `src/capture.py`)
- Capture planning → Geographic geometry: uses geometry (evidence: `src/capture.py`)
- Layer browsing → Terrain tiles: reads terrain (evidence: `src/layers.py`)
- Layer browsing → Capture checkpoints: reads capture data
- CLI commands → Quick requests: runs quick requests (evidence: `src/cli.py`)
- Quick requests → Capture planning: plans satellite capture (evidence: `src/quick.py`)
- Quick requests → Place search: resolves places (evidence: `src/quick.py`)
- Quick requests → Street route matching: matches routes (evidence: `src/quick.py`)
- Quick requests → Street View: requests photos (evidence: `src/quick.py`)
- Street route matching → Street View: filters and matches (evidence: `src/routes.py`)
- Place search → HTTP and cache: requests geocoding (evidence: `src/places.py`)
- Place search → OSM data source: uses OSM keys (evidence: `src/places.py`)
- OSM data source → PBF extraction: extracts PBF (evidence: `src/osm.py`)
- HTTP and cache → OSM data source: creates map source (evidence: `src/common.py`)
- OSM data source → OSM map provider: downloads map data (evidence: `src/osm.py`)
- Street View → Imagery providers: fetches panoramas (evidence: `src/streetview.py`)
- Satellite imagery → Imagery providers: fetches imagery
- Terrain tiles → Imagery providers: fetches tiles
- 3D mesh processing → Imagery providers: fetches 3D data
- Place search → Geocoding service: queries (evidence: `src/places.py`)
- Dashboard UI → OpenFreeMap: displays basemap (evidence: `README.md`)
