-
Prerequisites: install SBT, Java (25), Node (>= 22) and PostgreSQL (>= 9.4).
-
Create PostgreSQL database
Option A: Using Docker (recommended for development):
$ docker compose up -d postgresOr with the provided Makefile:
$ make db-startSee DOCKER.md for detailed Docker setup instructions.
Option B: Using local PostgreSQL installation:
$ createuser -SPRD exam $ createdb exam --owner=examFor tests:
$ createdb exam_test --owner=examRequires that you have pg_hba.conf set up to accept local connections etc. Note that you can configure database related parameters (and others) in the dev config file (/conf/dev.conf)
-
Setup frontend tooling and start frontend application in development mode
Install pnpm:
$ npm install -g pnpmOptionally install scalafmt for fast Scala formatting in the pre-commit hook. Requires a separate Coursier installation — ensure its bin directory is on your PATH. Without it, the pre-commit hook will fail on Scala files; you can also run formatting manually via
sbt scalafmtAll.$ cs install scalafmtThen install dependencies and start the frontend:
$ pnpm install $ pnpm startWe use
lefthookfor git hooks. They should install automatically viapostinstall, but pnpm may skip this if dependencies haven't changed. If your hooks aren't firing, run:$ pnpm run postinstall -
In another tab or window start sbt console and run backend application in development mode
$ sbt -Dconfig.file=conf/dev.conf -jvm-debug 9999 -mem 2048 [exam] $ runThis opens up a debug port at 9999 and allocates 2 Gb of heap memory for the JVM.
-
Open http://localhost:4200 in your browser. App should be accessible from browser shortly (backend compilation might take some seconds)
-
Instead of steps 3 to 5 you can also use Docker if you prefer. See DOCKER.md.
Dependabot alerts cover both npm and sbt dependencies (Security and quality → Dependabot). The sbt dependency tree is
submitted to GitHub by the dependency-submission CI job on pushes to master. Alerts that don't apply are dismissed
with a reason and comment rather than left open.
To check a branch locally before merging, scan the runtime jars and the frontend lockfile with Trivy:
$ sbt stage
$ trivy rootfs --scanners vuln target/universal/stage/lib
$ trivy fs --scanners vuln pnpm-lock.yaml
Use rootfs for the jars; fs mode reads only lockfiles and silently finds nothing there. For the frontend,
pnpm audit --prod gives the same results as the Trivy lockfile scan. To see why a library is
on the classpath, use sbt "dependencyTree" or sbt "whatDependsOn <org> <artifact>".
For more information see official installation instructions (in Finnish only)