TPGwidget is an iOS/Android app for public transport in Geneva. It uses the free Open Data API provided by the transit operator (transports publics genevois).
TPGwidget includes many features such as :
- stops shortcuts on the home screen
- real-time lines schedules
- routes planning
- vehicles informations
- and much more!
The projet is made with Framework7 in the front end, and PHP in the back end. The app users download on the App Store or on Google Play is powered by Apache Cordova.
Prerequisites : PHP 7+, MySQL, Node.js (dev only)
To run an instance of TPGwidget, you have to :
- Create a copy of the
.env.example
file named.env
and fill in your TPG Open Data API key and your database credentials. - Create on your MySQL Server the required tables (use the
dump.sql
file)
On the production server,
- https://tpg.nicolapps.ch is linked to the
tpg
folder. It contains the iOS web app. - https://tpga.nicolapps.ch is linked to the
tpga
folder. It contains the Android web app. - https://tpgdata.nicolapps.ch is linked to the
tpgdata
folder. It contains generic data (maps, vehicles images)
Front-end files are compiled with Gulp. To install it, use npm install gulp-cli -g
from the command line. You can then compile the assets using gulp ios-css
, gulp android-css
, gulp ios-js
and gulp android-js
.
If you have a question or an idea, you can create an issue. Pull requests are welcome! If you want to contribute, don’t hesitate to look into the unassigned issues.
- Nicolas Ettlin (@Nicolapps)
- Adam Mathieson (@AMathieson) - Help in transition to alternative API & Updates to vehicles
TPGwidget code is released under the MIT license, see the LICENSE file for details. This repository includes maps (© transports publics genevois), and the vehicle icons are CC BY 4.0 licensed.