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%
Adds a new SourceAdapter that polls n2yo's visualpasses endpoint for server-side visible-pass data: sun illumination + visual magnitude, both data points that local SGP4 propagation from raw TLEs (v0.11.1 satpass_predict) cannot compute. Complement, not replacement. Subject collision with satpass_predict on central.sat.pass.us.<state>.<observer_slug> is intentional. Vendor disambiguation lives in data.category (pass.n2yo_visualpasses vs pass.satpass_predict); v0.10.8 category-discriminated Nats-Msg-Id keeps the JetStream dedup windows distinct. CONSUMER-INTEGRATION.md flags this explicitly for future consumers. Severity bucketed by visual magnitude (LOWER mag = BRIGHTER): <=-3 -> 4 (very bright), -3..-1 -> 3 (naked-eye easy), -1..2 -> 2 (binoculars), >2 -> 1 (telescope-grade). Settings ship the curated default 6 observers (Filer primary + Boise/Idaho Falls/Ogden/SLC/Provo) x 6 sats (ISS, NOAA-15/18/19, SO-50, AO-91), sized for 6*6*24 = 864 transactions/day under n2yo's free 1000/day cap. data_class=event (alerts on /events, like satpass_predict). API key plumbing via the established tomtom_flow pattern: requires_api_key='n2yo', api_key_field='api_key_alias' settings field binds the GUI api_key_select dropdown. _api_key cached via ConfigStore.get_api_key, refreshed in apply_config; missing-key path logs INFO and yields zero events (graceful, no exception). Live key scrubbed from log strings via _redact. No new stream (CENTRAL_SAT pre-existing; 'pass' token already in STREAM_CATEGORY_DOMAINS from v0.11.1+v0.12.0). No new dep (aiohttp already in venv). Migration 040 seeds config.adapters row only; the n2yo API key gets added via GUI /api-keys page before enabling. 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.