The goal of this REST API is to ease customer's usage of large-scale public bicycle sharing system.
By collecting data from different providers (Bicing, Velib, ...) it gives powerful information (location to pick or return a bike, best time for picking up a bike, ...).
Here is an example of a user interface project calling the API /lechatquidanse/bicing-user-interface-app
Clone the project and run the default installation:
git clone https://github.com/lechatquidanse/bicing-api.git && cd bicing-api && make install
Your docker containers should have been successfully built and run.
Multiple features are proposed across 2 user interfaces, a REST API and command-line commands:
To run the project once installed:
The Makefile contains useful command for development purpose
Code and folder structure follow Domain Driven Design (DDD).
src \ |\ Application `Contains the Use Cases and the Processes of the domain system, commands, handlers and subscribers` | |\ Domain `The system business logic layer (Models, Events, Exceptions...)` | |\ Infrastructure `Its the implementation of the system outside the model. I.E: Persistence, Query, etc` | |\ UserInterface `It contains all the interfaces allowed for a user of the API (Cli, HTTP, Rest, etc)`
In this project, a use case is a command or a query with a single responsibility. This use case is then handled by a handler for a command or a data provider for a query.
Commands are handled by a message bus (SimpleBus) where a command is link to one handler.
For example, to create a station in database:
Environment 'test' is triggered when a 'feature/*' branch is pushed to the repository. It will then install project and launch qa tools.
Environment 'build' is triggered when a 'release/*' branch is pushed to the repository. It will then install project, launch qa tools and then build and push a docker image on a registry if no error occurred.
This manual action, will pull the image build by the previous step and update the specific container.
Stéphane EL MANOUNI · Linkedin
Pascal Borreli · GitHub