-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comprehensive Configuration, Documentation, and Code Structure Enhancements for NestJS Starter Kit #81
Open
devalexanderdaza
wants to merge
9
commits into
piyush-kacha:main
Choose a base branch
from
devalexanderdaza:develop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feat: new environment vars - Implemented new environment vars on .env.example feat: add number and validation options utilities: - Added number.util and validation-options.util files to the utils directory. - The number.util file exports utility functions related to numbers. - The validation-options.util file exports validation options utility for use with NestJS validation pipes. feat: implements swagger/cli plugin: - NestJS swagger plugin implemented fix: inject ConfigService into LoggerModule: - delete app.config.ts file, and implements forRootAsync configuration for logger module. refactor: Refactor on config folder: - Separate all configurations of the app, into independents files into config folder, using the best practices offer for NestJS Docs.
feat: environment vars validation: - Implemented env vars validation using class-validator feat: database module using class and auto populate feature - Created a database module for mongoose - Implemented auto-populate option feat: create log module for logger - implemented log module to sepparate the logger configuration refactor: base code refactor - base code refactor creating the core module
- Refactored `app.module.ts` to improve module imports and providers organization - Added `CoreModule` to centralize core functionalities - Moved exception filters to `core/filters` for better modularity - Introduced `TimeoutInterceptor` in `core/interceptors` to handle request timeouts - Added `JwtUserAuthGuard` to `AuthModule` for enhanced security - Updated providers to include new filters and interceptors: - `AllExceptionsFilter` for global exception handling - `ValidationExceptionFilter` for validation errors - `BadRequestExceptionFilter` for bad request errors - `UnauthorizedExceptionFilter` for unauthorized access - `ForbiddenExceptionFilter` for forbidden access - `NotFoundExceptionFilter` for handling 404 errors - `GatewayTimeOutExceptionFilter` for handling gateway timeouts - Improved validation pipe configuration to use `exceptionFactory` for custom error handling This commit enhances the overall structure and error handling mechanisms of the application, making it more modular and maintainable.
- Updated the example.env file: - Added a REQUEST_TIMEOUT variable with a default value of 30 seconds, to specify the request timeout in milliseconds. - Refactored the app.module.ts file: - Removed unused imports and commented code. - Injected the ConfigService dependency to use the 'infra.requestTimeout' configuration value. - Passed the timeoutInMilliseconds value to the TimeoutInterceptor class. - Updated the infra.config.ts file: - Added a REQUEST_TIMEOUT variable with a default value of 30 seconds, to specify the request timeout in milliseconds. - Created the modules.module.ts file: - Added the ModulesModule. - Imported the AuthModule, UserModule, and WorkspaceModule.
feat(shared): add API error response decorator module chore(core): enhance application structure and add error handling chore(babel): update SWC dependencies and compiler options
* Use workspaces with slug to manage unique workspace per user * If workspace exist, not create new
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes across multiple files to improve configuration, documentation, and dependencies in the NestJS starter kit. The most important changes include updating the
README.md
for better clarity, restructuring theexample.env
file, and adding new dependencies inpackage.json
.Base project src struct to modular pattern
Documentation and Configuration Updates:
README.md
: Improved instructions for setting up the project, generating RSA key pairs, and running the application. Updated project structure and configuration details. [1] [2] [3].vscode/settings.json
: Added configuration to ignore certain files in the file tree.example.env
: Restructured and added detailed comments for environment variables.Dependency and Build System Updates:
package.json
: Added new dependenciesmongoose-autopopulate
,@swc/cli
, and@swc/core
. Addedengines
field to specify the required Node.js version. [1] [2] [3]nest-cli.json
: Updated compiler options to use SWC for faster builds and added plugins for Swagger integration.Codebase Cleanup:
src/app.config.ts
: Removed the file as part of the cleanup.src/app.controller.spec.ts
: Removed the file as part of the cleanup.src/app.controller.ts
: Removed the file as part of the cleanup.This pull request includes significant updates to thenestjs-starter-kit
project, focusing on configuration, documentation, and code structure improvements. The most important changes include updates to theREADME.md
, restructuring of theexample.env
file, and enhancements to thenest-cli.json
andpackage.json
files.Documentation and Configuration Updates:
README.md: Improved instructions for setting up the project, including more detailed steps for generating RSA key pairs and running the application. Also, the project structure section has been updated for better clarity. [1] [2] [3]
example.env: Restructured the environment variables for better organization and clarity, grouping them into sections like application, API, infra, database, authentication, and Swagger configuration.
Codebase Enhancements:
nest-cli.json: Added SWC (Speedy Web Compiler) as the builder and enabled type checking. Also, included the NestJS Swagger plugin for better API documentation.
package.json: Added new dependencies like
mongoose-autopopulate
,@swc/cli
, and@swc/core
. Also, specified the minimum Node.js version required. [1] [2] [3]Code Cleanup:
src/app.config.ts
,src/app.controller.spec.ts
, andsrc/app.controller.ts
files, as they were no longer needed in the updated project structure. [1] [2] [3]Development Environment: