How carissaor/turbulence works
Turbulence tracks airfare and disruption-market signals: a scheduled collector builds historical data, while users search fares and explore tracked routes, departure prices, price history, world events, and a Global Chaos Score. The React dashboard calls a Go REST API backed by PostgreSQL; search also queries Travelpayouts and saves fare snapshots. The graph preserves the documented collector and Polymarket capabilities, but collector internals and several handlers were not excerpted, so their relationships rely on README documentation rather than inspected implementation details.
Main entry points: main.go API Server · App.jsx Dashboard App · search.go Fare Search · collector.go Scheduled Collector
Components 20
Dashboard
- Dashboard App
frontend/src/App.jsx - Flight Search
frontend/src/components/SearchPanel.jsx - Route Cards
frontend/src/components/RouteCard.jsx - Price Chart
frontend/src/components/PriceChart.jsx - Event Signals
frontend/src/components/EventsPanel.jsx - Chaos Score
frontend/src/components/ChaosScore.jsx
Go API
- API Server
cmd/api/main.go - Fare Search
internal/handlers/search.go - Tracked Routes
internal/handlers/routes.go - Departure & History
internal/handlers/prices.go - World Events API
internal/handlers/events.go - Chaos Score API
internal/handlers/chaos.go - HTTP Middleware
internal/middleware/middleware.go - API Data Models
internal/models/models.go
Data Collection
- Scheduled Collector
cmd/collector/collector.go
Persistence
- Database Access
internal/db/db.go - PostgreSQL
Other components
- Traveler
- Travelpayouts
- Polymarket Gamma
Connections 27
- Traveler → Dashboard App: uses
README.md - Dashboard App → API Server: loads routes, events, score
frontend/src/App.jsx - Dashboard App → Flight Search: renders
frontend/src/App.jsx - Dashboard App → Route Cards: renders
frontend/src/App.jsx - Dashboard App → Price Chart: renders
frontend/src/App.jsx - Dashboard App → Event Signals: renders
frontend/src/App.jsx - Dashboard App → Chaos Score: renders
frontend/src/App.jsx - Flight Search → API Server: requests search
frontend/src/components/SearchPanel.jsx - Price Chart → API Server: requests prices
frontend/src/components/PriceChart.jsx - API Server → Tracked Routes: routes
cmd/api/main.go - API Server → Departure & History: routes
cmd/api/main.go - API Server → World Events API: routes
cmd/api/main.go - API Server → Chaos Score API: routes
cmd/api/main.go - API Server → Fare Search: routes
cmd/api/main.go - API Server → HTTP Middleware: wraps handlers
cmd/api/main.go - Tracked Routes → PostgreSQL: queries routes and fares
internal/handlers/routes.go - Fare Search → Travelpayouts: fetches fare calendar
internal/handlers/search.go - Fare Search → Database Access: ensures route; saves snapshots
internal/handlers/search.go - Fare Search → API Data Models: builds search response
internal/handlers/search.go - Tracked Routes → API Data Models: builds route response
internal/handlers/routes.go - Departure & History → PostgreSQL: reads price data
README.md - World Events API → PostgreSQL: reads collected signals
README.md - Chaos Score API → PostgreSQL: reads collected signals
README.md - Scheduled Collector → Travelpayouts: collects airfare
README.md - Scheduled Collector → Polymarket Gamma: collects market signals
README.md - Scheduled Collector → PostgreSQL: stores observations
README.md - Database Access → PostgreSQL: accesses
README.md