- Before starting with the issue, set up your development environment (see below) and get familiar with the repo (also read up on the Technical Details)
- Please comment on the issue and a moderator will assign you to the issue
- Once you have been assigned an issue, fork the project and work on the issue assigned
- Create a pull request on Github to have your changes reviewed
- Finally, merge your changes into the project!
Development setup
The entire development environment is set up using Docker Compose. You simply need to have Docker and Docker Compose installed to run the application — no other system dependencies required! (Though it may be nice to havenode/go installed for debugging in your IDE).
With Docker (recommended!)
Copy.env.template into .env and fill in the environmental variables (see environmental variables for more details). Once finished, all you have to do is run the following command to start up the dev server:
With Docker + local database
If you don’t want to create a MongoDB instance or don’t want to work online, you can use the local database development runtime. Note that this only works offline if you’ve downloaded the packages before (ie. you need to run this with a connection at least once). Copy.env.template into .env and fill in the environmental variables (see environmental variables for more details). Instead of defining MONGODB_URI, you should define the following variables:
Connecting to the MongoDB container (running locally)
This is only applicable if you used thedocker-compose-mongo.dev.yml compose file. Use mongodb://{MONGODB_USER}:{MONGODB_PASS}@0.0.0.0:27107/?directConnection=true as the connection string. This works with both MongoDB Compass and through mongosh.
To reset the database and reload the sample data, completely remove the data folder that the Docker compose creates.
If you are using MongoDB Atlas, your connection string will be different. It is easier to see the data from the MongoDB Atlas Console. MongoDB Atlas has connection instructions from
mongosh here.Manual installation
Although the easiest development environment is through docker compose, you can manually start the frontend and backend individually. Requirements: Copy.env.template into .env and fill in the environmental variables (same as above). Additionally, copy client/.env.template into client/.env and copy over the relevant environmental variables from .env. This is used to expose the correct environmental variables to the running instance of the Vite frontend as you will not have Docker compose to automatically do that for you.
Client dev server (PORT 3000):
Only running frontend
If you wish to ONLY work on the frontend code, you may use the hosted staging app API as your backend, without having to run the Go backend server locally. To do this, go into theclient folder and make a copy of client/.env.template to client/.env. You should have the following environmental variables set:
VITE_JURY_NAME field can be anything; it’ll be used as the name of the hackathon displayed, but make sure to have the VITE_JURY_URL set correctly!
Once you have that setup, from the client folder run the following commands:
Testing
A comprehensive framework for testing the backend is contained within thetests folder. Make sure you have your environmental variables defined as above. One extra environmental variable you can define is LOG_LEVEL, which defines what to output from the tests. The default level is info, but you can specify one of the following levels, in order of increasing verboseness:
- error
- warn
- info
- verbose
tests/test-log.txt.