NOI.PH's online judge
- RAM: 8GB or more
- CPU: Intel i3 or better
If you're using Windows, we recommend using WSL 2 to emulate a Unix environment. If you haven't yet, set up your own SSH-key and add it to your SSH-agent.
Fork the Hurado repository with the help of this guide.
Before cloning your fork of the repository, make sure that you have added your SSH-key to your SSH-agent. You can clone the repository by running the following command:
git clone git@github.com:your_username/hurado.git
We recommend using NodeJS 20 when running this application. Kindly go to this guide to configure which version of NodeJS runs in your environment.
Once NVM has been installed, run the following so that NodeJS v20 is installed:
nvm install 20
nvm use 20
Install the required packages:
npm ci
Manually installing packages is done because this can be slow and humans know when to do this best.
We use docker containers for supporting services like postgresql. Follow instructions here to get a new version of docker.
Go to the repository directory by running the following command:
cd hurado
Copy the local environment:
cp .env.template .env
On a seperate terminal window, run the containers by running the following command in the project directory:
docker compose up
This will automatically load the environment variables into the containers.
These commands will have to be run from within the hurado-dev contaner. Get into the container by running
./scripts/bash
Migrate the database to the latest version:
npm run db:migrate
Seed some initial data:
npm run db:seed
Now open your browser and go to http://localhost:10000/
You should also be able to see the debug logs on the terminal window where you ran docker compose up
Congrats! The setup is now done!
- Follow the above instructions regarding forking, cloning, and running this repository.
- Read the contributor's guide for useful tips to improve your experience
- Add and commit your changes to the repository. Don't forget to add your name to the contributors section below.
- Submit a pull request (PR) and tag one of the contributors to review your code.
- Wait for the review and address the comments.
- Wait for the reviewer to approve your PR.
- Merge your PR.