mirror of
https://github.com/zvx-echo6/central.git
synced 2026-08-26 09:21:36 +00:00
Central - data hub spine. Adapters -> NATS/JetStream -> archive.
- Python 88.6%
- HTML 9.4%
- CSS 1.2%
- Shell 0.6%
- PLpgSQL 0.2%
During the v0.14.0 prod deploy (2026-06-12) migration 042 was applied as `sudo -u postgres`, leaving config.monitoring_areas + its SERIAL sequence owned by postgres while the `central` app role expects ownership-based access. We patched prod inline at the time with ALTER ... OWNER TO central, but the migration FILE was never updated -- so a fresh install (dev clone, eventual prod rebuild) would hit the same footgun. Append two idempotent ALTERs (table + sequence OWNER TO central) so 042 is self-healing. No-op when already central-owned. No new fields/event-types/ behavior, no migration re-apply, nothing to deploy (live prod table is already central-owned via the earlier inline fix). Test: test_grants_table_and_sequence_ownership_to_central asserts both ALTERs are present (whitespace-insensitive, matching the existing static checks). Co-Authored-By: Claude Opus 4.8 (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.