auth #7

Merged
faicel merged 3 commits from auth into dev 2026-05-08 04:38:07 +00:00
Owner
No description provided.
### 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, bcrypt
## [1.0.0-rc.8] - 2026-05-07
Some checks failed
Enforce branch flow / call-central-validation (pull_request) Successful in 2s
Enforce branch flow / lint-and-test (pull_request) Has been cancelled
cb4c211863
### Changed

- Docker Compose configuration split into 3 files for better separation of concerns:
  - `docker/common.yml`: shared base (images, secrets, base environment)
  - `docker/local.yml`: local dev overrides (ports 5432/9000, persistent volumes)
  - `docker/e2e.yml`: E2E test overrides (ports 5433/9010, tmpfs, ephemeral environment)
- `docker/run.sh` updated to use `common.yml` + `local.yml`
- `docker/run-e2e.sh` uses `common.yml` + `e2e.yml` with isolated project name (`job-tracker-e2e`)
- Removed obsolete `docker/data.yml` (replaced by the 3-file split)
- E2E environment now fully isolated from dev (separate project, tmpfs only, no persistent data)

### Added

- `job-tracker-backend/.env.e2e`: dedicated environment file for E2E tests
  - Separate ports (DB: 5433, MinIO: 9010), database name (`job_tracker_e2e_test`)
  - Fast bcrypt rounds (4), sync mode enabled, debug logging disabled
- E2E test database `job_tracker_e2e_test` created automatically by `run-e2e.sh`
- MinIO bucket `jobs-tracker-e2e` created automatically by `run-e2e.sh`
Merge branch 'dev' into auth
All checks were successful
Enforce branch flow / call-central-validation (pull_request) Successful in 2s
Enforce branch flow / lint-and-test (pull_request) Successful in 1m0s
06bd29f222
faicel deleted branch auth 2026-05-08 04:38:07 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
faicel/job_tracker_backend!7
No description provided.