OrdSys is a web application designed to create, display, and manage order tickets for use in the kitchen and bar during various events held by the Uppsala Union of Engineering and Science Students. It is written in Python3 and Javascript using Django and PostgreSQL for the backend and React & Bootstrap for the frontend.
The application requires Python (version 3.8 or greater), Node.js (Version 16 or greater) by using nvm.
To begin, clone the repo and open the repository folder in your terminal.
On ubuntu, follow step 1 of this guide: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-22-04
On mac run brew install redis
source source_me.sh
to create and enter the virtual environment.pip install --upgrade pip
.pip install -r dev-requirements.txt
.virtualenv
and virtualenvwrapper-win
packages installed on your system.
If you don't, install them using $ pip install virtualenv
or $ pip install virtualenvwrapper-win
.$ mkvirtualenv venv
. This will create a virtual environment called venv
and automatically enter it.(venv) $ pip install -r dev-requirements.txt
.
If the versions are mis-matched, you may have to install each package of dev-requirements.txt
manually../manage.py migrate
../manage.py createorganisation
../manage.py createsuperuser
.source source_me.sh
./manage.py runserver
.The backend can now be accessed at http://localhost:8000/.
cd
to frontend/
$ yarn install
.$ yarn start
. It should automatically open in your web browser. If not,
you can open your web browser and browse to http://localhost:3000/.Note: Running the frontend with start
launches it in development mode. To build and deploy to a production
environment, use $ yarn build
, and follow the appropriate steps at the
official guide.
For this repository there also exists a compose file meant to ease the setup of a development environment.
docker.io
by runnning sudo apt install docker.io
To start using the compose file run the shell script run-dev.sh
with sudo supplying the flag init
incase you want to create a superuser and a new organisation.
Examples
sudo ./run-dev.sh init # prompts you for details to create user and org sudo ./run-dev.sh # starts everything without prompting
To stop the development environment run docker compose down