$ show hotosm/openaerialmap
OpenAerialMap (OAM) is a production-grade, full-stack platform for uploading, processing, cataloging, and serving openly licensed aerial imagery, maintained by the Humanitarian OpenStreetMap Team (HOTOSM). The system is composed of multiple microservices: a Litestar-based uploader API with htmx frontend, a FastAPI STAC API backed by pgSTAC, a Go tilepack API for on-demand PMTiles/MBTiles generation, and a React/TypeScript frontend with MapLibre GL. Imagery processing is orchestrated via Argo Workflows (fetch, validate, convert to COG, metadata extraction, STAC registration). The codebase is well-architected with extensive test suites, CI/CD via GitHub Actions, Helm charts for Kubernetes deployment, and architecture decision records (ADRs) documenting key choices.
The LLM identified 5 files worth highlighting for reuse:
Provides a reusable `OpenDataCatalog` dataclass that maps third-party STAC catalogs (e.g., Maxar, Vantor) into OAM items. The pattern allows adding new providers by overriding `new_stac_items`, `prepare_item`, and `target_item_id`, making it extensible without changing core logic. Demonstrates a clean adapter pattern for external catalog ingestion.
Implements a background reconciler that uses PostgreSQL advisory locks to sweep stalled uploads and fall back to direct Argo queries when webhook callbacks are lost. The pattern is generic for any async workflow system requiring periodic state reconciliation.
Handles conversion of uploaded rasters to Cloud-Optimized GeoTIFFs (COGs) with lossy WEBP for visual RGB(A) and lossless ZSTD for other bands. Includes tile-by-tile alpha mask verification, sampled MAE checks, and provenance JSON output. The pattern is a production-grade image processing pipeline with quality assurance.
Generates deterministic Kubernetes job names by SHA256-hashing the combination of STAC ID, format, zoom levels, and canonical flag. This prevents duplicate tilepack generation requests and allows idempotent job submission. A clean pattern for job deduplication in distributed systems.
Enforces version immutability of the OAM STAC extension schemas by storing SHA256 checksums of released schemas. Any attempt to modify a published schema version will fail the test, ensuring backward compatibility and preventing silent drift. This is a non-obvious testing pattern for maintaining API specifications.