Community
Contributing
How to contribute to auth-service.
Contributions are welcome. Please read the CONTRIBUTING.md and AGENTS.md in the repository for detailed guidelines.
Development workflow
git clone https://github.com/circle-rd/auth-service.git
cd auth-service
pnpm install
cp .env.example .env
# Edit .env: set BETTER_AUTH_SECRET, BETTER_AUTH_URL=http://localhost:3001 and ADMIN_* (pnpm dev does not expand ${...} references)
docker compose up -d postgres
pnpm db:migrate
pnpm dev
See the Quick start for the full from-source setup, including the admin frontend.
Running tests
Unit tests (no database required):
pnpm test
Integration tests start their own ephemeral PostgreSQL 17 container through testcontainers, so Docker must be running:
pnpm test:integration
The CI workflow runs pnpm build:server, pnpm lint, pnpm format:check, pnpm test and pnpm test:integration.
Code style
- TypeScript strict mode (
"strict": trueintsconfig.json) - ESM only (
"type": "module"inpackage.json) - No default exports from route files — all exports are named functions
Submitting changes
- Create a branch from
develop, the work branch (mainis the production branch, seeAGENTS.md). - Make your changes with appropriate test coverage.
- Ensure
pnpm build:server,pnpm lint,pnpm format:check,pnpm testandpnpm test:integrationpass. - Open a pull request.