# snansrin/dendrogeo architecture

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

- Interactive diagram: https://gitdiagram.com/snansrin/dendrogeo
- Repository: https://github.com/snansrin/dendrogeo

## Overview

DendroGeo is a web GIS/PWA for urban-park tree inventories, carbon estimates, surface analysis, field planning, projects, and research reports. The main workflow runs from field measurements and park context through analysis and review to saved results and reproducible reports. The map includes the application, services, and adapter layers alongside those domain stages. Relationships among unsampled application modules are not inferred; documented capabilities are retained, and source-level evidence is cited where available.

Main entry points: [`src/application/parks`](https://github.com/snansrin/dendrogeo/tree/main/src/application/parks) (Park boundaries), [`src/application/trees`](https://github.com/snansrin/dendrogeo/tree/main/src/application/trees) (Tree measurements), [`src/services/lc-engine.js`](https://github.com/snansrin/dendrogeo/blob/main/src/services/lc-engine.js) (Surface classification), [`research/carbon/reference.py`](https://github.com/snansrin/dendrogeo/blob/main/research/carbon/reference.py) (Carbon estimates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_field["Field inventory"]
  node_inventory["Tree measurements"]
  node_measurement_store[("Measurement storage")]
  node_offline["Offline sync queue"]
end

subgraph group_parks["Parks and mapping"]
  node_park["Park boundaries"]
  node_park_admin["Park administration"]
  node_grid["Field grid planning<br/>[grid-engine.js]"]
  node_projects[("Park projects")]
end

subgraph group_surface["Surface analysis"]
  node_surface["Surface classification<br/>[lc-engine.js]"]
  node_surface_review["Surface review<br/>[lc-review.js]"]
  node_surface_worker["Review worker<br/>[review-worker.js]"]
end

subgraph group_research["Research outputs"]
  node_carbon["Carbon estimates<br/>[reference.py]"]
  node_uncertainty["Uncertainty diagnostics<br/>[uncertainty.py]"]
  node_validation["Carbon validation<br/>[validation.py]"]
  node_reports["Research reports"]
  node_report_audit["Report audit"]
  node_dataset["Dataset preparation"]
  node_report_archive[("Publication archive<br/>[report-archive.mjs]")]
end

subgraph group_platform["Application services"]
  node_workspace["Web GIS workspace<br/>[app-runtime.js]"]
  node_auth["Authentication"]
end

node_researcher(("Researcher"))
node_osm["OpenStreetMap"]
node_worldcover["WorldCover raster"]
node_sentinel["Sentinel imagery"]

node_researcher -->|"uses"| node_workspace
node_workspace -->|"records measurements"| node_inventory
node_inventory -.->|"stores measurements"| node_measurement_store
node_inventory -->|"estimates carbon"| node_carbon
node_carbon -.->|"diagnoses uncertainty"| node_uncertainty
node_uncertainty -->|"calculates rows"| node_carbon
node_researcher -->|"selects park"| node_park
node_park -->|"gets boundaries"| node_osm
node_park_admin -->|"manages parks"| node_park
node_park -->|"plans field grid"| node_grid
node_grid -->|"targets projects"| node_projects
node_park -->|"analyzes land cover"| node_surface
node_surface -->|"uses raster evidence"| node_worldcover
node_surface -->|"uses spectral evidence"| node_sentinel
node_surface -->|"uses map geometries"| node_osm
node_researcher -->|"edits surface"| node_surface_review
node_surface_review -.->|"runs geometry jobs"| node_surface_worker
node_inventory -->|"queues offline work"| node_offline
node_researcher -->|"requests reports"| node_reports
node_reports -->|"publishes reports"| node_report_archive
node_report_audit -->|"audits source"| node_dataset
node_researcher -->|"signs in"| node_auth

click node_inventory "https://github.com/snansrin/dendrogeo/tree/main/src/application/trees"
click node_measurement_store "https://github.com/snansrin/dendrogeo/tree/main/src/adapters/trees"
click node_carbon "https://github.com/snansrin/dendrogeo/blob/main/research/carbon/reference.py"
click node_uncertainty "https://github.com/snansrin/dendrogeo/blob/main/research/carbon/uncertainty.py"
click node_validation "https://github.com/snansrin/dendrogeo/blob/main/research/carbon/validation.py"
click node_park "https://github.com/snansrin/dendrogeo/tree/main/src/application/parks"
click node_park_admin "https://github.com/snansrin/dendrogeo/blob/main/src/bootstrap/park-admin-controller.js"
click node_grid "https://github.com/snansrin/dendrogeo/blob/main/src/services/grid-engine.js"
click node_surface "https://github.com/snansrin/dendrogeo/blob/main/src/services/lc-engine.js"
click node_surface_review "https://github.com/snansrin/dendrogeo/blob/main/src/services/lc-review.js"
click node_surface_worker "https://github.com/snansrin/dendrogeo/blob/main/src/adapters/surface/review-worker.js"
click node_projects "https://github.com/snansrin/dendrogeo/tree/main/src/application/parks"
click node_offline "https://github.com/snansrin/dendrogeo/tree/main/src/application/offline"
click node_reports "https://github.com/snansrin/dendrogeo/tree/main/src/application/reports"
click node_report_audit "https://github.com/snansrin/dendrogeo/blob/main/papers/tools/audit_public_report.py"
click node_dataset "https://github.com/snansrin/dendrogeo/blob/main/papers/tools/prepare_primary_dataset.py"
click node_report_archive "https://github.com/snansrin/dendrogeo/blob/main/scripts/lib/report-archive.mjs"
click node_workspace "https://github.com/snansrin/dendrogeo/blob/main/src/bootstrap/app-runtime.js"
click node_auth "https://github.com/snansrin/dendrogeo/tree/main/src/application/auth"

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_inventory,node_measurement_store,node_offline toneBlue
class node_park,node_park_admin,node_grid,node_projects toneAmber
class node_surface,node_surface_review,node_surface_worker toneMint
class node_carbon,node_uncertainty,node_validation,node_reports,node_report_audit,node_dataset,node_report_archive toneRose
class node_workspace,node_auth,node_researcher,node_osm,node_worldcover,node_sentinel toneIndigo
```

## Components

### Field inventory

- [Tree measurements](https://github.com/snansrin/dendrogeo/tree/main/src/application/trees): `src/application/trees`
- [Measurement storage](https://github.com/snansrin/dendrogeo/tree/main/src/adapters/trees): `src/adapters/trees`
- [Offline sync queue](https://github.com/snansrin/dendrogeo/tree/main/src/application/offline): `src/application/offline`

### Parks and mapping

- [Park boundaries](https://github.com/snansrin/dendrogeo/tree/main/src/application/parks): `src/application/parks`
- [Park administration](https://github.com/snansrin/dendrogeo/blob/main/src/bootstrap/park-admin-controller.js): `src/bootstrap/park-admin-controller.js`
- [Field grid planning](https://github.com/snansrin/dendrogeo/blob/main/src/services/grid-engine.js): `src/services/grid-engine.js`
- [Park projects](https://github.com/snansrin/dendrogeo/tree/main/src/application/parks): `src/application/parks`

### Surface analysis

- [Surface classification](https://github.com/snansrin/dendrogeo/blob/main/src/services/lc-engine.js): `src/services/lc-engine.js`
- [Surface review](https://github.com/snansrin/dendrogeo/blob/main/src/services/lc-review.js): `src/services/lc-review.js`
- [Review worker](https://github.com/snansrin/dendrogeo/blob/main/src/adapters/surface/review-worker.js): `src/adapters/surface/review-worker.js`

### Research outputs

- [Carbon estimates](https://github.com/snansrin/dendrogeo/blob/main/research/carbon/reference.py): `research/carbon/reference.py`
- [Uncertainty diagnostics](https://github.com/snansrin/dendrogeo/blob/main/research/carbon/uncertainty.py): `research/carbon/uncertainty.py`
- [Carbon validation](https://github.com/snansrin/dendrogeo/blob/main/research/carbon/validation.py): `research/carbon/validation.py`
- [Research reports](https://github.com/snansrin/dendrogeo/tree/main/src/application/reports): `src/application/reports`
- [Report audit](https://github.com/snansrin/dendrogeo/blob/main/papers/tools/audit_public_report.py): `papers/tools/audit_public_report.py`
- [Dataset preparation](https://github.com/snansrin/dendrogeo/blob/main/papers/tools/prepare_primary_dataset.py): `papers/tools/prepare_primary_dataset.py`
- [Publication archive](https://github.com/snansrin/dendrogeo/blob/main/scripts/lib/report-archive.mjs): `scripts/lib/report-archive.mjs`

### Application services

- [Web GIS workspace](https://github.com/snansrin/dendrogeo/blob/main/src/bootstrap/app-runtime.js): `src/bootstrap/app-runtime.js`
- [Authentication](https://github.com/snansrin/dendrogeo/tree/main/src/application/auth): `src/application/auth`

### Other components

- **Researcher**
- **OpenStreetMap**
- **WorldCover raster**
- **Sentinel imagery**

## Connections

- Researcher → Web GIS workspace: uses (evidence: `README.md`)
- Web GIS workspace → Tree measurements: records measurements (evidence: `README.md`)
- Tree measurements → Measurement storage: stores measurements
- Tree measurements → Carbon estimates: estimates carbon (evidence: `README.md`)
- Carbon estimates → Uncertainty diagnostics: diagnoses uncertainty (evidence: `research/carbon/uncertainty.py`)
- Uncertainty diagnostics → Carbon estimates: calculates rows (evidence: `research/carbon/uncertainty.py`)
- Researcher → Park boundaries: selects park (evidence: `README.md`)
- Park boundaries → OpenStreetMap: gets boundaries (evidence: `README.md`)
- Park administration → Park boundaries: manages parks (evidence: `src/bootstrap/park-admin-controller.js`)
- Park boundaries → Field grid planning: plans field grid (evidence: `README.md`)
- Field grid planning → Park projects: targets projects (evidence: `src/services/grid-engine.js`)
- Park boundaries → Surface classification: analyzes land cover (evidence: `README.md`)
- Surface classification → WorldCover raster: uses raster evidence (evidence: `README.md`)
- Surface classification → Sentinel imagery: uses spectral evidence (evidence: `README.md`)
- Surface classification → OpenStreetMap: uses map geometries (evidence: `README.md`)
- Researcher → Surface review: edits surface (evidence: `README.md`)
- Surface review → Review worker: runs geometry jobs
- Tree measurements → Offline sync queue: queues offline work (evidence: `README.md`)
- Researcher → Research reports: requests reports (evidence: `README.md`)
- Research reports → Publication archive: publishes reports (evidence: `README.md`)
- Report audit → Dataset preparation: audits source (evidence: `papers/tools/prepare_primary_dataset.py`)
- Researcher → Authentication: signs in (evidence: `README.md`)
