Commit Graph

9 Commits

Author SHA1 Message Date
Reese Norris
3ba2b2c364 feat: add XP12 apt.dat download and sweatbox .apt converter tooling
Operators can fetch Global Airports apt.dat locally (-download) and convert
to TWRTrainer-style .apt files. openfsd does not ship Laminar data; bulk
outputs and apt.dat caches stay gitignored. See docs/xplane-airport-data.md.
2026-07-23 18:25:35 -04:00
Reese Norris
825994dedc add openfsd binary to gitignore 2026-07-21 17:50:06 -04:00
Reese Norris
2e37ed08b8 perf: lock-free postoffice path and non-blocking position send
Speed up dense position fan-out with atomic live snapshots for N≤2048,
equirectangular DistanceSq filtering, and SendPosition latest-wins
drops so slow peers cannot stall broadcasters. Ignore SQLite WAL/SHM
sidecars so local operator DBs are not staged by accident.
2026-07-17 13:26:19 -04:00
Reese Norris
b08536543f feat: answer $CQ SERVER:CAPS for vatSys compatibility
Advertise only implemented server flags (no SECPOS), document the full
capability inventory from vatSys research, and cover the path with unit
and e2e tests.
2026-07-17 13:22:01 -04:00
Reese Norris
65ec62a738 refactor: internal/web importable; cmd/openfsd-web; Docker embed-safe
Move web package; no init panic; Dockerfile_web builds cmd/openfsd-web as fsdweb.
2026-07-16 12:37:47 -04:00
Reese Norris
514562055a chore: AGENTS.md acceptance criteria, golangci-lint, coverage report
Operational agent criteria, lint config, soft coverage report, and CI hygiene hooks.
2026-07-16 12:35:36 -04:00
Reese Norris
2f423ed824 update gitignore 2025-05-25 11:56:38 -07:00
Reese Norris
335409c4b4 Add ConfigRepository and enhance server configuration management
1. Database Enhancements (db/repositories.go):
   - Added ConfigRepository interface and implementations for PostgreSQL and SQLite
   - Updated Repositories struct to include ConfigRepository
   - Modified NewRepositories to initialize both UserRepo and ConfigRepo

2. FSD Server Improvements:
   - Removed hardcoded jwtSecret, now retrieved from ConfigRepository (fsd/conn.go, web/auth.go)
   - Added dynamic welcome message retrieval from ConfigRepository (fsd/conn.go)
   - Optimized METAR buffer size from 4096 to 512 bytes (fsd/metar.go)
   - Reduced minimum fields for DeleteATC and DeletePilot packets (fsd/packet.go)
   - Improved Haversine distance calculation with constants (fsd/postoffice.go)
   - Added thread-safety documentation for sendError (fsd/client.go)

3. Server Configuration (fsd/server.go):
   - Added NewDefaultServer to initialize server with environment-based config
   - Implemented automatic database migration and default admin user creation
   - Added configurable METAR worker count
   - Improved logging with slog and environment-based debug level

4. Web Interface Enhancements:
   - Added user and config editor frontend routes (web/frontend.go, web/routes.go)
   - Improved JWT handling by retrieving secret from ConfigRepository (web/auth.go)
   - Enhanced user management API endpoints (web/user.go)
   - Updated dashboard to display CID and conditional admin links (web/templates/dashboard.html)
   - Embedded templates using go:embed (web/templates.go)

5. Frontend JavaScript Improvements:
   - Added networkRatingFromInt helper for readable ratings (web/static/js/openfsd/dashboard.js)
   - Improved API request handling with auth/no-auth variants (web/static/js/openfsd/api.js)

6. Miscellaneous:
   - Added sethvargo/go-envconfig dependency for environment variable parsing
   - Fixed parseVisRange to use 64-bit float parsing (fsd/util.go)
   - Added strPtr utility function (fsd/util.go, web/main.go)
   - Improved SVG logo rendering in layout (web/templates/layout.html)
2025-05-16 22:27:26 -07:00
Reese Norris
cde3128509 initial v1.0-beta commit 2025-05-12 17:21:16 -07:00