How lizthegrey/awtrix-flights works
awtrix-flights polls public ADS-B data, selects aircraft likely to pass perceptibly close overhead, and publishes AWTRIX display updates. Its main workflow runs through a scheduled Lambda fanout and queued polling ticks; a separate Lambda authorizes the device’s MQTT connection. The graph also preserves the documented infrastructure and optional tracing integration. Relationships are based on the README and shown source/index references; Terraform resource-level wiring is documented at a high level rather than inspected in source excerpts.
Main entry points: publisher.go Polling tick · publisher/main.go Publisher Lambda · authorizer/main.go Authorizer Lambda · iot.tf AWS IoT Core
Components 21
Polling runtime
- Publisher Lambda
cmd/publisher/main.go - Polling tick
internal/publisher/publisher.go - Route cache and dedupe
internal/store/store.go
Flight analysis
- ADS-B feed client
internal/adsbfi/client.go - Perceptibility filter
internal/filter/filter.go - Track geometry
internal/geo/geo.go - Route lookup client
internal/adsbdb/client.go
Display and access
- AWTRIX payload formatter
internal/awtrix/payload.go - MQTT publisher
internal/iotpub/iotpub.go - Authorizer Lambda
cmd/authorizer/main.go - Credential and policy checks
internal/authorizer/authorizer.go
AWS infrastructure
- EventBridge schedule
terraform/eventbridge.tf - Tick queue
terraform/sqs.tf - DynamoDB table
terraform/dynamodb.tf - AWS IoT Core
terraform/iot.tf - Secrets Manager
terraform/secrets.tf
Observability
- Tracing setup
internal/otelinit/otelinit.go
Other components
- adsb.fi
- adsbdb.com
- AWTRIX display
- Honeycomb OTLP
Connections 25
- EventBridge schedule → Publisher Lambda: invokes
README.md - Publisher Lambda → Tick queue: enqueues ticks
cmd/publisher/main.go - Tick queue → Publisher Lambda: triggers tick
cmd/publisher/main.go - Publisher Lambda → Polling tick: runs tick
cmd/publisher/main.go - Polling tick → ADS-B feed client: fetches aircraft
internal/publisher/publisher.go - ADS-B feed client → adsb.fi: requests state vectors
internal/adsbfi/client.go - ADS-B feed client → Perceptibility filter: produces states
internal/adsbfi/client.go - Perceptibility filter → Track geometry: computes CPA
internal/filter/filter.go - Polling tick → Perceptibility filter: selects candidates
internal/publisher/publisher.go - Polling tick → Route cache and dedupe: checks cache and dedupe
internal/publisher/publisher.go - Polling tick → Route lookup client: resolves routes
internal/publisher/publisher.go - Route lookup client → adsbdb.com: looks up callsigns
internal/adsbdb/client.go - Polling tick → AWTRIX payload formatter: formats notification
internal/publisher/publisher.go - AWTRIX payload formatter → Polling tick: returns payload
internal/publisher/publisher.go - Polling tick → MQTT publisher: publishes payload
internal/publisher/publisher.go - MQTT publisher → AWS IoT Core: sends MQTT message
README.md - AWS IoT Core → AWTRIX display: delivers update
README.md - Route cache and dedupe → DynamoDB table: reads and writes
internal/store/store.go - AWS IoT Core → Authorizer Lambda: requests authorization
README.md - Authorizer Lambda → Credential and policy checks: handles request
cmd/authorizer/main.go - Authorizer Lambda → Secrets Manager: loads credentials
cmd/authorizer/main.go - Credential and policy checks → AWS IoT Core: returns scoped policy
internal/authorizer/authorizer.go - Publisher Lambda → Tracing setup: configures tracing
cmd/publisher/main.go - Authorizer Lambda → Tracing setup: configures tracing
cmd/authorizer/main.go - Tracing setup → Honeycomb OTLP: exports traces
internal/otelinit/otelinit.go