1.6 KiB
1.6 KiB
Ingest ↔ API contract
Principle
The contract between ingest and API is the PostgreSQL schema. Ingest writes rows; API reads the same rows. No file exchange is required for the core data path.
API read model
The API reads these tables:
fr24.captures— capture sessions and source metadatafr24.raw_packets— raw base64 packets with radio metadatafr24.aircraft— aircraft identity and enrichmentfr24.flights— flight sessions and statefr24.tracks— track aggregatesfr24.track_points— ordered track geometry pointsfr24.processing_state— recovery cursors and pipeline statefr24.noise_results— computed noise polygons and summaries
Ingest write model
capturewritescapturesandraw_packetspreprocesswritesaircraft,flights,tracks,track_points,processing_state,noise_resultsmonitoringdoes not own core data; it reports status and alerts
Planned endpoints
GET /healthGET /capturesGET /raw-packetswith pagination and time filtersGET /aircraftGET /flightsGET /tracks/{track_id}GET /track-points?track_id=...GET /noise-resultsGET /dashboard/statusGET /viewer/config
Query expectations
- API should prefer indexed filters by time, flight, aircraft, and partition date.
- API should not reconstruct track geometry from raw packets at request time.
- API should read prebuilt aggregates from
tracksandtrack_points.
Retention expectations
raw_packetskeep 3 days by default.- Cleanup is partition-based by date.
- Aggregated tables may retain longer, depending on UI needs.