..

myplanes

myplanes is a webapp I built to get notified if an interesting plane was heading towards the Wrocław airport. I wanted to be notified as early as possible so that I could drive to the airport and see it landing, ideally right above my head.

The idea is that the app is configured to scan the sky around particular coordinates. If a plane appears in the scanned area, a push notification is sent to the subscribed devices. The app scans the sky at a constant interval of 1 minute.

The scan is configured with the following parameters:

Basically, the app takes into account a rectangular area of the sky around the specified coordinates.

Area to scan

There’s also a very basic Web UI which shows the flights discovered by the most recent scan.

Main page

The application uses OpenSky Network API as the data source for live flight data.

The results

Good and bad at the same time.

  1. The notifications are coming in as intended. I used web push and they are working fine on Windows and Android, but not on iOS which I’m using daily.
  2. Turns out that OpenSky Network API does not really get much data from around Wrocław. The app works perfectly if I set the scanning area e.g. to Frankfurt - their coverage there is just fine.

The app works, but it is basically useless in Wrocław.

The architecture

FirebaseFirestoreMessagingmyplanes appRedisOpenSky API

I decided to experiment a bit with the tools. Instead of using an SQL database I decided to use:

The tech stack for the app

Kotlin + Micronaut, React.

The deployment

DigitalOcean dropletS3myplanes appRedismyplanes web appCloudFrontThe worldHTTPSHTTPS

I use an ansible playbook to set up the VM with JDK and Redis. It also sets up the application to run as a service.

The fun stuff

Finding the bounds for the sky scanner

I used some mathematical formulas for calculating a destination point given the distance and direction. I’d say it’s not a technical achievement, but - still - it was interesting to find out how to do it and read about it.

WebPush

At the time I wrote the code (2020), WebPush was working just fine everywhere besides iOS (not sure about macOS though).

Lessons learned

Links

Code: