An opensource airline game.
Live at https://www.airline-club.com/
Version 2.1 released at https://v2.airline-club.com
- install git :D of course
- clone this repo ;D , to setup for V2 use
git checkout v2 - Install at least java development kit 8+
- The 2 main projects are : airline-web (all the front-end stuff) and airline-data (the backend simulation).(Optional) If you want to import them to Scala IDE (if you want to code), goto the folder of those and run
sbt eclipseto generate the eclipse project files and then import those projects into your IDE - This runs on mysql db (install veresion 5.x, i heard newest version 8.x? might not work). install Mysql server and then create database
airline_v2_1, create a usersa, for password you might useadminor change it to something else. Make sure you change the corresponding password logic in the code to match that (https://github.com/patsonluk/airline/blob/master/airline-data/src/main/scala/com/patson/data/Constants.scala#L99) airline-webhas dependency onairline-data, hence navigate toairline-dataand runsbt publishLocal. If you see encoding error, add character_set_server=utf8mb4 to your /etc/my.cnf and restart mysql. it's a unicode characters issue, see https://stackoverflow.com/questions/10957238/incorrect-string-value-when-trying-to-insert-utf-8-into-mysql-via-jdbc- You would need to initialize the DB and data on first run. In
airline-data, runsbt run, then choose the one that runsMainInit. It will take awhile to init everything. - Set
google.mapKeyinapplication.confwith ur google map API key value. This might not necessary if you run on local host (?) , but if you want to host a public one, your probably need to apply one from google and enable the map API. Be careful with setting budget and limit, google gives some free credit but it CAN go over and you might get charged! - (Optional) For the "Flight search" function to work, install elastic search 7.x, see https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html . For windows, I recommand downloading the zip archive and just unzip it - the MSI installer did not work on my PC
- (Optional) For airport image search and email service for user pw reset - refer to https://github.com/patsonluk/airline/blob/master/airline-web/README
- Now run the background simulation by staying in
airline-data, runsbt run, select optionMainSimulation. It should now run the backgroun simulation - Open another terminal, navigate to
airline-web, run the web server bysbt run - The application should be accessible at
localhost:9000
Self notes, too much trouble for other people to set it up right now. Just do NOT enable the banner. (disabled by default, to enable change bannerEnabled in application.conf
For the banners to work properly, need to setup google photo API. Download the oauth json and put it under airline-web/conf. Then run the app, the log should show an oauth url, use it, then it should generate a token under airline-web/google-tokens. Now for server deployment, copy the oauth json google-oauth-credentials.json to conf AND the google-tokens (as folder) to the root of airline-web.
- Some icons by Yusuke Kamiyamane. Licensed under a Creative Commons Attribution 3.0 License
- Flag icons by famfamfam
The helper shell scripts in the project can set‐up and run everything for you on a fresh Ubuntu/Debian (or WSL) box.
-
Make the helper scripts executable
cd /path/to/airline chmod +x airline_manager.sh install_dependencies.sh manage_sbt_resources.sh -
Install all required dependencies
./install_dependencies.sh
The script will check for – and if necessary install – MySQL 8, SBT, JDK 8+, Node.js/npm and (optionally) Elasticsearch.
-
(Optional) Apply CPU / RAM limits to SBT
If you are on a low-spec VM or want to avoid the SBT JVM from using all resources you can create a cgroup:
./manage_sbt_resources.sh # choose option 1 (install tools) then 3 (apply limits) and finally 5 (exit) -
Configure the application & database, initialise data and start the services
./airline_manager.sh
Inside the menu:
- Update application.conf – sets up DB credentials, hostname, secret keys, etc.
- Initialize Database – runs the initial data import; this step can take several minutes.
- Start Services – launches the background simulation & web UI.
- Status of Services – check whether the services are running and if recent logs show errors.
-
Open the web UI
After a short warm-up (1–2 minutes on most machines) open your browser at:
http://<your-local-ip>:9000


