Skip to content

Your ultimate NestJS boilerplate repository, featuring multiple preconfigured projects for various use cases, powered by NestJS v10

License

Notifications You must be signed in to change notification settings

CodeAshing/nestjs-boilerplates

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NestJS Boilerplates

1500x500

Welcome to the Nest Boilerplates project! This repository aims to provide a collection of boilerplates for Nest based projects, catering to various use cases and scenarios. Whether you are starting a new project or need a starting point for refactoring an existing app, these boilerplates will help you get started quickly with enterprise-level, scalable applications.

Table of Contents

  1. Introduction
  2. Getting Started
  3. Contribution Guidelines
  4. Project Boilerplates

Introduction

The Nest Boilerplates project is an open-source initiative to provide pre-configured boilerplates for developers building applications on the Nest framework. We understand the time-consuming process of starting a project from scratch and setting up all the necessary components. This project aims to improve your development experience by offering boilerplates for various scenarios.

Each folder in this repository represents a different boilerplate project that focuses on a particular usage or integration, such as Mongoose, Sequelize, GraphQL, caching, authentication, and more. With detailed explanations and step-by-step guides, you can get started with your preferred boilerplate in just a matter of minutes!

To further simplify the process, we also have plans to release a CLI tool that allows you to create a project based on any of these boilerplates with a simple command.

We welcome you to be a part of this exciting journey to enhance the Nest ecosystem and create a better development experience for everyone.

Getting Started

To get started with the Nest Boilerplates project, firstly, clone this repository to your local development environment:

git clone https://github.com/CodeAshing/nestjs-boilerplates.git

Then, navigate to the cloned repository:

cd nest-boilerplates

Here, you will find the contributing.md file that outlines the contribution guidelines for this project. Please make sure to read and follow these guidelines before submitting any pull requests.

Contribution Guidelines

Contributions to the Nest Boilerplates project are highly encouraged and appreciated. To help us maintain a high level of quality, please follow these contribution guidelines:

  1. Fork the repository to your GitHub account.
  2. Make changes and improvements in your forked repository.
  3. Test your changes thoroughly.
  4. Create a well-explained pull request detailing the changes you made and the problems they solve.
  5. Ensure your pull requests comply with the coding standards and styles followed in the project.
  6. Be responsive to feedback and iterate on your contributions, if necessary.

Upon review, your pull request will go through a validation process by the project maintainers. Once approved, your changes will be merged into the main branch, and you will become a contributor to the Nest Boilerplates project. We appreciate your efforts in making this project better and more valuable.

Please follow the contribution guidelines outlined in the Contributing.md file in this repository, to make sure that your contributions align with the project standards.

Project Boilerplates

Listed below are the currently available project boilerplates with their respective explanations and key features. Click on the arrow icon (▼) to expand/collapse each section.

01-mongoose-base
  • Description: Base setup for a Nest application using Mongoose as the ORM and MongoDB as the database.
  • Features: Project structure, basic MongoDB and Mongoose configurations.
02-nuxtjs (Coming Soon)
  • Description: An example boilerplate for integrating Nuxt.js into a Nest application (Coming Soon).
  • Features: Nuxt.js integration and relevant code examples (Coming Soon).
03-sequelize (Coming Soon)
  • Description: Provides a boilerplate for Nest projects using Sequelize, an ORM (Object-Relational Mapping) library for SQL-based databases (Coming Soon).
  • Features: Includes SequelizeModule and relevant code for common database operations (Coming Soon).
04-mongodb-typeorm (Coming Soon)
  • Description: A boilerplate with Nest and MongoDB integration using TypeORM, an ORM with TypeScript support (Coming Soon).
  • Features: TypeORM entities, migrations, repositories, and integration testing setup (Coming Soon).
05-webpack (Coming Soon)
  • Description: Boilerplate showcasing the integration of Nest with Webpack, a popular bundling tool (Coming Soon).
  • Features: Webpack setup and configuration for building frontend assets (Coming Soon).
06-babel-example (Coming Soon)
  • Description: An example boilerplate to demonstrate Nest application setup using Babel, a JavaScript compiler (Coming Soon).
  • Features: Babel configuration, decorators usage, and Transpile-Time Metadata support (Coming Soon).
07-fastify (Coming Soon)
  • Description: A Nest boilerplate with Fastify HTTP server (Coming Soon).
  • Features: Fastify integration with Nest and relevant code examples (Coming Soon).
08-swagger (Coming Soon)
  • Description: Provides a boilerplate with Swagger OpenAPI documentation for your Nest application (Coming Soon).
  • Features: Integration with Swagger, automated API documentation for easy development and testing (Coming Soon).
09-graphql-schema-first (Coming Soon) - **Description**: A Nest boilerplate showcasing how to use GraphQL schema-first approach (Coming Soon). - **Features**: Integration of GraphQL using the Schema-First approach and relevant code generation (Coming Soon).
10-graphql-federation-schema-first (Coming Soon)
  • Description: Demonstration of GraphQL schema-first approach for implementing the GraphQL Federation protocol in Nest (Coming Soon).
  • Features: Federated GraphQL setup and relevant code (Coming Soon).
11-graphql-mercurius (Coming Soon)
  • Description: Project template illustrating how to integrate the Mercurius GraphQL framework into your Nest application (Coming Soon).
  • Features: Mercurius integration, queries, mutations, subscriptions, and examples showcasing similar functionality as the Apollo Server integration (Coming Soon).
