Files
lunarfront-app/packages/backend/package.json
Ryan Moon 979a9a2c00 Add user auth with JWT, switch to bun test
- User table with company_id FK, unique email, role enum
- Register/login routes with bcrypt + JWT token generation
- Auth plugin with authenticate decorator and role guards
- Login uses globally unique email (no company header needed)
- Dev-auth plugin kept as fallback when JWT_SECRET not set
- Switched from vitest to bun:test (vitest had ESM resolution
  issues with zod in Bun's module structure)
- Upgraded to zod 4
- Added Dockerfile.dev and API service to docker-compose
- 8 tests passing (health + auth)
2026-03-27 17:33:05 -05:00

36 lines
842 B
JSON

{
"name": "@forte/backend",
"version": "0.0.1",
"private": true,
"type": "module",
"scripts": {
"dev": "bun --watch run src/main.ts",
"start": "bun run src/main.ts",
"test": "bun test",
"test:watch": "bun test --watch",
"lint": "eslint src/",
"db:generate": "bunx drizzle-kit generate",
"db:migrate": "bunx drizzle-kit migrate",
"db:seed": "bun run src/db/seed.ts"
},
"dependencies": {
"@forte/shared": "workspace:*",
"fastify": "^5",
"fastify-plugin": "^5",
"@fastify/cors": "^10",
"drizzle-orm": "^0.38",
"postgres": "^3",
"ioredis": "^5",
"zod": "^4",
"@fastify/jwt": "^9",
"bcrypt": "^6"
},
"devDependencies": {
"typescript": "^5",
"drizzle-kit": "^0.30",
"pino-pretty": "^13",
"@types/node": "^22",
"@types/bcrypt": "^5"
}
}