Files
PilotVault/Web App
tajniak81andClaude Opus 4.8 94f6876024 Add location-aware automatic default bounding box
The OpenSky "Default bounding box" now follows where flying happens.
A new "Automatic" picker mode (the default) resolves the live-map area
from a location cascade — drone telemetry → phone GPS → browser
geolocation → the user's Region country → Europe — instead of a fixed
box. Manual presets and Custom coordinates still work.

- Web App: new shared countries.js dataset (all countries + bbox,
  offline point→country); the bbox picker gains all European countries
  and an Automatic option (client pref prefs.autoBbox); the Region
  setting expands from 6 locale entries to all countries; the live map
  resolves the cascade each poll and sends it as ?bbox=.
- API Server: the states endpoint accepts and validates a ?bbox=
  override (validBBox); the Web App BFF forwards the query; the hub
  relays new phoneLatitude/phoneLongitude telemetry to the Web App.
- Fly App: reports the phone's own GPS (geolocator) alongside
  telemetry, used as the "your location" fallback.
- API panel: the OpenSky bbox picker lists all European countries.

Builds verified across web, panel, both Go modules and the Fly App
APK. Region list, Automatic default and the cascade ?bbox= override
verified in the browser.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 00:07:12 +02:00
..

Web App (Control Panel)

The PilotVault control-panel BFF. It serves the embedded Vue single-page app and proxies /bff/* to the API Server, so the browser only ever talks to this server (same-origin). The API Server is the gateway to PocketBase and to the live Fly App data; the browser never contacts either directly.

Layout

server/          # Go BFF (package main) — proxies /bff/* and serves the SPA
  dist/          # built web assets (go:embed target — produced by the web build)
  .env.example   # configuration template
  go.mod
  main.go        # entrypoint, routing, static serving
  bff.go         # /bff/* proxy handlers
web/             # Vue 3 + Tailwind source, built by Vite into ../server/dist

Configuration

See server/.env.example. Key variables:

  • ADDR — address the BFF listens on (default :8090).
  • API_BASE — default API Server the BFF proxies to (default http://localhost:8080). Users can override this per-session at login.

Develop

# 1. Build the web app into server/dist (embedded by the Go binary)
cd web && npm install && npm run build && cd ..

# 2. Run the BFF
cd server && go run .

For a live UI with hot-reload, run npm run dev in web/ (it proxies /bff to a locally running BFF on :8090).

Build

cd server && go build -o web-app .

Or build the container image (multi-stage; builds the web app then the binary):

docker build -t pilotvault-web-app .