Starter Nest

screenshot of Starter Nest

A nest starter

Overview

This is an introduction to a NestJS starter template that is currently being optimized. It provides various features such as Swagger API documentation, email sending functionality (SMTP), unified parameter validation, unified exception handling, unified response structure, unified parameter serialization, database functionality with support for multiple configurations, database pagination/querying functionality, static file uploading and downloading, Redis or memory caching, logging to console or file, unified configuration and environment variables, base classes for modules/controllers/services template generation, and several pre-built modules including user, login, role, permission, upload, and article modules. The template can be deployed using Gitea and Gitea Actions or Github Actions.

Features

  • Swagger API Documentation: Generate interactive API documentation for easier API testing and usage.
  • Email Sending Functionality (SMTP): Send emails using the SMTP protocol.
  • Unified Parameter Validation: Validate parameters using a centralized approach.
  • Unified Exception Handling: Handle exceptions in a unified manner.
  • Unified Response Structure: Ensure a consistent structure for API responses.
  • Unified Parameter Serialization: Serialize parameters in a standardized way.
  • Database Functionality: Supported multiple database configurations for easy switching. Includes features like pagination, querying, and fetching all records.
  • Static File Upload: Upload files to the server.
  • Static File Download: Download files from the server.
  • Redis or Memory Caching: Implement caching using Redis or memory.
  • Logging: Output logs to console or file.
  • Unified Configuration and Environment Variables: Manage configuration and environment variables in a centralized manner with type safety and default values.
  • Module/Controller/Service Base Classes Template Generation: Generate pre-built template code for modules, controllers, and services.
  • Pre-built Modules: Includes modules for user, login, role, permission, upload, and article management.
  • Deployment: Supports deployment using Gitea and Gitea Actions, or Github Actions.

Summary

The NestJS starter template is a feature-rich framework that provides various functionalities for building robust applications. It includes features such as API documentation, email sending, parameter validation, exception handling, response structure standardization, parameter serialization, database functionality, file uploading/downloading, caching, logging, and centralized configuration management. It also offers pre-built modules for user management, login, role, permission, upload, and article management. The template can be deployed using either Gitea and Gitea Actions or Github Actions.