This project aims to provide a web-based solution for ampliminds application process.\ For that, a group of 12 computer science students from the THI work as main developer under the guidance of amplimind.\ \ This project is kept open source, despite being used in a business context.
The software consists of three parts:
The frontend communicates with the backend via REST and vice versa.
In order not to expose secrets like e.g. the used secret key for encryption, additional files are used to provide these informations while being excluded from the repository.\ You will need the following files:
Both files need to be in the coding-challenge/backend/codingchallenge/ directory
The .env file must have the following structure:\
SECRET_KEY="secret"
ENCRYPTION_KEY='secret='
GH_APP_INSTALLATION_ID='secret'
GH_APP_ID='secret'
The privateKey.pem file must have the following structure:\
-----BEGIN RSA PRIVATE KEY-----
secret==
-----END RSA PRIVATE KEY-----
In order to keep the project platform-independent, docker container are used, while the frontend, backend and the database all run in their own you container.
You will need to have docker installed on your machine in order to run the container.\ When you are on Windows or MacOS, you only can install Docker Desktop. This will install the Docker Engine, a Linux VM, in which the container are executed, and a GUI.\ When you are on Linux, you can either install the Docker Engine directly or the whole Docker Desktop. Which one you want to use is up to you.
docker-compose is used to deploy the project.\
To start the container, use docker compose up
in the root directory.\
To stop the container, use docker compose down
.\
While running, the container are accessible at the following addresses:
When you edit the source code while the container are running, all changes are directly transfered inside the container. Therefor, you won't need to restart the container or even install any resources.\ This is the prefered way for the development.\ \ If, for whatever reason, you want to start the container separately, you'll need to change the settings.py in the backend to connect to the outdated sqlite3 database. Whether the container will work is not guaranteed.\ The frontend container on the other hand can be started with almost no downsides.\ \ If you only want to work on the backend and also don't want to use docker-compose, you will need to change the settings.py file too. On top of that, you will need to setup a virtual environment in order maintain compability.
This project uses jobs in order to maintain the data inside the databse.\ Jobs are preferred over traditional PostgreSQL trigger, because jobs can be called periodically on a specific time, while trigger don't have such a functionality.\ Additionally, the jobs are defined inside the backend using the django-extensions library. They are not defined inside the database, since this would make the database and the container setup more complex, while the database is already heavily dependent on the backend. Therefor the simpler solution, having the jobs being defined inside the backend, is chosen.\ The jobs are scheduled using cron. This process is run in parallel to the django server.
For more detailed information on the projekt, visit the corresponding wiki.