Added a search method in FilesService and corresponding endpoint in FilesController to search files with a limit, offset, and search keyword. Introduced CreateFilesDto with validation constraints to structure file creation inputs.
This change introduces a constructor to the MachinesService class, ensuring the DbService is properly injected. This setup prepares for future methods dealing with machine data operations, such as fetching, creating, and deleting machines, as well as retrieving associated files.
The uploader field in the schema has been deleted. This change ensures the table structure is simplified and aligns with the updated data requirements. All related functionalities have been adjusted to accommodate this deletion.
Implemented placeholders for saving a file in the files service and added a new POST endpoint in the files controller. These changes lay the groundwork for future development of file uploading functionality.
Introduced CreateGroupDto to enforce validation rules for group creation. Integrated DbModule into GroupsService and added a getGroupsByName method for database queries. Placeholder methods for group creation, deletion and file retrieval are also defined.
Updated the FilesService.get() method to return a StreamableFile directly with appropriate headers instead of a custom object. Adjusted the FilesController to reflect this change and ensure the file names are formatted by replacing spaces with underscores.
Replace loop-based MIME type check with Set.prototype.has for improved readability and performance. This change eliminates the need for an explicit loop, making the code more concise and efficient.
Introduce 'extension' and 'isDocumentation' fields to the database schema. These additions enhance file metadata and facilitate improved data management.
This commit updates the FilesModule to import both StorageModule and DbModule. This enhances the functionality of the FilesModule by integrating database and storage services.
Replaced Buffer with StreamableFile for more efficient file handling by streaming the content instead of reading it into memory. Additionally, updated the method signatures and parameters to improve clarity and align with the new changes.
Removed the `files.service.spec.ts` test file as it is no longer required. Updated the `get` method parameter in `files.service.ts` to use `fileId` instead of `checksum`, and adjusted the related logic for consistency.
Implemented a method to fetch a file and its information based on checksum. Integrated database and storage services to retrieve and prepare file stream and metadata. Also handles scenarios where the file is not found or multiple entries exist for the same checksum.
Introduced a new `read` method in `storage.service.ts` to fetch files from storage based on checksum, extension, and type. This method handles potential exceptions by throwing a `NotFoundException` if the file is not found.
Enhanced the "new" method to include detailed documentation and parameters for file processing and validation. Introduced allowed MIME types as a parameter and logging for clearer file management.
Update all NestJS imports to use double quotes instead of single quotes across multiple files. Adjusted indentation in various files to ensure uniform code style. These changes improve code readability and maintainability.
Deleted MachineController, MachineModule, and associated tests to streamline the codebase. This simplifies the project structure by removing unused or redundant components.
Reorganized StorageService to incorporate MIME type validation and adjustable file size limits, enhancing file validation. Introduced new methods for checksum calculation and file information generation, and updated the StorageModule to import the DbModule for database interactions.
Added a new 'checksum' field with a length of 64 characters to ensure data integrity. Additionally, enforced uniqueness on the 'type_name' to prevent duplicate entries.
Updated `MachineModule` to `MachinesModule` and `AuthorModule` to `AuthorsModule` for consistency with pluralized naming. Adjusted import paths accordingly to reflect these changes.
Renamed MachineService to MachinesService across the codebase for consistency. Added MachinesController, MachinesModule, and associated tests to enhance modularity and structure.
Added dependencies include @nestjs/throttler, argon2, express, helmet, and jose. Updated existing dependencies in package.json and pnpm-lock.yaml to their latest versions for compatibility and security improvements.
This commit adds MachineModule and AuthorModule to the imports array in the AppModule. This inclusion ensures that the functionalities provided by these modules are available throughout the application.
Implemented the MachineModule along with its corresponding MachineController and MachineService classes. Added unit tests for both the controller and service to ensure they are correctly instantiated and defined.
This commit introduces a new Author module in the backend application. It includes the AuthorController with basic endpoints and the AuthorService for handling author-related logic. Basic test files for both the controller and the service are also added.
Implemented GET, POST, and DELETE endpoints in GroupsController to manage groups and associated files with pagination and optional search functionality. Created an ISearchQuery interface to standardize query parameters across methods.
This commit introduces the Files, Groups, and Admin modules, along with their respective services and controllers. Each module includes basic setup with injectable services, controllers, and initial test specs to ensure they are defined properly. This groundwork prepares the backend for further development and feature implementation.
Integrated FilesModule, AdminModule, and GroupsModule into app.module.ts to extend functionality. This addition enhances organizational capabilities and improves system modularity.
Added the `groupId` column to the existing table to link with the new `FilesGroupTable`. The `FilesGroupTable` includes a unique identifier and a unique group name to manage file groups effectively.
Deleted unused spec files for app controller and service to clean up the codebase. Added helmet middleware for security and integrated ThrottlerModule for rate limiting and ConfigModule for configuration management. Updated app.service to modify response structure.
Removed the deprecated `firstName` and `lastName` fields and introduced `email` and `uploader` fields. Added `FilesTypesTable`, `MachinesTable`, and `FilesTypeForMachine` for managing file types and machine associations. Updated the `fileType` field to reference `FilesTypesTable`.
Introduced `CredentialsService` for handling password hashing, verification, and JWT token operations. Added `CredentialsModule` to register `CredentialsService` and integrate it with the ConfigModule.
Implemented the `AuthModule` with necessary controllers and services to handle user authentication and authorization. Added `UserGuard` and `AdminGuard` to secure endpoints based on user roles.
Ajout des nouveaux composants UI : Alert, Badge, Form, Sheet, Tabs et Input dans le répertoire frontend. Mise à jour du fichier package.json avec des nouvelles dépendances Radix UI et des autres bibliothèques nécessaires. Ajout d'une configuration pour TailwindCSS dans components.json.
Ajoute la spécification de retour pour la méthode getChecksum dans StorageService. Cela améliore la clarté et la sécurité du code en explicitant le type de retour attendu.
Ajout des fonctions privées pour sauvegarder, vérifier, et récupérer des fichiers dans le service de stockage. Plusieurs exceptions gérées pour les erreurs courantes telles que la taille et le type de fichier.
Change le type du paramètre dbConfig de `any` à `object` pour renforcer le typage et éviter les erreurs potentielles. Cela améliore la robustesse et la maintenabilité du code.
Création du fichier StorageService avec l'annotation @Injectable et déclaration de StorageModule avec le StorageService comme fournisseur. Cela prépare le backend à gérer les fonctionnalités de stockage.
Sépare la configuration de la base de données et l'initialisation des clients en deux méthodes distinctes. Cela améliore la lisibilité et facilite la gestion future des configurations et des clients.
Cette modification standardise les indentations afin d'améliorer la lisibilité et la cohérence du code. Aucune fonctionnalité n'a été modifiée, ces changements sont purement esthétiques.
Réajustement de l'ordre des importations dans db.module.ts pour améliorer la lisibilité et le respect des conventions de code. Aucun changement fonctionnel n'a été introduit.
Cette modification introduit la connexion à la base de données PostgreSQL via les clients de migration et standard. Elle inclut également l'importation du module de configuration pour récupérer les paramètres de la base de données et assure le nettoyage des connexions à la destruction du module.
Crée les tables `UsersTable` et `FilesTable` dans le schéma de la base de données, incluant les schémas de sélection et d'insertion pour les utilisateurs. Les tables comportent des colonnes pour gérer les informations de l'utilisateur et des fichiers, ainsi que les métadonnées associées.
Ce commit applique un formatage uniforme au code en utilisant des guillemets doubles. Cela améliore la lisibilité et maintient une style cohérente à travers tous les fichiers. De plus, une configuration Biome a été ajoutée pour automatiser ce processus à l'avenir.
Supprime les fichiers de configuration comme `.eslintignore`, `.prettierignore`, et `.editorconfig`. Ajoute un service backend NestJS et met à jour les dépendances dans `package.json` et `pnpm-lock.yaml`. Crée une nouvelle application E2E pour le backend.