Giter VIP home page Giter VIP logo

talana_challenge's Introduction

talana_challenge

Technologies

  • Django the web framework for perfectionists with deadlines.

  • Django REST framework is a powerful and flexible toolkit for building Web APIs.

  • PostgreSQL is the World's Most Advanced Open Source Relational Database.

  • Celery Distributed Programming framework for Python.

  • Flower - Celery is a web based tool for monitoring and administrating Celery clusters

  • RabbitMQ is the most widely deployed open source message broker.

Installation

Clone this project:

git clone https://github.com/LegolasVzla/talana_challenge

Makefile will help you with all the installation. First of all, in talana_challenge/backend/ path, execute:

make setup

This will install PostgreSQL and pip on your system. After that, you need to create and fill up settings.ini file, with the structure as below:

[postgresdbConf]
DB_ENGINE=django.db.backends.postgresql
DB_NAME=<dbname>
DB_USER=<user>
DB_PASS=<password>
DB_HOST=<host>
DB_PORT=<port>

[timeZone]
TIME_ZONE = UTC

[emailConfig]
EMAIL_HOST=<host>
EMAIL_PORT=<port>
EMAIL_HOST_USER=<origin_email> 
EMAIL_HOST_PASSWORD=<origin_password_email>
EMAIL_USER_TLS=True

[rabbitMQConfig]
RABBITMQ_USER=<rabbitmq_user>
RABBITMQ_PASS=<rabbitmq_password>

[frontendClient]
FRONTEND_DOMAIN=<host>
FRONTEND_PORT=<port>
  • postgresdbConf section: fill in with your own PostgreSQL credentials. By default, DB_HOST and DB_PORT in PostgreSQL are localhost/5432 and db_challenge the database.

  • frontendClient section: refers to the frontend port

  • emailConfig section: if you use gmail domain, fill up EMAIL_HOST = smtp.gmail.com and EMAIL_PORT = 587. Remember to activate Unsafe application access of your email account.

  • rabbitMQConfig section: by default RABBITMQ_USER and RABBITMQ_PASS are guest

Then, activate your virtualenv already installed (by default, is called env in the Makefile):

source env/bin/activate

And execute:

make install

This will generate the database with default data and also it will install python requirements and nltk resources. Default credentials for admin superuser are: [email protected] / admin.

Run django server (by default, host and port are set as 127.0.0.1 and 8000 respectively in the Makefile):

make execute

You could see swagger doc in:

http://127.0.0.1:8000/swagger/

In another terminal, run celery:

make celery

Optionally you can run flower in another terminal too:

make flower

You can monitoring rabbitMQ in:

http://localhost:15672/#/

Swagger Documentation

Swagger UI is a tool for API documentation. "Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without having any of the implementation logic in place. It’s automatically generated from your OpenAPI (formerly known as Swagger) Specification, with the visual documentation making it easy for back end implementation and client side consumption."

This project uses drf-yasg - Yet another Swagger generator

Endpoints and Actions:

Endpoint Path HTTP Method CRUD Method Used for
api/user/create_account/ POST Create user account. This endpoint will send you the email with the link to activate your account
api/user/verify_account/<int:user_id> POST Verify user account from email activation
api/user/generate_password/(?P<pk>\d+) POST Generate password to an user account
api/user/choose_winner/ POST Generate a winner

talana_challenge's People

Contributors

legolasvzla avatar

Watchers

 avatar  avatar

Forkers

ricardoarturo12

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.