ughurguliyev / news-aggregator

Trending News aggregator using Google Trends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trending News Aggregator Project

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

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.

Repositories

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

Celery

  • For running tasks in background, Celery is used.
  • Celery is used to create and update news in every 1 min.
  • For running task in development, run this command inside the app folder:
$ celery --app=app.celery:app worker -B --loglevel=DEBUG 

About

Trending News aggregator using Google Trends


Languages

Language:JavaScript 48.5%Language:CSS 42.3%Language:Python 7.5%Language:Dockerfile 0.8%Language:HTML 0.7%Language:Shell 0.3%