Skip to content

erickmp07/inmana

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

inmana

API to prevent loss of restaurants supplies.

Table of Contents

Install

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

Usage

Start Phoenix endpoint:

mix phx.server

NOTE: To run the tests:

mix test

The application can be accessed at localhost:4000.

Technologies

This project was developed with the following technologies:

API

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.

Contributing

PRs and stars are always welcome.

To ask a question, please contact me.

License

Licensed under MIT license.