Nestjs Graphql Boilerplate

screenshot of Nestjs Graphql Boilerplate

Nestjs Graphql Boilerplate

Nestjs + GraphQL + MongoDB + Passportjs Boilerplate

Overview

The NestJS + GraphQL + MongoDB + PassportJS Boilerplate is a starter kit for NestJS projects that combines GraphQL and MongoDB. It also includes authentication and authorization features using Passport.js. This boilerplate provides a solid foundation for building applications with these technologies.

Features

  • GraphQL integration with NestJS server
  • MongoDB integration for data persistence
  • Apollo integration for handling GraphQL queries and mutations
  • JWT role-based authentication using Passport.js
  • User management functionality
  • E2E testing capabilities
  • Docker Compose support for easy setup and deployment

Installation

To install the NestJS + GraphQL + MongoDB + PassportJS Boilerplate, follow these steps:

  1. Make sure you have Node.js and NPM installed.
  2. Install MongoDB if you don't have it already.
  3. (Optional) Install Docker if you want to use Docker Compose.
  4. Clone the repository.
  5. Navigate to the project directory.
  6. Run npm install to install the project dependencies.
  7. Configure the application using environment variables (refer to the documentation for a list of available variables).
  8. Start the application by running npm run start:dev or npm run start:prod for production mode.
  9. Access the GraphQL playground at http://localhost:3000/graphql.

Summary

The NestJS + GraphQL + MongoDB + PassportJS Boilerplate is a comprehensive starter kit for building applications with NestJS, GraphQL, and MongoDB. It provides a set of essential features such as authentication, user management, and E2E testing. The integration with Passport.js allows for role-based authorization, and Docker Compose support makes deployment hassle-free. With this boilerplate, developers can quickly get started with building scalable and secure applications using these technologies.