Skip to content

Latest commit

 

History

History
35 lines (27 loc) · 1.92 KB

File metadata and controls

35 lines (27 loc) · 1.92 KB

Developer guide

This guide covers the tasks and hints for developers.

Services

After running pnpm dev the following services should come up:

Tasks

  • Upgrade dependencies with pnpm upgrade -ri. If you use -L aswell you can upgrade major package version, but make sure you don't upgrade to dependencies that require Node 22.
  • Bump versions by using pnpm changeset.
  • Connect to the development database with psql -h db -U postgres and the password postgres.
  • Regenerate API types of the frontend with pnpm --filter @quassel/frontend run build:types.
  • Run db tasks by using pnpm --filter @quassel/backend run db. Create a new migration with pnpm --filter @quassel/backend run db migration:create.
    • Migrate up to the latest version with pnpm --filter @quassel/backend run db migration:up.
    • Run seeders with pnpm --filter @quassel/backend run db seeder:run.
    • Restart fresh (drop, create and seed) with pnpm --filter @quassel/backend run db schema:fresh --seed -r.
  • Run nest tasks by using pnpm --filter @quassel/backend run nest.
    • Generate services with e. g. pnpm --filter @quassel/backend run nest g s participants research.
    • Generate controllers with e. g. pnpm --filter @quassel/backend run nest g co languages defaults.

Work with a database dump

  1. Retrieve a database dump
  2. Create a separate database to import the dump with createdb -h db -U postgres dump
  3. Load the dump into the database with psql -h db -U postgres -d dump -f db_backup_2025-10-05_22-00-01.sql
  4. Start the application pointing to the dump database with DATABASE_NAME=dump pnpm dev
  5. Clean up the database with dropdb -h db -U postgres dump