Cooky API

Overview

Cooky: Recipes from all over the world. Click Cooky Live Server to try it right away!

Local Setup

You can set up and run this project using the traditional virtual environment approach or using docker:

Using Docker

  1. Clone the Repository:
    git clone https://github.com/IamMarkReyRonolo/cooky-recipe.git
    cd cooky-recipe
    
  2. Build and Run Docker Container:
    docker-compose up --build -d
    
  3. Access the documentation of the app at http://localhost:8000/swagger/

Traditional Setup with venv

  1. Clone the Repository:
    git clone https://github.com/IamMarkReyRonolo/cooky-recipe.git
    cd cooky-recipe
    
  2. Create and Activate Virtual Environment:
    python3 -m venv venv
    source venv/bin/activate   # On Windows, use 'venv\Scripts\activate'
    
  3. Install Dependencies:
    pip install -r requirements.txt
    
  4. Database Setup:
    python manage.py migrate
    
  5. Run the Development Server:
    python manage.py runserver
    
  6. Access the documentation of the app at http://localhost:8000/swagger/

Cooky APIs

  1. Recipe API Recipe API

  2. Registration API Registration API

  3. Token API Token API

  4. Users API Users API

Authorization Method (Bearer Token)

GIF Auth

Testing

  1. Running Tests To run tests, use the following command:
    python manage.py test
    
  • Sample Test Result Test Result
  1. To measure test coverage, you can use the coverage tool
    coverage run manage.py test
    coverage report
    coverage html
    
  • Sample Coverage Result Coverage Result