The recipe app API lets you create, modify and view tags and ingredients. You can create your own custom recipes using these tags and ingredients.
Language: Python3
Frameworks: Django2, Django-REST
Database: PostgreSQL
PAAS: Docker
The project has been built using Test Driven Development(TDD), thus contains automated tests to test multiple functionalities of API.
POST /api/user/create (To create authenticated users)
POST /api/user/token (Post credentials to get the token as output)
GET /api/user/token (Get the token as output and add it to ModHeader under the name Authorization)
PUT/PATCH /api/user/me (To edit the credentials of user)
GET /api/recipe (Router to access recipe, tags and ingredients endpoints)
POST /api/recipe/tags (Add a tag)
GET /api/recipe/tags (View tags)
POST /api/recipe/ingredients (Add a ingredient)
GET /api/recipe/ingredients (View ingredients)
POST /api/recipe/recipes (Add a recipe)
GET /api/recipe/recipes (View recipes)
GET /api/recipe/recipes/:recipe-id (View the particular recipe details)
PUT/PATCH/DELETE /api/recipe/recipes/:recipe-id (Modify or delete the particular recipe-id details)
POST /api/recipe/recipes/:recipe-id/upload-image (Upload image for the particular recipe-id)
GET /api/recipe/recipes/?tags=x&ingredients=y (Lists all recipes with tag-id=x and ingredient-id=y )
GET /api/recipe/tags/?assigned_only=1 (Lists only those tags which are used in atleast one recipe)
GET /api/recipe/ingredients/?assigned_only=1 (Lists only those ingredients which are used in atleast one recipe)
You need to follow these steps after cloning:
- Install python3
- Install pip
- Install Docker
- Configure PostgreSQL on the system
- Change the password of PostgreSQL in docker-compose.yml file
- Install a text editor(preferably Atom or Sublime) to view the files.
- Run the commands:
docker-compose build
docker-compose up
- If the last command doesn't show any error, the API will be available at localhost:8000