Bachelorpraktikum-Solutions / voting-app

0 stars 0 forks source link

Blockchain voting app

This application was build by Stefan Am Ende, Moritz Johlige as Masterprojekt and by Han Fu, Dennis Streicher, Christoph Tratnjek as Bachelorprojekt at the University of Bayreuth in the Summer Semester 2023. It implements a blockchain approach to digitalize the university election at the University of Bayreuth.

Important: The Admin Panel may not work in older browser versions. In case of trouble please update your browser!

Development

To quickly deploy the dev environment, go into the folders frontend/ and backend/ in parallel shells. In there run the following commands to start the dev-deployment:

npm install
source .env
npm start

You have to use the Uni Bayreuth VPN to use the authorization Backend!

Quick local deployment

We prepared a quick and dirty docker deployment for local use. You may replace set environment variables to those fitting your usage. Run the following to deploy via docker:

bash build.sh # builds the needed docker images

# These are needed for the authorization backend to work
export VPN_USER=<your_uni_bayreuth_username>
export VPN_PASSWORD=<your_uni_bayreuth_password>

docker-compose up -d
# or
docker compose up -d

you can then access the application in your browser at http://localhost:8080

"Production" deployment

build the backend images:

bash build.sh

go into deploy/ and copy the secrets.template/ folder to secrets/:

cp -r secrets.template secrets

In secrets/ fill out every file. Afterwards you can deploy the application:

cd deploy/compose
bash deploy.sh
# it could be that your alias is `docker-compose` instead of `docker compose`