16 Commits

Author SHA1 Message Date
a56e774892 test: remove redundant JwtAuthGuard mock in unit test file 2025-05-16 14:44:28 +02:00
2de57e6e6f feat: export projectCollaborators in schema index 2025-05-15 20:57:45 +02:00
92c44bce6f feat: add project collaborators relations
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`.
2025-05-15 20:57:32 +02:00
0154f9c0aa feat: add project collaborators schema
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.
2025-05-15 20:57:13 +02:00
c16c8d51d2 feat: add collaborator management to projects module
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.
2025-05-15 20:56:43 +02:00
576d063e52 test: add unit tests for users module
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.
2025-05-15 20:48:42 +02:00
269ba622f8 test: add unit tests for persons and projects modules
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.
2025-05-15 20:31:07 +02:00
50583f9ccc test: add unit tests for tags module and global auth guard
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.
2025-05-15 19:48:44 +02:00
7eae25d5de test: add comprehensive unit tests for groups and auth modules
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.
2025-05-15 19:29:12 +02:00
e64d706274 feat: implement global JWT auth guard with public route support
Introduced `JwtAuthGuard` as a global authentication mechanism using `APP_GUARD`. Added support for public routes via a `Public` decorator with metadata. Updated `AuthController`
2025-05-15 19:09:52 +02:00
76ef9a3380 feat: add db:update script to streamline database updates
Introduced a new `db:update` script combining migration generation and execution. Updated `db:generate` and `db:push` commands for consistency with DrizzleKit updates.
2025-05-15 18:09:49 +02:00
d15bf3fe90 fix: update migrations output path in Drizzle configuration 2025-05-15 18:09:29 +02:00
63458333ca feat: add tags module with CRUD operations and DTOs
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.
2025-05-15 18:09:12 +02:00
0249d62951 fix: update migrations folder path in database service 2025-05-15 18:08:41 +02:00
9515c32016 docs: add migration system documentation and generated initial migrations
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.
2025-05-15 18:08:30 +02:00
9f99b80784 feat: implement authentication and database modules with relations and group management
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.
2025-05-15 17:09:36 +02:00