/dublin-bus-data

Web service that exposes Vehicle (Bus), Fleet (Operator) and Activity (Stop) data, for a given time frame.

Primary LanguageKotlin

dublin-bus-data

This application is a microservice that exposes Dublin bus data, namely: Vehicle, Operator and Activity (Stops, Trace) data, for a given time frame.

Requirements

  • Docker
  • Kotlin
  • Gradle

Setup

Data sets

The dataset files can be obtained from the Dublin Bus GPS Sample Data website and should be placed in the config/docker/dataset folder.

Running the app

To run the application you will need to:

  1. launch the database service by running the lift-off.sh <dataset> script, where is the data csv file to load into the database.
  2. launch the REST service by running ./gradlew bootRun. The service will then be available at http://localhost:7777/api/datapoints.

Stopping the app

To tear down the database service run the shutdown.sh script and to stop the rest service simply kill the process.

Sample Requests

Sample requests can be found in the Postman collection at src/test/postman/DublinBusData.postman_collection.json. Additional information on the API will be available at Swagger UI.

Documentation

The API can be accessed at:

TODO

  • Add instructions on how to install and/or access to the database
  • Add data loader script
  • Add instructions on how to launch the services
  • Documentation and/or examples on how to use the API
  • Unit testing
  • [] Handle high throughput in terms of number of requests
  • [] Add support for pagination in requests (Pageable)
  • [] Add improved request filtering options
  • [] Git actions: Run Tests
  • [] Dockerize app
  • [] Restrict database access to specific user(s)