Nestjs Starter Template

screenshot of Nestjs Starter Template

Nestjs Starter Template

Scaffold quickly your next TypeScript API with this opinionated starter template for NestJS. Includes GraphQL support, TypeORM, Jest, Passport-JWT authentication, Swagger Api and more.

Overview

The NestJS Starter Template is a scaffold template starter repository for the NestJS framework. It provides a pre-configured setup for building web applications using NestJS, TypeScript, TypeORM, GraphQL, and other technologies. The template also includes features such as automatic migrations generation, validation, serialization, security measures, CORS support, authentication with JWT and Passport, health checks, linting with ESLint and Prettier, testing with Jest, documentation generation with Compodoc and OpenAPI, and more.

Features

  • TypeScript: The template is written in TypeScript, providing static typing and improved code quality.
  • TypeORM: It supports MySQL, Postgres, SQLite, and more, and includes automatic migrations generation.
  • GraphQL: The template integrates with GraphQL, using Apollo and TypeGraphQL, with several related packages.
  • Validation: It includes class-validator for data validation and class-transformer for serialization.
  • Security: The template includes helmet for security headers, bcrypt for password hashing, and CORS support.
  • Authentication: It supports authentication with JWT and Passport, with related packages for NestJS integration.
  • Health Check: It includes packages for health checks, ensuring the application is running correctly.
  • 12-Factor based config: The template provides a configuration service and environment file setup.
  • Linting: It includes ESLint with TypeScript parser and plugin for consistent code formatting and linting rules.
  • Formatter: The template uses Prettier as a code formatter for maintaining consistent code styles.
  • Testing: It includes Jest for unit testing and related packages for test setup and assertions.
  • Documentation: The template supports generating documentation with Compodoc and OpenAPI, with related packages.

Installation

To install the NestJS Starter Template:

  1. Create a new repository from this template on GitHub or clone it to your local machine.
  2. If you choose to clone it manually, make sure to update the necessary information properly, such as package.json's name field.

Summary

The NestJS Starter Template is a comprehensive scaffold template for building web applications using the NestJS framework. It provides a pre-configured setup with support for TypeScript, TypeORM, GraphQL, validation, security measures, authentication, health checks, linting, formatting, testing, and documentation generation. This template can be a great starting point for developing NestJS applications, as it includes many essential features and integrates popular technologies and packages for building robust and scalable web applications.