Prisma models per data-model.md: users (status enum, site-admin flag), user_identities (password provider now, OIDC later — subject is the stable user id), sessions (hashed ids), auth_tokens (hashed, single- use), plus rate_limits and mail_outbox for the upcoming M1 stories. UsersService creates accounts transactionally with Argon2id-hashed password identities (OWASP parameters, rehash detection) and maps uniqueness violations to field-level conflicts. Database-backed suites run when TEST_DATABASE_URL is set — locally against the dev db, in CI via a new postgres service container; shared auth schemas (username, password policy incl. common-password blocklist) ship with tests. Closes #10 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
44 lines
1.2 KiB
JSON
44 lines
1.2 KiB
JSON
{
|
|
"name": "@dorfteich/api",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"description": "Dorfteich REST API server",
|
|
"license": "MIT",
|
|
"scripts": {
|
|
"build": "prisma generate && nest build",
|
|
"start": "node dist/main.js",
|
|
"start:dev": "prisma generate && nest start --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run --passWithNoTests",
|
|
"db:migrate:dev": "prisma migrate dev",
|
|
"db:seed": "tsx prisma/seed.ts"
|
|
},
|
|
"dependencies": {
|
|
"@dorfteich/shared": "workspace:*",
|
|
"@nestjs/common": "^11.0.0",
|
|
"@nestjs/core": "^11.0.0",
|
|
"@nestjs/platform-express": "^11.0.0",
|
|
"@prisma/client": "^6.3.0",
|
|
"argon2": "^0.44.0",
|
|
"i18next": "^26.3.4",
|
|
"nestjs-pino": "^4.3.0",
|
|
"pino": "^9.6.0",
|
|
"pino-http": "^10.4.0",
|
|
"prisma": "^6.3.0",
|
|
"reflect-metadata": "^0.2.2",
|
|
"rxjs": "^7.8.0"
|
|
},
|
|
"devDependencies": {
|
|
"@nestjs/cli": "^11.0.0",
|
|
"@nestjs/testing": "^11.0.0",
|
|
"@swc/core": "^1.10.0",
|
|
"@types/express": "^5.0.0",
|
|
"@types/supertest": "^6.0.0",
|
|
"pino-pretty": "^13.0.0",
|
|
"supertest": "^7.0.0",
|
|
"tsx": "^4.19.0",
|
|
"unplugin-swc": "^1.5.0",
|
|
"vitest": "^3.0.0"
|
|
}
|
|
}
|