API to prevent loss of restaurants supplies.
Prerequisites:
Download and install Elixir and Phoenix.
- First, clone the repository:
git clone https://github.com/erickmp07/inmana.git
- Install its dependencies:
cd inmana
mix deps.get
- Create and migrate the database:
mix ecto.setup
Start Phoenix endpoint:
mix phx.server
NOTE: To run the tests:
mix test
The application can be accessed at localhost:4000
.
This project was developed with the following technologies:
The available routes are:
# POST (JSON) - Create Restaurant
http://localhost:{port}/api/restaurants
body: {
"name": "Restaurant's name",
"email": "email@domain.com"
}
# POST (JSON) - Create Supply
http://localhost:{port}/api/supplies
body: {
"description": "Supply's description",
"expiration_date": "2021-01-01",
"responsible": "Name",
"restaurant_id": "1c671fb7-39b1-4234-ac10-7b7e6651ade9"
}
# GET - Show Supply
http://localhost:{port}/api/supplies/:id
NOTE: The API schedules and sends one email by week to the restaurants with the list of the supplies that are about to expire on that week.
PRs and stars are always welcome.
To ask a question, please contact me.
Licensed under MIT license.