mirror of
https://github.com/zvx-echo6/central.git
synced 2026-06-10 11:54:37 +02:00
Central - data hub spine. Adapters -> NATS/JetStream -> archive.
- Python 89.1%
- HTML 9.3%
- CSS 1.3%
- PLpgSQL 0.3%
Fixes a shared form_descriptors 500 (NotImplementedError: unsupported list type) that broke the Edit page for ALL FOUR adapters whose settings carry a list[<BaseModel>] field: tomtom_incidents, tomtom_flow, state_511_atis, state_511_atis_cameras. - form_descriptors: list[BaseModel] -> generic "model_list" widget with recursive per-column sub_field descriptors. - New _partials/model_list.html: vanilla-JS repeatable-row editor (add/remove/renumber), driven entirely by sub_fields (no adapter-name branching). Single-region edit pages render byte-identically. - TomTom: BBox/Settings Pydantic validators (10,000 km^2 cap, coord ranges, min<max, cadence_s>=60, unique names) as the single source of truth (enforced at supervisor load AND GUI POST). Duck-typed quota_estimate hook + read-only quota panel; POST hard-blocks estimates over the 2,500/mo free tier (422). TOMTOM_FREE_TIER_CALLS_PER_MONTH is a tunable for paid tiers. - routes: model_list form parse, row-aware ValidationError messages, 422 for model_list failures (single-region region errors still re-render at 200). - tests: 11 new (real-Jinja render across 3 adapters + byte-identical nws no-regression guard, POST persist + oversized/degenerate/duplicate/cadence/ quota 422 matrix, quota estimate). Full suite 848 passed, 1 skipped. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| docs | ||
| etc-templates | ||
| scripts | ||
| sql | ||
| src/central | ||
| systemd | ||
| tests | ||
| .gitattributes | ||
| .gitignore | ||
| .python-version | ||
| CHANGELOG.md | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Central
Central is the data hub spine for the infrastructure. Adapters normalize upstream sources into a canonical event shape, publish CloudEvents to NATS/JetStream, and archive to TimescaleDB for historical query. Single-LXC deployment.
Status
Phase 0 — scaffold. Not yet operational.
Architecture
- Python 3.12 (uv-managed)
- NATS + JetStream for live event bus
- TimescaleDB + PostGIS for archive and geospatial query
- One supervisor process managing adapter lifecycle
- One archive consumer process persisting events to TimescaleDB
- Both processes systemd-managed
Testing
See docs/test-database.md for test database setup.
License
MIT. See LICENSE.