Simple Auth Backend

screenshot of Simple Auth Backend

This is a comprehensive starter kit built using the NestJS framework and TypeScript featuring JWT authentication, 2FA support, enhanced security, database integration, and many more.

Overview

The Simple NestJS Starter Kit is a robust solution aimed at developers looking to build efficient and secure server-side applications. Leveraging the power of the NestJS framework alongside TypeScript, this starter kit includes a plethora of advanced features designed to simplify the development process while ensuring adherence to best practices. It is particularly beneficial for teams focusing on scalable applications, as it incorporates essential tools like JWT authentication, two-factor authentication (2FA) support, and Docker integration.

This starter kit not only accelerates the development phase but also enhances the security and robustness of your applications. With built-in features for database integration and structured logging, it sets a solid foundation that minimizes common security risks, such as SQL injection, while allowing for easy configuration management across various environments.

Features

  • NestJS Framework: Built on the NestJS framework with Express, ensuring a modern architecture for Node.js applications.
  • TypeScript Support: Written in TypeScript, it promotes better code quality and developer tooling, making the codebase more maintainable.
  • PostgreSQL Integration: Seamlessly integrates PostgreSQL via TypeORM for efficient object-relational mapping, enhancing database security and performance.
  • Dockerized Development: Offers a complete Docker-based environment that includes local PostgreSQL and MailHog for email testing, simplifying setup and deployment.
  • JWT Authentication: Implements a JWT-based authentication system, ensuring secure user logins and access control.
  • Two-Factor Authentication: Incorporates 2FA via email for an additional layer of security on user accounts.
  • Logging with Pino: Utilizes Pino Logger for efficient logging, with configurable verbosity and unique request tagging to aid in debugging.
  • Environment Variable Management: Follows the 12 Factor App principles for configuration management, utilizing .env files and Joi for runtime validation to maintain data integrity and flexibility.
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.