Audit date (UTC): 2026-04-06 Project: Breathwise TR
The repository was inspected in-place and extended without resetting existing structure.
Reviewed areas:
- source data layers under
data/raw/ - processed geography and CAMS outputs
- historical forecast canonical/validated/experimental layout
- existing ingestion/processing scripts
- core project documentation
Confirmed available and usable:
- Open-Meteo geocoding outputs (
81cities) - Open-Meteo forecast current/hourly/daily tidy outputs
- Open-Meteo air quality current/hourly tidy outputs
- Open-Meteo historical weather hourly output (
2024) - Open-Meteo historical forecast canonical short-range full/light outputs (
2024-01-15to2024-01-21) - Open-Meteo historical forecast extended consolidated output (
2024-01-01to2024-12-31) - geoBoundaries ADM0/ADM1/ADM2 raw snapshots + processed ADM1 layer
- CAMS 2024 monthly city-hourly processed outputs (
2024_01to2024_12) + combined output (cams_city_hourly_tr_all_available.csv)
Implemented:
- portable project-root discovery (
discover_project_root) - standardized ASCII-safe slug generation (
slugify_ascii) - historical forecast tiered folder strategy (
experimental/validated/canonical) - canonical short-range manifest + inventory manifest
- historical forecast extended consolidation pipeline + manifests
- mart input fingerprints with content hash (
sha256) for safer incremental/full mode decisions - geoBoundaries source metadata and checksum pinning notes
- documentation cleanup for path consistency and current canonical references
Built with DuckDB + Parquet:
data/processed/marts/city_hourly_environment_tr.parquetdata/processed/marts/city_forecast_vs_actual_tr.parquetdata/processed/marts/city_current_snapshot_tr.parquetdata/processed/marts/province_map_metrics_tr.parquet
Mobile-ready views:
data/processed/views/mobile_city_current_snapshot_tr_light.parquetdata/processed/views/mobile_city_hourly_timeline_tr_light.parquetdata/processed/views/mobile_province_map_metrics_tr_light.parquet
Build metadata:
data/processed/marts/marts_build_manifest.jsondata/processed/marts/validation_report.json
Implemented:
- FastAPI backend under
backend/ - env-based configuration only (no hardcoded secrets)
- API and parquet contracts exported to
data/contracts/ - TR/EN localization contract exported to
data/contracts/i18n_contract.json - optional API key auth and rate-limiting controls (env-driven)
- endpoint response cache with TTL controls (env-driven)
- readiness endpoint (
/ready) and structured error responses
Key API endpoints:
/health/v1/meta/datasets/v1/meta/localization/v1/cities/current/v1/cities/{city_name}/hourly/v1/provinces/map-metrics/v1/mobile/...endpoints for light views
From generated reports and checks:
- mart build completed successfully
- validation checks passed (
41/41) - pytest passed (
33tests) - API smoke checks returned
200for main endpoints
Key output stats:
city_hourly_environment_tr:756216rows,81cities,0duplicatecity_name + timecity_forecast_vs_actual_tr:711504rows,81cities,2024-01-01to2024-12-31city_current_snapshot_tr:81rows (one per city)province_map_metrics_tr:81rows (one per province)
Not blockers for current local-first v1:
- CAMS years beyond
2024 - historical forecast years beyond
2024 - deployment-grade external monitoring/alerts beyond local-first hooks
- full React Native UI implementation (shell contract and starter now available)
Implemented in this phase:
scripts/run_pipeline.pyorchestration entrypoint (full/standard/incremental)- step-level run logs + structured manifests under
data/processed/pipeline_runs/ - latest-run and latest-success pointers for operational traceability
- API smoke script (
scripts/smoke_test_api.py) for quick reliability checks - scheduler wrapper (
scripts/run_scheduled_pipeline.sh) and cron/launchd/systemd templates underops/scheduler/ - run alert hooks (local file sink + optional webhook/mac notification)
- scheduler cadence health checks (
scripts/check_scheduler_health.py) - operational log rotation tooling (
scripts/rotate_ops_logs.py) + logrotate template - lightweight ops visibility snapshots (
scripts/ops_status.py,data/processed/ops/ops_status_latest.json) - API metadata visibility endpoint (
/v1/meta/ops-status) - localization-ready TR/EN contract export (
data/contracts/i18n_contract.json) - locale-aware app-facing payload enrichment (
aq_category_key/label, alert key/label fields) - product shell integration guide and starter structure (
PRODUCT_SHELL_INTEGRATION.md,frontend/mobile_shell_starter/) - runnable Expo mobile shell scaffold under
frontend/mobile_shell_starter/