This Service provides an API to serve the Rate My Bistro: App
.
In more detail, it lets users manage their account, requests bistro menus
and accepts additional information for these menus (e.g. a rating).
The following decision were made with the Rate-My-Bistro team. The Api Server has to comply with these records at any time.
No | Record |
---|---|
1 | Use Rust to implement the Server |
2 | Use Rocket.rs as Service Framework |
3 | Use ArangoDb for Persistence |
4 | Separate Service into domains |
5 | Use behavior driven testing and spare with unit tests |
6 | Decouple tests from web framework (avoid lock in) |
7 | TODO AUTH |
The development on this project requires Rust to be installed:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
As the rocket framework requires an unstable rust version, the following steps are required, too:
rustup toolchain install nightly
rustup default nightly
The server provides you the following options to operate:
- Use cargo:
cargo run
- this will start rocket with the debug configuration - Use docker-compose
docker-compose up server
from here
Please note that a running database is required in order to use the server.
First, ensure your server (and database) is up and running in an environment of your choice. As soon as the server can accept requests, you can start the tests by entering the following command:
cargo test --test cucumber
Path | Core Functionality |
---|---|
src/middleware/ | Utilities that intercept handled requests |
src/menu/ | Handlers to provide menu information |
tests/ | BDD tests |
Domain | Core Functionality |
---|---|
Menu | Represents a meal with a list of side dishes |
Before you start contributing, read the following infos:
- Please document any new code
- Express changes in semantic commit messages
- Align your changes with the existing coding style
- Better ask first and then start changing
- Use Templates
- Read the Code of Conduct
You found a bug somewhere in the code?
--> Open an Issue
You fixed a bug somewhere in the code?
--> Open a pull request
You got an awesome idea to improve the project? You hate your Bistro as much as I do and want to speed up development?
--> The best way to support me in this project starts with a direct contact. Just email me, and we will figure out a way on how to split up work :)