Skip to content

saeedhassan/CHQ_Backend

 
 

Repository files navigation

Coders HQ Backend

Github Actions Build Status

This repository holds the Coders-HQ backend. It is made using Django and Postgres as an API backend to the Coders-HQ frontend (based on React) which is hosted in this repo. The main Coders-HQ website is hosted at codershq.ae.

All information relating to the databse and tokens/secrets are should be in a .env file. An example of the file is the .env.example copy and edit the conttents to suite your environment and save it as .env in the root directory.

Installation

Docker and docker-compose are used to build and connect the subset of apps that are required to run the backend.

Pre requisites

  1. docker
  2. docker-compose
  3. (Optional) httpie

Building on Docker

  1. Copy .env.example to .env and edit with your github token, django secret, etc.
  2. Run docker-compose up backend
  3. On a web browser open localhost:33325

API

All information related to the API, and how to use it, can be found here.

Architecture

ibackend mapmage

The front-end will be located in its own repository which can connect to django's REST framework. The REST framework makes it easy to integrate any frontend to django's API which makes it possible to work on the front and backend separately.

The final architecture combines a subset of apps together to run all the different functionalities that's needed for the backend.

The main apps are:

Django Main backend
CHQ_Scoring Scoring mechanism for CHQ Backend
MKDocs Documentation tool
Postgres Database server
Jenkins Unit tests and server build
Celery Async events
Redis Message broker between celery and Django

Currently the docker-compose.yml is located inside this repository but will eventually be pulled out top integrate the frontend with the backend.

Database

Postgres is pulled when using the docker-compose command and the databse name/user/password are all grabbed from the .env file. The data is stored at /var/lib/codershq/postgres/.

About

Coders-HQ back-end

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.5%
  • Shell 12.3%
  • HTML 2.3%
  • Dockerfile 0.9%