The Recipe App API is a pet project designed to provide hands-on experience with various technologies including Django, Django REST Framework, and Docker in conjunction with Docker Compose.
- A User API that includes user registration, token creation, and user management.
- A Recipe API where you can manage recipes, tags, and ingredients. Each recipe can be associated with multiple tags and multiple ingredients.
- Image upload capability for recipes.
- Search and filtering functionality in the Recipe API, so you can retrieve recipes containing certain ingredients or tags.
- Token-based Authentication and permissions.
- Django
- Django Rest Framework
- Docker
- Docker Compose
- PostgreSQL
- Nginx
- Make sure Docker and Docker Compose are installed on your machine.
- Clone this repository and navigate into the root directory of this project.
- Rename the file
.env.sample
to.env
. - Access the
.env
file and adjust the variables as needed based on your environment. It's also possible to use the default values in the .env file. These defaults are designed to ensure the application operates correctly for quick testing or development setups. - Execute the following commands to build and run the application:
For running on localhost:
docker-compose up
For running in a production setup:
docker-compose -f docker-compose-deploy.yml up
POST /api/users/
: Create a new userPOST /api/users/token/
: Create a new token for the userGET, PUT, PATCH /api/users/me/
: Retrieve and update the authenticated user
GET, POST /api/recipes/recipes/
: Retrieve all recipes, or create a new recipeGET, PUT, PATCH, DELETE /api/recipes/recipes/{id}/
: Retrieve, update, partial update or delete a recipePOST /api/recipes/recipes/{id}/upload-image/
: Upload an image to a recipeGET, POST /api/recipes/tags/
: Retrieve all tags, or create a new tagGET, PUT, PATCH, DELETE /api/recipes/tags/{id}/
: Retrieve, update, partial update, or delete a tagGET, POST /api/recipes/ingredients/
: Retrieve all ingredients, or create a new ingredientGET, PUT, PATCH, DELETE /api/recipes/ingredients/{id}/
: Retrieve, update, partial update, or delete an ingredient