Running locally
Requirements
- Docker with Compose
- Node.js 24 and pnpm 12 (
npm install -g pnpm@12.16.1)
Steps
git clone https://github.com/erik1g/study-manager.git
cd study-manager
pnpm install
ADMIN_EMAIL=you@example.org DOMAIN=localhost node infra/scripts/setup.mjs # writes .env
docker compose --project-directory . -f infra/compose/dev.yml up -d
docker compose --project-directory . -f infra/compose/dev.yml logs server # the link to set up the admin account
The development stack (infra/compose/dev.yml) mounts the source code into the containers: server and web app reload on changes. You reach the app at http://localhost:8080.
To sign in with a test account, use the test stack instead (see Tests): it has invented data and fixed accounts.
Everyday
pnpm typecheck # TypeScript of all packages
pnpm test # unit tests (the server needs the development stack's database)
node infra/scripts/ui-gate.mjs # checks: only building blocks from @study/ui
pnpm --filter @study/docs start # this documentation locally (port 3002)
Server tests
The server tests run against a real PostgreSQL database:
docker compose --project-directory . -f infra/compose/dev.yml exec server sh -c "cd apps/server && pnpm exec vitest run"
Problems
- Permissions on
.pnpm-store: the project uses a package store in the repository that the dev containers share. Delete the folder and runpnpm installagain. - Port 8080 in use: set
HTTP_PORTin the.env.