8000 GitHub - NohaGad/recipe-app-api: This is a RESTful API built with Django and Django REST Framework for managing recipes.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

NohaGad/recipe-app-api

Repository files navigation

Python Django Django REST Framework Flake8 Docker

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.

Features

  • 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.

Installation

Prerequisites

  • Docker installed on your system.

Instructions

  1. Clone the repository:

    git clone https://github.com/NohaGad/recipe-app-api.git
    
  2. Navigate to the project directory:

    cd recipe-app-api
    
  3. Build the Docker image:

    docker-compose build
    
  4. Run the Docker container:

    docker-compose up -d
    
  5. Access the API at http://localhost:8000/api/.

Usage

Authentication

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.

Endpoints

  • /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}/

Testing

Running Unit Tests

Run the unit tests using the following command:

docker-compose run --rm app sh -c "python manage.py test"

Code Linting

Lint the code using Flake8:

docker-compose run --rm app sh -c "flake8"

Deployment

This project has been deployed on an AWS EC2 instance. Here are some screenshots: Screenshot 2024-04-23 at 21 38 34 Screenshot 2024-04-23 at 21 38 46

About

This is a RESTful API built with Django and Django REST Framework for managing recipes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0