Docs

Practical guide to Doorman: what users can do, how operators set it up, and how technical teams integrate auth, RBAC, billing, and usage.

Technical setup

Services

  • pnpm dev:web: starts the Next.js dashboard on port 3000.
  • pnpm dev:api: starts the control API on port 4000.
  • pnpm --filter @doorman/sample-spa dev: starts the Vite sample app.
  • pnpm --filter @doorman/sample-client dev: starts the server-side OIDC sample.

Environment

Defaults work for local development. Set only what changes for your environment.

# services/control-api/.env
DATABASE_URL=postgresql://doorman:doorman@localhost:5432/doorman
KRATOS_PUBLIC_URL=http://localhost:4433
HYDRA_PUBLIC_URL=http://localhost:4444
HYDRA_ADMIN_URL=http://localhost:4445
WEB_ORIGIN=http://localhost:3000
CONTROL_API_PUBLIC_URL=http://localhost:4000
SMTP_URL=smtp://localhost:1025
SMTP_FROM=doorman@example.com

Database

  • pnpm --filter @doorman/control-api migrate applies all SQL migrations from infra/db/migrations.
  • infra/db/seed contains optional local seed data.
  • The compose stack creates separate kratos, hydra, and doorman databases.

Tests

pnpm test
pnpm test:inventory
pnpm test:e2e
pnpm test:all
pnpm verify

Use pnpm verify before broad changes. For docs-only changes, pnpm --filter @doorman/web lint is usually enough.