To merge a branch into main, create a pull request. Before merging, at least one other person needs to review the code.
When merging, please use the "rebase" option, to keep our commit history clean.
[#xxx] <message>
Where xxx is the issue number the commit references.
This format is enforced by our pre-commit hooks, so before commiting anything to the repository, please install our pre-commit hooks by running:
The backend requires JDK 21 or higher to be installed.
The frontend requires Node.js to be installed.
Our pre-commit hooks require Python to be installed.
We recommend using the following plugins for your IDE:
To set up the project, use our taskfile.
To install the taskfile, read the instructions here.
Then, to set up the project, run:
task setup
The taskfile is a simple way to run common tasks in the project.
To see all available tasks, run task --list.
Here's an overview of tasks, that are available for the frontend AND backend:
setup- Sets up the project.run- Runs the project.test- Runs the tests.lint- Lints the code.format- Formats the code.format-check- Checks if the code is formatted correctly.clean- Cleans the project.
These can be run for the backend and frontend separately by using the backend: or frontend: prefix or by running the task in the respective directory.
Running task <taskname> in the project root will run the task for both the backend and frontend.
Some tasks are only available for the entire project:
build-container- Builds the container.run-container- Runs the container.
- Install pre-commit
- Install the pre-commit hooks by running
pre-commit install --hook-type commit-msg --hook-type pre-commit
What do the pre-commit hooks check?
- `ktfmt` - Checks if the Kotlin code is formatted correctly.
- `commit message linting` - Checks if the commit message is in the correct format.
- `prettier` - Checks if the JavaScript code is formatted correctly.
- `eslint` - Checks if the JavaScript code follows the rules defined in the `.eslintrc.js` file.
To run the backend, navigate to the backend directory and run:
./gradlew api:run
The backend will be available at http://localhost:8080.
Our Interpreter is automatically compiled as a dependency of the backend.
To run the frontend, navigate to the frontend/app directory and run:
npm install (if you haven't started the project yet)
npm start
To run the backend tests, navigate to the backend directory and run:
./gradlew test
To run the frontend tests, navigate to the frontend/app directory and run:
npm test
To lint the backend, navigate to the backend directory and run:
./gradlew ktfmtCheck
To lint the frontend, navigate to the frontend/app directory and run:
npm run lint and npx prettier --check .