ughurguliyev / news-board-api

News board API using Django, DRF

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

News Board Backend

Set up development environment

  • Activate _development/docker-compose.yml file when you want to work on your local machine:
$ docker-compose up -d --build 
 
  • Create new venv and install all the requirements from the requirements.txt file:
$ python3 -m venv venv 
$ source venv/bin/activate 
$ pip3 install -r requirements.txt
  • Enter app folder and apply migrations:
$ python3 manage.py makemigrations 
$ python3 manage.py migrate 
  • Finally start up the server:
$ python3 manage.py runserver 

Project Structure

  • Project have one main mini-app(django app) - core
  • All API views, serializer and api related stuff live in the api mini-app.

Usecases

  • Every business logic lives under the usecases folders.
  • You can simply understand the purpose of the specific usecase by looking its name or description in the class.
  • Usecases implemented using profit404/stories ("https://github.com/proofit404/stories") library.
  • Celery & Redis used to reset upvote count daily at 00:00 asynchronously.

Repositories

  • Every db related actions are stored in the repository.
  • Do not use querysets and db related actions outside of the repository.

Postman Documentation and Collection

About

News board API using Django, DRF


Languages

Language:CSS 43.9%Language:JavaScript 43.6%Language:Python 11.7%Language:Dockerfile 0.6%Language:Shell 0.2%