- Refactored test cases to use more precise assertions and enhanced expected data validation.
- Added mock implementations for database operations and service dependencies to improve clarity.
- Improved error handling test scenarios (e.g., NotFoundException cases).
- Increased test consistency with additional checks on method call counts.
Enhance group service to manage metadata, including descriptions for groups. Update CRUD operations to handle metadata extraction and response formatting. Improve error handling for invalid group IDs and enhance group-person relationship responses with person fetching.
Added validation checks for tagId, personId, and projectId across tag-related operations. Introduced `BadRequestException` for invalid or missing inputs. Replaced generic errors with more descriptive exceptions.
Added validation checks for tagId, personId, and projectId across tag-related operations. Introduced `BadRequestException` for invalid or missing inputs. Replaced generic errors with more descriptive exceptions.
- Add gdprConsentDate for test compatibility in updateGdprConsent
- Include empty groups and persons arrays in getUserWithProjects for test consistency
- Minor formatting cleanup
Added validation and error handling across service methods. Introduced default values for `create` and `update` methods. Modularized `PersonsModule` and secured `PersonsController` with JWT authentication guard.
- Added `description` field to create and update group DTOs.
- Simplified person DTOs by consolidating fields into `name`, replacing various attributes.
- Added `skills` field to create and update person DTOs for array-based skill representation.
fix: ensure HttpCode annotations for specific endpoints in users and groups controllers
refactor: enhance person handling logic in groups service for better e2e test support
fix: improve CORS configuration for handling additional origins
feat: add @Public decorator to app controller's root endpoint
refactor: modify projects controller to return JSON responses for check-access endpoint
- Updated backend CORS setup to differentiate between development (open origins) and production (restricted origins).
- Implemented support for additional allowed origins via environment variables.
- Adjusted `WebSocketGateway` CORS settings to align with the new configuration.
- Updated `PROJECT_STATUS.md` to reflect progress on CORS-related security tasks.
- Added unit tests for WebSocket event emissions in `GroupsService` and `ProjectsService` (create, update, delete, and collaborator actions).
- Added new test files for `WebSocketsGateway` and `WebSocketsService` to ensure correct event handling and gateway connections.
- Improved test structure and coverage for real-time functionalities.
- Implemented `WebSocketsGateway` for handling Socket.IO connections, events, and rooms.
- Added `WebSocketsService` to act as a facade for emitting WebSocket events (projects, groups, notifications).
- Registered `WebSocketsModule` and integrated it into `AppModule`.
- Enabled real-time updates in `ProjectsService` and `GroupsService` with relevant WebSocket events (create, update, delete, collaborator/group actions).
Defined `projectCollaborators` relations in the database schema. Updated `usersRelations` and `projectsRelations` to include `projectCollaborations` and `collaborators` respectively. Added `projectCollaboratorsRelations` to establish relationships with `projects` and `users`.
Introduced `projectCollaborators` schema to define project-user relationships. Includes indices and a unique constraint for `projectId` and `userId`. Added corresponding type definitions for select and insert operations.
Added endpoints to manage collaborators in `ProjectsController`:
- Add collaborator
- Remove collaborator
- Get project collaborators
Updated `ProjectsService` with corresponding methods and enhanced `checkUserAccess` to validate user access as owner or collaborator. Included unit tests for new functionality in controllers and services.
Added comprehensive unit tests for `UsersController` and `UsersService`, covering CRUD operations, GDPR consent updates, data export, and exception handling. Mocked `JwtAuthGuard` and database operations for all tests.
Added comprehensive unit tests for `PersonsController`, `PersonsService`, `ProjectsController`, and `ProjectsService`. Covered CRUD operations, exception handling, group/project associations, and user access validation. Mocked `JwtAuthGuard` for all tests.
Added comprehensive unit tests for `TagsService` and `TagsController`, covering CRUD operations, exception handling, and associations with projects and persons. Mocked `JwtAuthGuard` globally for testing purposes.
Added unit tests for `GroupsService`, `GroupsController`, `AuthService`, `AuthController`, and `JwtAuthGuard` to ensure functionality and coverage. Includes tests for entity operations, exception handling, and integration scenarios.
Introduced `JwtAuthGuard` as a global authentication mechanism using `APP_GUARD`. Added support for public routes via a `Public` decorator with metadata. Updated `AuthController`
Introduced a new `db:update` script combining migration generation and execution. Updated `db:generate` and `db:push` commands for consistency with DrizzleKit updates.
Introduced a new `TagsModule` with support for creating, updating, and managing tags. Implemented DTOs (`CreateTagDto`, `UpdateTagDto`) for validation and structure. Added `TagsService` and `TagsController` with APIs for tags-to-project and tags-to-person associations.
Added `README.md` to document the database migration system, including generation and usage instructions. Updated `generate-migrations.ts` to fix directory structure and streamline commands. Included initial migration files for schema setup using DrizzleORM.
Added new authentication strategies (JWT and GitHub OAuth), guards, and controllers. Implemented database module, schema with relations, and group management features, including CRD operations and person-to-group associations. Integrated validation and CORS configuration.