# BUILD ORDER GRAPH — M14 Launch Codex must follow this dependency graph for implementation. ## Graph ```text Repository readiness -> Environment/config -> Backend app foundation -> Database/PostGIS foundation -> Domain models/schemas -> Migrations -> Project API -> Area API -> Dataset API -> Storage service -> Metadata extraction -> Frontend shell -> Frontend API client -> Map workbench shell -> Dataset UI -> Fixture layer display -> Export baseline -> Tests and readiness ``` ## Blocked until foundation is stable The following are blocked until the above graph is green: - Detection Lab. - Segmentation Lab. - QA/QC engine beyond fixture/schema validation. - Remote Sensing Lab. - GRB live adapter. - OSM live adapter. - LiDAR Workbench. - Training Studio. ## Rule If a later module requires missing foundation work, Codex must complete the foundation work first instead of building around it. ## Preferred first implementation passes ### Pass 1 — Backend and config - Create app structure. - Add config/settings. - Add health endpoint. - Add response envelope and error handling. ### Pass 2 — Database and domain - Add database connection. - Add migrations. - Add core models. - Enable PostGIS. ### Pass 3 — Project/Area/Dataset API - Implement CRUD. - Validate geometry. - Extract metadata. ### Pass 4 — Frontend shell and map - React app. - Layout. - MapLibre. - API client. ### Pass 5 — Fixture-driven integration - Load demo area/reference layer. - Display layers. - Run smoke tests.