dev #19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
### Added - User entity with TypeORM (`src/modules/users/entities/user.entity.ts`): - Fields: id (UUID), email (unique, indexed), password (bcrypt), firstName, lastName, isActive, createdAt, updatedAt - UsersService with password hashing via bcrypt (`src/modules/users/users.service.ts`) - AuthModule with JWT authentication (`src/modules/auth/`) - AuthService: register, login, refreshToken, validateUser - JwtStrategy (Passport): validates Bearer tokens on protected routes - JwtAuthGuard: reusable guard for protected endpoints - AuthController with endpoints: - `POST /api/v1/auth/register` - Register new user - `POST /api/v1/auth/login` - Login with email/password - `POST /api/v1/auth/refresh` - Refresh access token - `POST /api/v1/auth/logout` - Logout (client discards tokens) - `GET /api/v1/auth/me` - Get current user profile (protected) - DTOs with class-validator: RegisterDto, LoginDto, RefreshTokenDto, AuthResponseDto - Full Swagger documentation for all auth endpoints - Database migration `CreateUsersTable` (users table with UUID PK, unique email, indexes) - Unit tests for AuthService (register, login, refresh, validateUser - all branches) - Unit tests for UsersService (findById, findByEmail, emailExists, createUser, validatePassword) - Unit tests for JwtStrategy (valid/invalid payloads) - Installed: @nestjs/jwt, @nestjs/passport, passport, passport-jwt, bcryptcommon.yml,local.yml, ande2e.yml. Update run scripts to utilize the new structure and ensure E2E environment is fully isolated with dedicated configurations and automatic resource creation. 7991fc1357