Skip to content

[DONE] API to check which glider is flying above me

License

Notifications You must be signed in to change notification settings

its-laika/above_me

Repository files navigation

above_me

Goal

This projects listens to the APRS-servers of the Open Glider Network and keeps track of all incoming aircraft status. It provides an API that returns the latest status for each aircraft within a given location and range. It also provides a simple website that fetches and lists those aircraft status based on your device location automatically.

Set up

Native

Build

Backend
  • cd backend/
  • cargo build --release
Frontend
  • cd frontend/
  • npm run copy-dependencies
  • npm run compile

Run

  • Either run RUST_LOG=error cargo run inside the backend/ directory or build the backend and run RUST_LOG=error ./backend/target/release/above_me.
  • Build the frontend and serve the frontend/dist directory. (For development, you may run npm run dev inside the frontend/ directory. Requires Python 3.)

Configuration

Only the backend must be configured. Frontend will run as-is. There are three ways for configuration:

  1. /config.json (copy config.example.json)
  2. /backend/config.json (copy config.example.json, overrides 1.)
  3. by environment variables with the prefix ABOVE_ME__ (see /docker/.env.example, overrides 1. and 2.)

Docker

Configure by setting up /docker/.env (copy /docker/.env.example) and run docker compose up.

(Please note that the bind_url should be left unconfigured as it is used in the /docker/docker-compose.yml config file. Otherwise the proxy-pass may break.)

Privacy policy

The website contains links to privacy-policy.html. You can (and should) set up this privacy policy page. Empty dummy files already exist in the docker/ and frontend/src/ directories.

API

API-Documentation: openapi.yml

Status

Cargo test & clippy
Docker backend - build & push
Docker frontend - build & push

This project is up and running. I'd say it's "feature-complete" for my use-case. I'll maybe start building a nicer frontend sometimes. (see TODO.md)

License

This code is licensed under the MIT-License (see LICENSE). Before using it, make sure to not violate against OGN rules:

see OGN data usage
see ODbL summary

(This project complies to those rules by only publishing data that's at most 5 minutes old and only for aircraft that don't have stealth- or no-tracking-mode active.)