79bc2ef25b56737ac96396c513ed807c0661b7a0
Closes the two gaps 010-identity-auth explicitly deferred (password reset, login rate-limiting), plus a shared password-strength validator both the reset-consume endpoint and admin account creation now depend on. - Password reset: single-use, paired-Redis-key tokens (never in Postgres), identical response regardless of account existence, stubbed delivery via a structured log line (no email infrastructure exists yet). - Password strength: one validatePasswordStrength() call site, wired into both POST /admin/users and the reset-consume flow. - Login rate-limiting: checkRateLimit keyed by submitted email, checked before any credential verification. Also fixes tests/helpers/auth.ts's shared loginAs() helper, which reused two fixed accounts across the whole integration suite via upsert — now rate-limited per email, that collided across ~30 files sharing one budget. Each call now gets a unique email; no call sites needed to change. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SupportHub API
Development (Docker)
- Start all services:
docker compose --env-file .env.development -f docker-compose.development.yml up -d --build - Start only database & cache (for local app development):
docker compose --env-file .env.development -f docker-compose.development.yml up -d postgres redis
Test (Docker)
docker compose --env-file .env.test -f docker-compose.test.yml up --build
Production (Docker)
docker compose --env-file .env.prod -f docker-compose.prod.yml up --build -d
Stop / Down
- Stop production:
docker compose -f docker-compose.prod.yml down - Stop development:
docker compose -f docker-compose.development.yml down - Stop development & wipe volumes:
docker compose --env-file .env.development -f docker-compose.development.yml down -v
List Containers & Logs
- List containers:
docker compose --env-file .env.development -f docker-compose.development.yml ps - Follow logs:
docker compose --env-file .env.development -f docker-compose.development.yml logs -f
Local Development (Host)
- Start database & cache in Docker:
docker compose --env-file .env.development -f docker-compose.development.yml up -d postgres redis - Start API server in watch mode:
npm run dev
Database Migrations & Prisma
-
Generate Prisma Client:
npm run prisma:generate -
Run / Apply Dev Migrations:
npx dotenv-cli -e .env.development -- npm run prisma:migrate -
Deploy Migrations (Production/CI):
npx dotenv-cli -e .env.development -- npm run prisma:deploy -
Push Schema directly (Sync schema without migration files):
npx dotenv-cli -e .env.development -- npx prisma db push
Database Seeding
- Seed Database (Roles, Products, Categories, Hierarchy & Demo data):
npx dotenv-cli -e .env.development -- npm run prisma:seed
Languages
TypeScript
93.2%
PowerShell
6.5%
JavaScript
0.2%