This commit corrects the order of the imports in the schema file by importing 'zod' correctly. It also removes the extra unnecessary white spaces in between the lines for a cleaner code.
This commit includes upgrading of multiple packages in `pnpm-lock.yaml` and adding new dependencies including `@anatine/zod-nestjs`, `@anatine/zod-openapi`, `class-transformer`, `class-validator`, `openapi3-ts`, and `pure-rand`. The `nestjs` related packages have been updated and certain validation packages were added to their version.
The ZodFilter and ZodPipe classes located under src/pipes have been completely removed. This includes deletion of all features, methods, and imports associated with these classes.
This commit reimplements the hashing, verification, and token signing methods in the CredentialsService. It also adjusts the constructor's parameters, reorders imports, and introduces additional logging for debugging purposes. Finally, it corrects minor formatting and style issues in the credentials.service.ts and credentials.module.ts files.
This commit introduces a new feature for user signup. It creates `auth.controller.ts`, `auth.dto.ts`, and `auth.schema.ts` for handling user registration requests with validation. Moreover, it enhances `auth.service.ts` to handle the database interaction part and also modifies `auth.module.ts` by adding `AuthController`. Now, the application can handle user registration successfully with proper error handling.
This commit reorganizes the insert and select schema declarations for improved readability. The declarations for 'UsersTable', 'ProductsTable', 'StocksTable', and 'CommentsTable' have been moved closer to their respective table schemas.
In the credentials.service.ts file, jose is imported for jwt token operations. Two new methods are added. One method for jwt token verification and another for token signing. Token metadata such as IssuedAt, ExpirationTime, Issuer, Audience, and Subject are configured.
A new "style" configuration has been added to the `biome.json` file. Specifically, the "useImportType" key has been set to "off". This update sets a new rule for JSON style patterns within the project.
This commit introduces two new files: zod.pipe.filter.ts and zod.pipe.ts. The `ZodFilter` catches ZodErrors and defines the HTTP response json format. The `ZodPipe` validates incoming data against a predefined schema.
Introduce the Credentials service which is responsible for hashing and verifying passwords. Added appropriate methods within the service and provided it in a new Credentials module. The module exports the service to allow its use in other parts of the application.
This commit relocates the schema definitions by deleting the existing `drizzle/schema.ts` and creating a new `schema.ts` file. It also enhances these definitions by adding `createInsertSchema` and `createSelectSchema` for each table.
This commit includes drizzle-zod version 0.5.1 to the project's dependencies. It updates the package.json and pnpm-lock.yaml files, ensuring a stable integration of the latest drizzle-zod library.
The main.ts file has been reformatted according to the coding standards. This change includes correcting several indentation issues and ensuring that all imports are properly grouped. There is no impact on functionality.
This commit implements additional operations in AuthService such as user registration, login, fetching, updating, and deletion. It also adds two new dependencies: DrizzleService and CredentialsService. Moreover, AuthService now implements OnModuleInit for executing methods once the module has been initialized. Corresponding changes are reflected in the module structure.
A new authentication service and module were added to the application. The app.module.ts file was updated to include this newly created AuthModule. Also, an initial structure for the AuthService was set up.
A new authentication service and module were added to the application. The app.module.ts file was updated to include this newly created AuthModule. Also, an initial structure for the AuthService was set up.
Implement Drizzle service and integration in the project. A new Drizzle module was added to the nest app. The Drizzle service also includes configuration for postgres database and management of migration client. An adjustment was also made to tsconfig.json to enable ES module interoperation.
A new file logger.service.ts is created which implements the LoggerService from @nestjs/common. This service utilizes the Winston logging library and includes logging functions for different levels of messages such as log, error, warn, debug, and verbose. A logger object with timestamp and simple format is configured to output the logs to both console and a file named "application.log".
This commit adds several new tables to the schema for the drizzle ORM, including tables for users, products, stock, comments, and purchase history. Each table contains defined fields with appropriate data types and constraints. This forms the basis for storage and retrieval of relevant data within the application.
A new .env file has been added with important elements for the application's configuration such as postgres database details, app port, encryption keys and other related data. This essential configuration is crucial for the proper operation of the application in different environments.
Update the .gitignore file to also ignore all .env files. This ensures that sensitive environment-specific variables are not exposed or accidentally committed to the repository, contributing to enhanced security.
This commit introduces a new Drizzle configuration file, 'drizzle.config.ts'. It establishes the schema path, output directory, dialect, and database credentials (such as host, user, password, and database) using environment variables.
A new app.module.ts file was added with ThrottlerModule and ConfigModule imported from NestJS. The throttler is configured with a rate limit and the configuration module is set as global. The LogService was provided and exported for other parts of the application to use.
This commit introduces 'src/main.ts' which starts up the NestJS application. It uses Fastify as the underlying HTTP server and leverages the helmet middleware for security. The CORS is also enabled for the application that will listen on the specified APP_PORT or default to port 3333.
This commit updates the .idea/backend-main.iml to exclude the `.idea/dataSources` folder, improving file organization and preventing unnecessary tracking.
New configuration files have been added for TypeScript, Biome, Nest CLI, Docker-compose, and environment variables. This setup includes TypeScript compiler options, biome schema settings, database container configuration and more. Additionally, a .gitignore file is added to exclude unnecessary files from the git repository.
This commit introduces package.json for setting up the new project titled "should-stick-back". The package.json file includes all necessary scripts, dependencies, devDependencies, and jest configuration for the project. This is a foundational step for establishing the codebase.
This commit includes a new `pnpm-lock.yaml` file that contains a list of the project's dependencies with their corresponding versions. This ensures that each installation receives an identical set of packages, preventing version inconsistencies across different development environments.
This commit includes settings for the Database Navigator and Git Toolbox Blame with changes to the IDE's XML files. Also, modifications are made to project's code styles tasking the formatter to maintain a consistent development environment.
The README.md file has been significantly expanded and formatted. It now includes a more detailed description of the project, installation and running instructions, testing procedures, and additional project support and contact information. Nest framework usage orientation has been enhanced.