Skip to content

Evgeniy-Golodnykh/blackfox_backend

Repository files navigation

BlackFox Nutrition API

Description

This is API for BlackFox Nutrition website

Quick Start

  1. Clone repo
git clone git@github.com:Evgeniy-Golodnykh/blackfox_backend.git
  1. Creates the virtual environment
python3 -m venv venv
  1. Activates the virtual environment
source venv/bin/activate
  1. Upgrade PIP and install the requirements packages into the virtual environment
python3 -m pip install --upgrade pip
python3 -m pip install -r requirements.txt
  1. Configure the .env file like this
ALLOWED_HOSTS=localhost
DJANGO_SECRET_KEY=django_secret_key
DB_ENGINE=django.db.backends.postgresql
DB_HOST=db
DB_PORT=5432
POSTGRES_DB=postgres_db
POSTGRES_USER=postgres_user
POSTGRES_PASSWORD=postgres_password
FATSECRET_CONSUMER_KEY=fatsecret_consumer_key
FATSECRET_CONSUMER_SECRET=fatsecret_consumer_secret
FATSECRET_CALLBACK_URL=https://fatsecret.callback.url
  1. To create the database use command
python3 manage.py migrate
  1. To create the superuser use command
python3 manage.py createsuperuser
  1. To run the application use command
python3 manage.py runserver

API Documentation

http://localhost:8000/api/swagger/
http://localhost:8000/api/redoc/

Technology

Python, Django REST framework, FatSecret API, Django Crontab, PostgreSQL, Docker, GitHub Actions

Author

Evgeniy Golodnykh

CI/CD pipeline status

Blackfox workflow