/koor-backend

Docs: https://digimonkt.github.io/koor-backend/

Primary LanguagePython

Koor Backend

Introduction

KOOR is a project that aims to connect employers, job seekers, and vendors in a single platform. It functions similar to a freelancer platform, where employers can create jobs and tenders, job seekers can apply for them, and vendors can apply for tenders.

KOOR is designed to provide a convenient and efficient way for employers to find the right candidates or vendors for their projects. Employers can search for job seekers or vendors based on their skills, experience, and other criteria.

Job seekers and vendors can use KOOR to find opportunities that match their expertise and preferences. They can create profiles, highlight their skills and experience, and apply for relevant jobs or tenders.

Overall, KOOR is a platform that brings together employers, job seekers, and vendors to facilitate the hiring process and help people find the right opportunities for their skills and interests.

Navigation

Github Repo 🔗

Django

Prerequisites

  • Python >= 3.8

Project Setup

  • Clone the Git Repo

    git clone git@github.com:digimonkt/koor-backend.git
    cd koor-backend
  • Setup a virtual environment

    python -m venv env
  • Activate virtual environment

    .\env\Scripts\Activate.ps1   # for Windows Powershell

    or

    .\env\Scripts\activate  # for Windows Command Prompt

    or

    source .\env\Scripts\activate  # for Linux or Unix
  • Installing Pre-requisites

    pip install -r .\requirements.txt
  • Setup .env File

    Create .env file add following variables. Detail about the variable based on the Configuration referenced here

    # Django Configuration
    DJANGO_SETTINGS_MODULE=koor.config
    DJANGO_CONFIGURATION=Production or Local
    DJANGO_SECRET_KEY="<django-security-key>"
    DJANGO_DEBUG=True or False
    DJANGO_PAGINATION_LIMIT=10
    DJANGO_ALLOWED_HOSTS="*"
    
    # Databases Configuration
    DATABASE_URI="postgres://<database-host>:<database-password>@<database-host>:5432/<database-name>"
    POSTGRES_CONN_MAX_AGE=600
    
    # IN MINUTES
    JWT_ACCESS_TOKEN_LIFETIME=1
    # IN DAYS
    JWT_REFRESH_TOKEN_LIFETIME=30
    JWT_ALGORITHM=SH256,
    # IN MINUTES
    JWT_SLIDING_TOKEN_LIFETIME=1
    # IN DAYS
    JWT_SLIDING_TOKEN_REFRESH_LIFETIME=1
    
    
    # CORS
    CORS_ORIGIN_WHITELIST = <frontend-url>
    
    # Author, Manager and Stakeholder
    ORGANIZATION=ORGANIZATION@email.com
    DEVOPS=DEVOPS@email.com
    QA=QA@email.com
    DEVELOPER=DEVELOPER@email.com
    SERVER_EMAIL=SERVER_EMAIL@email.com
    

Configuration

  • DEBUG

    Boolean value (i.e. True or False). You’re certainly developing your project with DEBUG = True, since this enables handy features like full tracebacks in your browser. Used from .env

  • SECRET_KEY

    String value, A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. Used from .env

  • CONN_MAX_AGE

    Integer value, The lifetime of a database connection, as an integer of seconds. Used from .env by variable name POSTGRES_CONN_MAX_AGE

  • ATOMIC_REQUESTS

    Boolean value, Set this to True to wrap each view in a transaction on this database.

  • ALLOWED_HOSTS

    List value, A list of strings representing the host/domain names that this Django site can serve.

  • ADMINS

    List value, A list of all the people who get code error notifications.

  • MANAGERS

    List value, A list in the same format as ADMINS that specifies who should get broken link notifications.

  • SERVER_EMAIL

    String value, The email address that error messages come from, such as those sent to ADMINS and MANAGERS.

Production Configuration

Inherits from Local Configuration Pending