This is a implementation of a voting system for the Computer Science Chapter, with a backend written in golang and a frontend written in Typescript React.
The system uses the following permissions in Hive:
| permission | access |
|---|---|
admin-read |
Allows viewing data associated with elections and voters |
admin-write |
Allows modifying and creating elections and voters |
| name | default | description |
|---|---|---|
POST |
3000 |
specifies the port that the system will run on |
LOGIN_URL |
https://login.datasektionen.se |
url for the login system and API |
LOGIN_KEY |
API-key for the login system | |
HIVE_URL |
https://hive.datasektionen.se |
url for the permissions system hive |
HIVE_API_KEY |
API-key for the permissions system | |
DATABASE_URL |
postgres-url for connecting to the database instance |
- Create a postgres database and make sure it is running
- Set up environment variables
- Run
make initin root - Run
make run-serverin root - In a separate terminal, run
make run-clientin root
- Create a postgres database and make sure it is running
- Setup environment variables
- Run
make prodin root
The system also has a dockerfile setup for deployment.