1.9 KiB
1.9 KiB
Architecture Invariants
These invariants must remain true throughout implementation.
Core invariants
- GeoIntel is backend/API-driven. Frontend does not own business logic.
- PostGIS is the system of record for geometries and analysis outputs.
- Filesystem/object storage stores binary artifacts, not authoritative feature state.
- Heavy processing runs as jobs and reports state transitions.
- Every analysis result belongs to an
analysis_run. - Every detection/segmentation stores model metadata when produced by a model.
- Every dataset stores source metadata, validation state and CRS information.
- API responses use a consistent envelope.
- Frontend state follows backend truth; it may cache but not invent completion states.
- Exports are generated from persisted outputs, not transient frontend state.
Geospatial invariants
- API GeoJSON uses EPSG:4326 unless endpoint explicitly states otherwise.
- Belgian metric calculations use EPSG:31370 where possible.
- Area values are stored with units.
- Length values are stored with units.
- Invalid geometries are fixed, rejected or marked with a validation error; never silently accepted.
- MultiPolygon/MultiLineString handling must be explicit.
- Geometry simplification may not mutate authoritative geometry unless a derived output is created.
AI invariants
- AI inference is an analysis run.
- Model outputs are candidates with confidence, not ground truth.
- Thresholds are parameters and must be stored.
- Tiling parameters are parameters and must be stored.
- Model version is required for reproducibility.
- QA/QC is separate from inference.
UI invariants
- Every page has empty/loading/error/success states.
- Every destructive action requires confirmation.
- Every unavailable feature must show an honest pending state.
- The map is a workbench surface, not a decorative background.
- Metrics must always indicate source and timestamp.