Skip to content
~/caio.barilli
ENPT
← All projects
TypeScript

NestAuth

Authentication API in NestJS with JWT, PostgreSQL through TypeORM and transactional e-mail, running in Docker.

Year
2024
Type
Study project
Status
Complete

01 · Problem

Build authentication the way NestJS intends: modules, guards and DTOs.

02 · Solution

A NestJS app with Passport JWT, class-validator DTOs, TypeORM on PostgreSQL, Winston logging and Handlebars e-mail templates. Postgres and Adminer run in Docker.

03 · Stack

  • TypeScript
  • NestJS
  • Passport JWT
  • TypeORM
  • PostgreSQL
  • Docker

04 · Architecture decisions

The decisions that shaped the project.
  1. —

    Nest modules, guards and DTOs

    Authentication follows the framework's structure: Passport JWT guards and DTOs validated with class-validator.

  2. —

    PostgreSQL through TypeORM

    Entities and repositories in TypeORM, with Postgres and Adminer running in Docker.

  3. —

    Transactional e-mail and logs

    The Nest mailer module with Handlebars templates, and Winston for logging.

05 · Screenshots

Official NestJS site, the framework used in this project

06 · Links

Source on GitHub ↗No public demo
Next projectKeeptask →
Home page of the NestJS framework
Official NestJS site, the framework used in this project