71 Commits

Author SHA1 Message Date
Mathis HERRIOT
bdca6511bd
test: enhance e2e tests for projects with improved authentication and collaborator scenarios 2025-05-16 19:10:59 +02:00
Mathis HERRIOT
634beef8d6
test(persons): add e2e tests for persons controller 2025-05-16 19:10:41 +02:00
Mathis HERRIOT
ba8d78442c
feat(users): add API documentation properties to CreateUserDto using Swagger decorators 2025-05-16 19:10:20 +02:00
Mathis HERRIOT
b61f297497
feat: add Swagger API documentation setup in main application bootstrap 2025-05-16 19:10:12 +02:00
Mathis HERRIOT
2f9d2d1df1
feat: add @nestjs/swagger and swagger-ui-express dependencies for API documentation 2025-05-16 19:09:29 +02:00
Mathis HERRIOT
63f28be75d
fix(backend): correct start:prod script path to dist/src/main 2025-05-16 19:07:30 +02:00
Mathis HERRIOT
52d74a754c
feat(tests): add utility functions for testing with NestJS
Add test utilities to facilitate creating test apps, test users, generating tokens, and cleaning up test data in the backend codebase.
2025-05-16 19:07:09 +02:00
Mathis HERRIOT
f30f973178
chore(deps): update pnpm-lock file to reflect dependency upgrades and lockfile version bump to 9.0 2025-05-16 19:06:58 +02:00
Mathis HERRIOT
04144bcd3a
chore(workspace): add onlyBuiltDependencies to pnpm-workspace.yaml 2025-05-16 19:06:41 +02:00
Mathis HERRIOT
077f3b6a87
docs: add e2e testing documentation 2025-05-16 19:05:55 +02:00
Mathis HERRIOT
542c27bb51
feat: integrate WebSocketsModule in projects and groups modules
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
2025-05-16 19:05:28 +02:00
Mathis HERRIOT
10d4e940ed
test: add comprehensive e2e tests for users, groups, auth, and projects APIs 2025-05-16 19:04:50 +02:00
cee85c9885 docs: add CORS configuration guide and update status document
- Added `CORS_CONFIGURATION.md` to outline CORS setup for development and production environments.
- Removed completed CORS-related task from `PROJECT_STATUS.md`.
2025-05-16 18:12:13 +02:00
b3a95378f1 feat: enhance CORS configuration for development and production environments
- 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.
2025-05-16 18:10:42 +02:00
3dcd57633d docs: update PROJECT_STATUS.md with GDPR progress and priorities
- Updated GDPR compliance status: backend features implemented, frontend still pending.
- Revised e2e test development and API documentation tasks.
- Adjusted progress percentages for backend tests, frontend optimizations, and integrations.
- Added new task priorities focused on GDPR, security enhancements, and testing.
2025-05-16 17:36:42 +02:00
eee687a761 chore: update pnpm-lock.yaml to add socket.io-client and dependencies
Added `socket.io-client@4.8.1` alongside its dependencies (`engine.io-client@6.6.3`, `engine.io-parser@5.2.3`, `socket.io-parser@4.2.4`, and `xmlhttprequest-ssl@2.1.2`). Updated lock file to reflect changes.
2025-05-16 17:05:24 +02:00
bf4ac24a6b docs: update PROJECT_STATUS.md with module completions, real-time features, and testing progress
- Marked completion of real-time collaboration with Socket.IO and related WebSocket events.
- Updated statuses for unit tests, e2e tests, and priority tasks.
- Adjusted progress percentages and timeline estimates for backend and frontend modules.
- Emphasized upcoming tasks: API documentation, GDPR compliance, and e2e test implementation.
2025-05-16 17:05:16 +02:00
6cc6506e6f refactor: add explicit any types and improve readability in group state handling
- Updated `setProject` function in `page.tsx` to include explicit `(prev: any)` and `(group: any)` type annotations for better readability.
- Added `"use client";` directive to `notifications.tsx` for React server-client compatibility.
- Improved structural consistency and clarity in group and person state updates.
2025-05-16 17:05:07 +02:00
2851fb3dfa test: add WebSocket event emission tests for services and improve coverage
- 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.
2025-05-16 16:42:33 +02:00
2697c7ebdd feat: add WebSocket module 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).
2025-05-16 16:42:15 +02:00
ad6ef4c907 feat: add socket context and notifications listener for real-time event handling
- Introduced `SocketProvider` to manage WebSocket connection and context across the app.
- Added `NotificationsListener` component to handle real-time notifications and display feedback via `toast`.
- Enabled event subscriptions for projects, groups, collaborators, and user actions.
2025-05-16 16:41:55 +02:00
d7255444f5 feat: implement real-time collaboration and instant updates with socket integration
- Added `SocketProvider` for application-wide WebSocket connection management.
- Introduced real-time updates for projects and groups, including create, update, and delete events.
- Enhanced project and group pages with real-time collaboration, group actions, and data syncing.
- Refactored fetch methods to include loading and refreshing states.
- Integrated `toast` notifications for real-time event feedback.
- Updated `package.json` to include `socket.io-client@4.8.1`.
2025-05-16 16:41:37 +02:00
ce7e89d339 docs: update PROJECT_STATUS.md with module completions and timeline adjustments
Reflected the completion of key modules (`auth`, `groups`, `tags`, `pages`). Adjusted progress percentages, revised timeline estimates, and emphasized next steps, including API integration finalization and real-time collaboration features.
2025-05-16 15:46:05 +02:00
bd522743af chore: update pnpm-lock.yaml to include swr and associated dependencies
Added `swr@2.3.3` with peer and regular dependencies (`react@19.1.0`, `dequal@2.0.3`, `use-sync-external-store@1.5.0`). Updated lock file to reflect changes.
2025-05-16 15:45:41 +02:00
bb16aaee40 chore: update pnpm-lock.yaml to include swr and associated dependencies
Added `swr@2.3.3` with peer and regular dependencies (`react@19.1.0`, `dequal@2.0.3`, `use-sync-external-store@1.5.0`). Updated lock file to reflect changes.
2025-05-16 14:45:06 +02:00
bb62a374c5 docs: update project status to reflect revised progress and priorities
Revised `PROJECT_STATUS.md` to adjust module completion statuses, testing progress, and timeline estimates. Refocused priorities on missing modules, authentication enhancements, and test/documentation improvements.
2025-05-16 14:44:57 +02:00
a56e774892 test: remove redundant JwtAuthGuard mock in unit test file 2025-05-16 14:44:28 +02:00
cd5ad2e1e4 feat: implement API service, middleware, and authentication context
- Added `lib/api.ts` to centralize API communication for authentication, projects, persons, tags, and groups.
- Introduced `middleware.ts` to handle route protection based on authentication and roles.
- Created `auth-context.tsx` to manage authentication state with `AuthProvider` and `useAuth` hook.
- Updated `package.json` to include `swr` for data fetching.
- Enhanced project documentation (`RESPONSIVE_DESIGN.md` and `README.md`) with responsive design and architecture details.
2025-05-16 14:43:56 +02:00
cab80e6aef feat: add dashboard, projects, and persons pages with reusable components
Implemented the following:
- `DashboardPage`: displays an overview of stats, recent projects, and tabs for future analytics/reports.
- `ProjectsPage` and `PersonsPage`: include searchable tables, actions, and mobile-friendly card views.
- Integrated reusable components like `AuthLoading`, `DropdownMenu`, `Table`, and `Card`.
2025-05-16 14:43:14 +02:00
753669c622 feat: add reusable frontend components for admin, dashboard, and tag management
Implemented reusable components:
- `TagSelector`: a customizable tag selection control with asynchronous mock data loading.
- `AuthLoading`: a loading state wrapper for authentication processes.
- `AdminLayout` and `DashboardLayout`: layouts with navigation and user management features.
- `ThemeProvider`: supports dynamic theme toggling.
2025-05-16 14:42:58 +02:00
cf292de428 docs: update documentation to reflect module completion and testing progress
Updated `PROJECT_STATUS.md` with completed modules (`auth`, `groups`, `tags`) and unit testing progress, including marked tests for controllers and services as done. Added logical and conceptual database models (`DATABASE_SCHEMA_PLAN.md`) and revised implementation statuses in `IMPLEMENTATION_GUIDE.md`.
2025-05-15 20:57:59 +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
0f3c55f947 docs: update project status to reflect completed modules and testing progress
Updated `PROJECT_STATUS.md` to mark the `groups` and `tags` modules as completed, along with unit tests for services and controllers. Adjusted backend progress percentages and revised remaining priorities, focusing on module relations and real-time communication features.
2025-05-15 19:49:00 +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
04aba190ed docs: update project status with authentication progress
Marked authentication module, GitHub OAuth, JWT strategies, and guards as completed in `PROJECT_STATUS.md`. Updated progress percentages, adjusted task priorities, and revised
2025-05-15 19:28:45 +02:00
9792110560 docs: add CI/CD and deployment documentation
Added a new `README.md` under `.github` to document the project's CI/CD workflow and deployment setup. Includes GitHub Actions pipeline descriptions, Docker configuration details, environment variables, and production deployment considerations.
2025-05-15 19:10:07 +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
4dbb858782 docs: update README with revised architecture and setup instructions
Streamlined project structure documentation by detailing separate backend and frontend directories, updated setup commands, added Docker usage examples, and improved clarity on environment configuration.
2025-05-15 18:17:18 +02:00
b64a6e9e2e refactor: remove redundant Git mapping for backend folder in IDE configuration 2025-05-15 18:10:28 +02:00
f739099524 docs: update project status to reflect completed database migration system
Updated `PROJECT_STATUS.md` to mark the database migration system as completed with DrizzleORM. Adjusted progress percentages and next steps to prioritize authentication and core functionalities.
2025-05-15 18:10:19 +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