AuthForge Commands Reference
This document lists the main project commands exposed through package.json scripts, along with optional direct Docker commands.
These commands are intended for development and local environment management.
Project Setup
Install dependencies
pnpm install
Prepare Git hooks manually
pnpm prepare
Run full project setup
pnpm setup
This command will:
- install dependencies
- activate Git hooks through the
preparelifecycle script when applicable - generate Prisma Client through the
postinstalllifecycle script - start the PostgreSQL container
- apply database migrations
Development
Start development server
pnpm dev
Application runs at: http://localhost:3000
Database
Start PostgreSQL container (Docker Desktop must be running)
pnpm db:up
Stop PostgreSQL container
pnpm db:down
Prisma
Generate Prisma Client
pnpm prisma:generate
Apply migrations (requires a valid `.env` file with `DATABASE_URL`)
pnpm prisma:migrate
Open Prisma Studio
pnpm studio
or
pnpm prisma:studio
Detect unused exports
pnpm ts-prune
Code Quality
Run TypeScript checks
pnpm tsc
Run ESLint
pnpm lint
Run full code quality checks
pnpm check
Runs:
- TypeScript validation
- ESLint checks
- Prettier formatting check
Format code with Prettier
pnpm format
Check formatting without modifying files
pnpm format:check
Build
Create production build
pnpm build
Start production server
pnpm start
Development Utilities
Run development environment setup only
pnpm dev:setup
This command will:
- start the PostgreSQL container
- apply database migrations
Documentation
Generate project structure tree
pnpm docs:tree
Manual Docker Commands (optional)
Advanced users may run Docker commands directly.
Start PostgreSQL with Docker Compose
docker compose --env-file .env -f infra/docker/docker-compose.yml up -d
Stop PostgreSQL with Docker Compose
docker compose --env-file .env -f infra/docker/docker-compose.yml down
Notes
AuthForge provides pnpm scripts for common development tasks.
Direct Docker and Prisma commands are optional and intended for advanced users.