GoFlight is a Go-based flight data aggregator with a terminal-style Vue frontend.
It combines flight status + weather data, adds resilience patterns (timeouts, circuit breakers, cache fallback), and exposes production-friendly health and metrics endpoints.
GET /api/v1/dashboard/:flightaggregation endpoint- Cache-first reads with Redis + stale-cache fallback
- Fan-out/fan-in concurrency for upstream calls
- Circuit breakers via
sony/gobreaker - Structured logs (
slog) with request IDs - Metrics endpoint:
GET /metrics - Health endpoints:
GET /healthz,GET /readyz
- Shell-like typing experience (no classic form input)
- Command history (
ArrowUp/ArrowDown) - Command aliases (
h,cls,f,nf, etc.) - Tab completion suggestions (shown in a bottom status line)
- Multi-command chaining with
&& - Built-in commands:
help,flight,status,uptime,neofetch,boot,height,clear
- Backend: Go, Gin, Prometheus client, Redis, Gobreaker
- Frontend: Vue 3 + Vite
- Dev tooling: Air (backend hot reload), Docker Compose
cmd/api/main.go- API startup, middleware, graceful shutdowninternal/services/aggregator.go- core aggregation and resilienceinternal/external/*.go- upstream API + Redis clientsinternal/handlers/flight_handler.go- HTTP handler layerinternal/middleware/*.go- logger + metrics middlewarefrontend/- terminal-style Vue appscripts/dev-local.sh- start local full stackscripts/stop-local.sh- stop local processesk8s/*.yaml- Kubernetes manifests
- Copy env template:
cp .env.example .env
- Add your API keys in
.env:AVIATIONSTACK_API_KEYOPENWEATHER_API_KEY
- Start full local stack:
bash scripts/dev-local.sh
- Open:
- Frontend:
http://localhost:5173 - API health:
http://localhost:8080/healthz
- Frontend:
- Stop:
bash scripts/stop-local.sh
help- list commandsflight LH123- fetch flight dashboardstatus- print local UI/API statusuptime- show session uptimeneofetch- print splashboot- run boot animationheight 620- set terminal heightclear- clear terminal output- Command chaining:
neofetch && status && flight LH123
- Frontend: Vite dev server
- Backend: Air (auto-installed to
./.binbyscripts/dev-local.shif missing)
- Backend tests:
go test ./...
- Frontend build:
npm --prefix frontend run build
- Docker image and compose are included for local/runtime use.
- Kubernetes manifests are in
k8s/(namespace, configmap, secret, deployment, service, ingress, hpa). k8s/secret.yamluses demo placeholders; use proper secret management in production (Sealed Secrets, ESO, Vault, etc.).