This is a RESTful API built with Django and Django REST Framework for managing recipes. Users can register, login, and manage their recipes with ease. The API allows for tagging recipes, filtering recipes based on various criteria, and uploading images for each recipe.
- User Authentication: Users can register, login, and manage their accounts securely.
- Recipe Management: Create, read, update, and delete recipes.
- Tagging: Assign tags to recipes for categorization and easy retrieval.
- Filtering and Searching: Filter recipes by ingredients, tags, or other criteria.
- Image Uploading: Upload images for each recipe to provide visual representation.
- Docker installed on your system.
-
Clone the repository:
git clone https://github.com/NohaGad/recipe-app-api.git
-
Navigate to the project directory:
cd recipe-app-api
-
Build the Docker image:
docker-compose build
-
Run the Docker container:
docker-compose up -d
-
Access the API at
http://localhost:8000/api/
.
To access protected endpoints, users need to obtain an access token by sending a POST request to the /api/token/ endpoint with valid credentials. Use the obtained token in the Authorization header for subsequent requests.
/api/user/
/api/user/token/
/api/recipe/recipe/
/api/recipe/recipe/{id}/
/api/recipe/ingredient/
/api/recipe/ingredient/{id}/
/api/recipe/recipe 7257 /{id}/upload-image/
/api/recipe/tag/
/api/recipe/tag/{id}/
Run the unit tests using the following command:
docker-compose run --rm app sh -c "python manage.py test"
Lint the code using Flake8:
docker-compose run --rm app sh -c "flake8"
This project has been deployed on an AWS EC2 instance. Here are some screenshots: