2026-06-27 11:00:12 +02:00
---
id: CORE-WP-0003
type: workplan
title: "Build FastAPI/Postgres foundation"
domain: infotech
repo: core-hub
2026-06-27 11:41:26 +02:00
status: finished
2026-06-27 11:00:12 +02:00
owner: codex
topic_slug: custodian
created: "2026-06-27"
updated: "2026-06-27"
state_hub_workstream_id: "ef913c8c-2a50-4970-9a9d-0cb65dc996cd"
---
# Build FastAPI/Postgres foundation
Create the first Core Hub runtime on the natural Coulomb stack.
## Scaffold Python Project
```task
id: CORE-WP-0003-T01
2026-06-27 11:41:26 +02:00
status: done
2026-06-27 11:00:12 +02:00
priority: high
state_hub_task_id: "3db032d8-7ac6-424e-8bbe-3debd332241b"
```
2026-06-27 11:41:26 +02:00
Result 2026-06-27: Added `pyproject.toml` , `uv.lock` , `Makefile` , `src/core_hub/` , `tests/` , and dependency declarations for FastAPI, Pydantic v2, SQLAlchemy async, Alembic, asyncpg, httpx, uvicorn, pytest, ruff, and aiosqlite test support.
2026-06-27 11:00:12 +02:00
## Add Health and OpenAPI Baseline
```task
id: CORE-WP-0003-T02
2026-06-27 11:41:26 +02:00
status: done
2026-06-27 11:00:12 +02:00
priority: high
state_hub_task_id: "d01d6169-a0c6-4689-b986-49ea6cd218b9"
```
2026-06-27 11:41:26 +02:00
Result 2026-06-27: Implemented `/healthz` , `/readyz` , generated OpenAPI, `/api/v2/openapi.json` , `/api/v2/openapi.yaml` , and an OpenAPI export script.
2026-06-27 11:00:12 +02:00
## Add Database Foundation
```task
id: CORE-WP-0003-T03
2026-06-27 11:41:26 +02:00
status: done
2026-06-27 11:00:12 +02:00
priority: high
state_hub_task_id: "23c57f3e-425e-47d8-9fb5-9cc6366f2167"
```
2026-06-27 11:41:26 +02:00
Result 2026-06-27: Added SQLAlchemy base/session wiring, initial models for hubs, capability manifests, and API consumers, Alembic configuration, first migration, and async sqlite test fixture proving metadata creation.
2026-06-27 11:00:12 +02:00
## Add CI-Ready Checks
```task
id: CORE-WP-0003-T04
2026-06-27 11:41:26 +02:00
status: done
2026-06-27 11:00:12 +02:00
priority: medium
state_hub_task_id: "a1790376-3f63-4eed-8f2f-c059eb1304db"
```
2026-06-27 11:41:26 +02:00
Result 2026-06-27: Added `make test` , `make lint` , `make run` , and `make openapi` . Verification passed with `uv run --extra dev pytest` and `uv run --extra dev ruff check .` .