-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Closed
Labels
High ValueMeaningful contribution to the projectMeaningful contribution to the projectchoreMaintenance, linting, toolingMaintenance, linting, tooling
Description
Summary
Several data-serving API endpoints use the legacy flat api/*.js pattern instead of the structured sebuf protobuf RPC pattern (api/{domain}/v1/[rpc].ts). These should be migrated for consistency, type safety, and maintainability.
Endpoints to migrate
| Legacy endpoint | Target sebuf domain | Notes |
|---|---|---|
api/satellites.js |
intelligence/v1/list-satellites |
New endpoint, should have been sebuf from the start |
api/military-flights.js |
military/v1/list-military-flights |
Sebuf RPC exists but uses live upstream fetch instead of reading seeded Redis data |
api/reverse-geocode.js |
geo/v1/reverse-geocode |
Utility, could be sebuf |
api/gpsjam.js |
intelligence/v1/get-gpsjam |
Data endpoint, should follow sebuf pattern |
api/oref-alerts.js |
conflict/v1/list-oref-alerts |
Data endpoint with WebSocket complexity |
api/telegram-feed.js |
intelligence/v1/list-telegram-feed |
Data endpoint |
api/polymarket.js |
Already covered by prediction/v1/list-prediction-markets |
May just need frontend migration |
Endpoints that are fine as legacy
These are ops/utility endpoints that don't serve domain data:
bootstrap.js— aggregatorhealth.js,seed-health.js— opsregister-interest.js— Convex mutationversion.js,download.js,cache-purge.js— utilityog-story.js,story.js— SSR/OG metafwdstart.js— redirectrss-proxy.js— generic proxyopensky.js— raw proxy for desktop pathais-snapshot.js— AIS data proxygeo.js— utility
Additional context
- A test guardrail (
tests/no-new-legacy-endpoints.test.mjs) has been added to prevent new legacy endpoints from being created without explicit approval - The sebuf workflow: define messages in
proto/→buf generate→ implement handler inserver/worldmonitor/{domain}/v1/→ wire inhandler.ts - Each migration should update the frontend caller to use the generated sebuf client instead of raw
fetch()
Acceptance criteria
- Each migrated endpoint has a proto definition, generated types, and handler
- Frontend callers updated to use sebuf client
- Legacy endpoint removed or redirected
- Health endpoint updated if Redis key names change
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
High ValueMeaningful contribution to the projectMeaningful contribution to the projectchoreMaintenance, linting, toolingMaintenance, linting, tooling