gchq-net / server

GCHQ.NET Super Spooky Backend Server
https://gchq.net
MIT License
0 stars 0 forks source link

Great Camp Hexpansion Quest

This is the main application for GCHQ.NET - Great Camp Hexpansion Quest

Development

This project is based on Django and uses Parcel to bundle frontend assets.

You will need Python 3.11 or later, Poetry and Node.JS 20 or NVM. You should also install GNU Make if it is not already available on your system.

Setting up Frontend

Firstly, if you are using NVM, set the correct Node version: nvm use 20 and then install the Node dependencies: npm install

The frontend assets can then be built using npm run start and will automatically update them as you change code.

Setting up Backend

Firstly, install the Python dependencies using poetry: poetry install.

You can enter the virtualenv by running poetry shell or run commands using poetry run <cmd>.

For development, we are using sqlite at the moment. You can create the sqlite database by running ./manage.py migrate

A superuser can be created by running ./manage.py createsuperuser

You can run the Django development server: ./manage.py runserver or make dev

Linting, Formatting and Tests

All automatic tests can be run by invoking Make: make

The following commands are also available:

Production

When deploying to production, the Django deployment guidelines should be followed.

Additionally, you will need to build the minified frontend assets for production: npm run build before running ./manage.py collectstatic