The original assignment can be found in /docs.
The development environment is abstracted away using Nix, but it is completely optional to use. In case you want to use Nix for your local environment, first install Nix, (in case of VSCode also the recommended extensions), and then run
nix-shellfrom the terminal.
Alternatively, the list of dependencies:
- Node 20
- Docker (not part of the Nix environment, needs to live on host)
The project uses pnpm as its package manager. PnPm is intalled using corepack.
When using the Nix environment,
corepack enablerequires sudo privileges as/nix/storeis group readonly.
When setting up for the first time:
- Run
pnpm ito install the dependencies - Copy
.env.exampleto.env,.env.local.exampleto.env.localanddocker.env.exampletodocker.envand fill in the required values. - Set up dependency service with docker compose, run
docker compose --profile dev up -d - Migrate the BE database with
docker run -v $(pwd)/apps/backend/migrations:/migrations --network host migrate/migrate -path=/migrations/ -database postgres://user:password@localhost:5432/db?sslmode=disable up(check backend README for more info) - Seed the BE database with the initial dataset of
accounts.jsonwithpnpm --filter @repo/backend seed. Seeding is not a resilient operation, it will fail if you run it again. - To start the apps in development mode with intelligent hot-reloading run
pnpm watchandpnpm devin separate terminals. Rebuilding is managed via turbotree. - You can check the API documentation at
http://localhost:3000/documentation
NOTE: the FE app is part of the repo wireframe but has no relevant functionality, so please ignore.
The two apps are dockerised, you can build and run them with the following commands:
pnpm i
docker compose --profile localstack up --build -d