# Day 1 Execution Timeline This is a practical day plan for Codex. Times are indicative, not strict. ## Block 0 — Repository audit Goal: understand the repo, identify existing docs, confirm no missing foundation files. Deliverables: - updated `docs/CODEX_EXECUTION_LOG.md`; - short implementation plan; - no product scope changes. Do not implement features in this block. ## Block 1 — Backend foundation Goal: create the minimal FastAPI application architecture. Deliverables: - app factory or main app; - health endpoint; - config module; - logging setup; - consistent response/error envelope; - backend test harness. Acceptance: - backend imports cleanly; - health test passes; - no database dependency required for health endpoint. ## Block 2 — Database and domain Goal: add SQLAlchemy/Alembic/PostGIS-ready domain foundation. Deliverables: - database config; - migration folder; - core models for projects, areas, datasets, analysis_runs, exports; - geometry strategy documented in code comments where needed. Acceptance: - migrations run on local Postgres/PostGIS; - tests can run with a safe test DB or mocked DB session layer; - no raw geometry hacks in API layer. ## Block 3 — Project, Area and Dataset APIs Goal: implement first real domain APIs. Deliverables: - create/list/read projects; - create/list/read areas; - dataset registration/upload scaffold; - validation schemas; - contract tests. Acceptance: - documented API contract examples match actual responses; - invalid GeoJSON produces structured validation error; - areas store geometry metadata. ## Block 4 — Frontend shell Goal: create a navigable frontend shell matching the workbench model. Deliverables: - Vite/React/TypeScript app; - route layout; - left navigation; - workspace pages; - API client with typed methods; - empty/loading/error states. Acceptance: - frontend runs; - routes do not crash; - API base URL is environment-driven; - no random fake product flow. ## Block 5 — Raster/vector metadata Goal: add the first geospatial processing services. Deliverables: - vector metadata parser for GeoJSON; - raster metadata service scaffold using Rasterio when available; - dataset metadata endpoint; - fixture-driven tests. Acceptance: - fixtures return deterministic metadata; - unsupported file type returns controlled error; - processing outputs are stored according to storage spec. ## Block 6 — Vertical slice stabilization Goal: make the foundation coherent. Deliverables: - smoke script; - updated docs; - TODO checked/updated; - changelog entry; - known limitations list. Acceptance: - one command or documented sequence verifies backend + frontend basics; - no broken imports; - no undocumented architectural shortcuts.