$ show vndevteam/nestjs-boilerplate
This is a NestJS boilerplate for building RESTful APIs with TypeScript, PostgreSQL, TypeORM, and modern DevOps practices. The system provides a modular backend architecture with authentication (JWT), user management, post management, email verification via BullMQ queues, health checks, Swagger API documentation, and comprehensive testing setup. It follows NestJS best practices with clear separation of concerns across modules for auth, users, posts, health, and background jobs. Key features include cursor-based and offset-based pagination, internationalization (i18n), Redis caching, security headers via Helmet, and environment-based configuration management. The codebase demonstrates strong engineering practices with reusable utilities for password handling, configuration validation, and sophisticated cursor pagination that could be extracted to other projects with minimal modification.
The LLM identified 3 files worth highlighting for reuse:
A sophisticated cursor-based pagination implementation that handles encoding/decoding for multiple data types (dates, numbers, strings, objects), supports bidirectional pagination (before/after cursors), and properly manages edge cases. The component is isolated, depends only on TypeORM interfaces, and demonstrates non-obvious skill in abstracting complex pagination logic into a reusable utility that could be dropped into any TypeORM-based project with minimal modification.
A clean, isolated utility for password hashing and verification using argon2. It properly handles promises, provides meaningful error messages, and abstracts the argon2 usage behind simple hashPassword and verifyPassword functions. With zero framework dependencies, this component exemplifies security best practices and could be extracted to any Node.js/TypeScript project requiring secure password handling with minimal changes.
A reusable configuration validation utility that leverages class-validator and class-transformer to validate environment variables with detailed error reporting. The implementation follows a pattern that is framework-agnostic, provides clear error messages for missing or invalid configuration, and demonstrates proper use of validation libraries. This component could be easily extracted to any TypeScript/Node.js project needing robust configuration validation.