Nestjs Antd Boilerplate

screenshot of Nestjs Antd Boilerplate

A boilerplate to quickly build robust webapps with powerful combination of nestjs and ant design procomponents.

Overview:

The NestJS, Antd Boilerplate is a starter project that combines the power of NestJS and Ant Design Pro Components. It allows developers to build robust APIs using TypeScript. The boilerplate includes essential backend features such as role-based authentication, data validation, database migrations, and seeding. On the frontend, it provides authentication management, synchronization of state across multiple tabs, and quick CRUD functionality for data tables and forms.

Features:

  • Role-based Authentication: Supports Admin and User roles with decorators to specify access roles for specific endpoints.
  • Database Migration & Seeding: Shared configuration between TypeORM CLI and NestJS, with convenient scripts for database operations.
  • DTOs & Validation: Separation of database entities and response using Data Transfer Objects (DTOs) and validation using class-validator library.
  • PaginatedRequest and PaginatedResponse: Compatible with Ant Design Pro components for paginated data display.
  • VSCode settings: Enforces relative imports for better organization.
  • Custom Configuration Files: Allows customization of configuration.
  • Authreactive-auth-store: Manages authentication state and tokens in the frontend.
  • Axios Client Interceptors: Automatically attaches access tokens and refreshes them before expiration.
  • Quick CRUD: Complete data table functionality with pagination, filtering, and bulk actions.
  • Easily add forms: With features such as dependent fields, data validation, and maps.

Summary:

The NestJS, Antd Boilerplate provides a powerful foundation for building robust APIs using TypeScript. With its features such as role-based authentication, database migration, and quick CRUD functionality, it accelerates the development process. On the frontend, it offers authentication management, state synchronization, and easy integration with Ant Design Pro components. The installation guide simplifies the setup process for both the backend and admin frontend.