12-mvc (Coming Soon)
  • Description: An MVC (Model-View-Controller) structured Nest boilerplate (Coming Soon).
  • Features: Fit with a project structure reflecting an MVC pattern (Coming Soon).
13-gateways-ws (Coming Soon)
  • Description: Boilerplate with WebSocket Gateway implementation using Nest (Coming Soon).
  • Features: WebSocket Gateway, bidirectional communication, and relevant code (Coming Soon).
14-mvc-fastify (Coming Soon)
  • Description: Another MVC-based Nest boilerplate that incorporates Fastify for handling HTTP requests (Coming Soon).
  • Features: Project structure, controller, service, and module implementation, routing example, Fastify integration example (Coming Soon).
15-context (Coming Soon)
  • Description: A Nest boilerplate demonstrating the use cases of custom request context creation (Coming Soon).
  • Features: Custom request scope, injector chaining, and async context usage examples (Coming Soon).
16-auth-jwt (Coming Soon)
  • Description: A boilerplate showcasing JWT (JSON Web Token) authentication implementation in a Nest application (Coming Soon).
  • Features: User registration, token generation, authentication middleware setup, and example usage (Coming Soon).
17-cache (Coming Soon)
  • Description: Provides a boilerplate showcasing how to integrate and use cache mechanisms in Nest projects (Coming Soon).
  • Features: Memory-based caching example using the CacheManager package and built-in decorators (Coming Soon).
18-serializer (Coming Soon)
  • Description: Nest project template demonstrating serialization and serialization tuning techniques (Coming Soon).
  • Features: Serialize entity relationships, transform responses, apply groups for data transformation, including customized JSON output examples (Coming Soon).
19-graphql-prisma (Coming Soon)
  • Description: Boilerplate project demonstrating how to integrate Prisma2 with Nest applications for advanced data manipulation using GraphQL (Coming Soon).
  • Features: Prisma2 setup, GraphQL queries, migrations, batching, nested writes, and more (Coming Soon).
20-graphql-code-first (Coming Soon)
  • Description: An example boilerplate for building Nest applications using a Code-First approach with GraphQL (Coming Soon).
  • Features: TypeGraphQL integration, schema-first resolvers, example queries and mutations, authentication middleware (Coming Soon).
21-serve-static (Coming Soon)
  • Description: Nest boilerplate to serve static HTML files using built-in Express module (Coming Soon).
  • Features: Serve static files configuration, example implementation (Coming Soon).
22-dynamic-modules (Coming Soon)
  • Description: Boilerplate showcasing how to dynamically load modules in Nest applications (Coming Soon).
  • Features: Dynamic module usage example, on-demand module registration, configuration (Coming Soon).
23-queues (Coming Soon)
  • Description: Nest boilerplate with an example of using queues (Redis, Bull, Nest) for processing data asynchronously (Coming Soon).
  • Features: Queue module and worker setup (Coming Soon).
24-scheduling (Coming Soon)
  • Description: Provides a boilerplate for scheduling periodic tasks in a Nest application (Coming Soon).
  • Features: Setup and configuration of scheduled tasks using Nest scheduler (Coming Soon).
25-sse (Coming Soon)
  • Description: Boilerplate providing an example of using Server-Sent Events (SSE) in a Nest application (Coming Soon).
  • Features: SSE gateway implementation, sending real-time events to the client (Coming Soon).
26-file-upload (Coming Soon)
  • Description: A Nest boilerplate showcasing file upload implementation and management using Multer middleware (Coming Soon).
  • Features: File upload and management, example code (Coming Soon).
27-event-emitter (Coming Soon)
  • Description: Provides an event emitter API example within a Nest application (Coming Soon).
  • Features: Broadcasting events using EventGateway (RabbitMQ, Websockets), and relevant code (Coming Soon).
28-graphql-federation-code-first (Coming Soon)
  • Description: Boilerplate demonstrating how to implement a Code-First approach with cases using the GraphQL Federation protocol (Coming Soon).
  • Features: Federated schema composition, example queries and mutations (Coming Soon).

Coming Soon: Nest Boilerplate CLI!!

Note

Future Feature: CLI for creating NestJS projects based on boilerplates.

We are excited to announce that in the near future, we will be introducing a command-line interface (CLI) for the Nest Boilerplates project. This CLI will make it even easier to create NestJS projects based on any of our available boilerplates.

No more hassle or manual setup! With just a simple command, you will be able to create a fully functional NestJS project using your desired boilerplate.

Here's a sneak peek of how it will work:

  1. Install the Nest Boilerplate CLI globally on your machine.
npm install -g nest-boilerplate-cli
  1. Choose your desired boilerplate from our collection. For example, let's say you want to create a project using the "mongoose" boilerplate.

  2. Run the CLI command, specifying the boilerplate you wish to use.

nest-boilerplate-cli create --boilerplate=mongoose
  1. Sit back and relax while the Nest Boilerplate CLI takes care of the heavy lifting, creating your project based on the selected boilerplate.

Once the process is complete, you will have a fully configured NestJS project, ready to be customized

License

This project is licensed under the MIT License.


Thank you for your interest in the Nest Boilerplates project! We appreciate your contribution and hope that these boilerplates help you to quickly get started on your next Nest based project. Feel free to reach out with any suggestions, feedback, or more contributions to improve the project further. Let's make development a better experience together!

About

Your ultimate NestJS boilerplate repository, featuring multiple preconfigured projects for various use cases, powered by NestJS v10

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published