NestJS authentication service with PostgreSQL, Redis and Drizzle ORM.
docker-compose up -dnpm installCreate .env file:
DATABASE_URL=postgresql://service:servicepwd@localhost:5432/auth
JWT_SECRET=strong-secret
npx drizzle-kit push# Development
npm run start:dev
# Production
npm run start:prodnpm run testnpm run test:e2eRegister new user
- Body:
{ username: string, email: string, password: string, fullName: string } - Response:
UserResponseDto
User login
- Body:
{ email: string, password: string } - Response:
LoginResponseDto(with JWT token)
Get user profile (requires JWT token)
- Headers:
Authorization: Bearer <token> - Response:
UserResponseDto