Nestjs Typeorm Auth Template

screenshot of Nestjs Typeorm Auth Template
nestjs

nestjs template. SQL, typescript, e2e tests, auth, swagger, jwt (access-token and refresh-token)

Overview

The Nest framework TypeScript starter repository is an excellent foundation for building robust applications with a focus on scalability and ease of development. This particular starter template comes pre-configured with powerful features to help developers set up authentication and manage database interactions seamlessly. Whether you're embarking on a new project or seeking to enhance an existing one, this repository offers the flexibility and functionality to get you up and running quickly.

With built-in JWT authentication and a straightforward project configuration process, developers can easily customize settings to fit their specific needs. The extensive use of environment variables ensures that sensitive information remains secure while facilitating smooth application deployment. Additionally, the incorporation of Swagger for documentation enriches the development experience by providing intuitive API interactions.

Features

  • Easy Installation: Clone the repository and install dependencies with simple commands, ensuring a quick setup process.

  • Configurable Environment: Copy the .env.example file to .env and customize key parameters such as JWT secrets and database port to match your configuration.

  • Postgres Integration: Easily configure database settings in the .env file, allowing you to connect to your Postgres database with minimal hassle.

  • Migration Support: Built-in capabilities for creating and running database migrations ensure that your schema evolves smoothly.

  • Robust Security: The use of JWT tokens and refresh tokens provides secure authentication, with customizable expiration settings that can be adjusted per your requirements.

  • Public Endpoints: Simplify access control by using decorators, such as @Public, to designate which routes are accessible without authentication.

  • Token Management: The template expertly handles access and refresh token management, with clear processes for refreshing expired tokens without disrupting user experience.

  • Swagger Documentation: Automatically generated API documentation through Swagger facilitates testing and exploring endpoints, making it easier for new developers to understand and interact with the API.

nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.