A Complete AI-Powered NestJS Boilerplate with Hexagonal Architecture
Built with enterprise-grade architecture patterns and automated code generation
π NestForge - Complete Platform Walkthrough
Experience the full power of NestForge from setup to code generation to AI-assisted development
NestForge-Walkthrough.mp4
π§ Practical Demo β From Setup to Final Result
Watch a demonstration on how to use NestForge to quickly generate outcomes.
NestForgeDemo.1.mp4
NestForge is more than a boilerplate β it's a complete AI-powered development platform that takes you from database schema to production-ready API in minutes.
Unlike traditional boilerplates, NestForge doesnβt just give you a starting point β it uses AI-assistance generators to create production-ready CRUD modules for your custom projects and then guides you in extending them with business logic while keeping your code fully aligned with architectural standards.
- β‘ Zero-Config Setup β Spin up a full API instantly
- ποΈ Hexagonal Architecture β Clean, maintainable, testable
- π¦ Enterprise Features β JWT, Biometric login, Social Auth, File Management, Mailing System, i18n, GitHub Actions
- π― Hygen Code Generation β Create modules from JSON/SQL in seconds
- π€ AI that codes with you β automates setup, validates code, and helps you add business logic that stays perfectly aligned with your architecture.
- π§ͺ Full Testing Suite β Unit, E2E, and Load tests ready-to-run
AI + automation handle the busywork, letting you focus on real business logic.
Clean separation of business logic from infrastructure concerns with consistent module structure and absolute path imports for cleaner project organization.
TypeORM with PostgreSQL integration, comprehensive seeding system, read replica support for improved performance, and example database views for better query abstraction and reporting.
Redis-powered caching system with cluster support, automatic TLS configuration, and comprehensive cache management for improved application performance and scalability.
Generate entire modules from JSON schemas or SQL with batch and interactive generators. Includes template automation, resource generation, versioning, property management, and raw query handling.
Comprehensive .cursorrules configuration that trains Cursor AI to understand hexagonal architecture patterns, Hygen generator commands, JSON schema validation, and architecture enforcement for domain-aware development assistance.
Complete project initialization from clone to running server with automated configuration and environment setup.
- JWT authentication, social login (Apple, Google, Facebook, Twitter),
BiometricFeature with challenge-based authentication and server-side validation using cryptographic signing.
Multi-driver support (Local, S3, S3-Presigned URLs) with automatic optimization and secure upload validation.
Multi-language support with dynamic translations and localized error messages using nestjs-i18n.
Comprehensive email system with nodemailer integration for transactional emails and notifications.
Swagger API documentation with automatic generation and comprehensive endpoint coverage.
Unit tests (Jest), E2E tests (Dockerized), and load testing (Artillery) with automated seeding and performance benchmarking.
Docker support, containerization, and development environment management with comprehensive Docker Compose configurations.
Robust scheduler module with flag-based control for managing cron jobs across different environments. Perfect for background tasks, cleanup operations, and periodic maintenance.
Request deduplication system with flag-based control to prevent duplicate processing. Ensures safe handling of retries and duplicate requests using UUID-based idempotency keys.
CI/CD workflows with GitHub Actions, database management, and Sentry monitoring integration for production deployments.
NestForge isn't just a boilerplateβit's a complete development platform that empowers you to build custom features with minimal effort. Here's how our features work together to accelerate your development:
Step 1: Database Design β Step 2: Code Generation β Step 3: AI-Assisted Development
- Create Migration File - Define your database schema using TypeORM migrations
- π€ NestForge Schema Architect - This custom GPTs will help you generate complete database schemas from your requirements in 3 simple steps (Requirements β Overview β SQL)
- Generate JSON Schema - Convert your SQL schema to Hygen-compatible JSON using our AI-powered prompts
- π€ NestForge SQL to JSON - This custom GPTs will help you generate NestForge-compatible JSON files from your PostgreSQL SQL schemas for seamless code generation
- Run Hygen Commands - Generate complete modules with tests, DTOs, services, controllers, and repositories
- AI-Enhanced Development - Use Cursor AI with our comprehensive
.cursorrulestraining material
NestForge includes extensive .cursorrules configuration that trains Cursor AI to understand:
- Hexagonal Architecture Patterns - AI knows the exact module structure and boundaries
- Hygen Generator Commands - AI can run the correct generators automatically
- JSON Schema Validation - AI validates and generates proper entity schemas
- Architecture Enforcement - AI ensures services don't import persistence entities
- Type Safety - AI enforces strict TypeScript patterns throughout
Result: Cursor becomes your domain-aware development assistant, not just a generic code generator.
- Complete Modules - Full CRUD operations with validation, error handling, and tests
- Consistent Architecture - Every generated module follows hexagonal patterns
- Type Safety - Full TypeScript support with explicit types (no
any) - Testing Suite - Unit tests, E2E tests, and load tests automatically generated
- Documentation - Swagger endpoints and comprehensive API documentation
- Production Ready - Docker support, CI/CD workflows, and monitoring integration
- Migration: Create
productandcategorytables - JSON Schema: Generate entity definitions with relationships
- Single Script: Run
npm run setup. - Result: Complete product management system with:
- Product & Category entities with relationships
- Full CRUD APIs with validation
- Unit tests
- Swagger documentation
- Type-safe DTOs and services.
- Swagger Documentation:
<http://localhost:3000/docs> - Credentials for user:
- Email:
admin@example.com - Password:
secret
- Email:
Time to Production: From database design to working API in minutes, not hours.
Get NestForge running in minutes with our automated setup script. Clone the repository and run npm run setup for complete initialization from database setup to running server.
π Installation Guide - Manual setup and troubleshooting
NestForge includes a powerful automated setup script that handles everything from environment configuration to database initialization and server startup. Perfect for quick project initialization and consistent development environments.
π Setup Script Guide - Complete automated setup documentation
NestForge implements Hexagonal Architecture (Ports & Adapters) with clean separation between business logic and infrastructure concerns. Each module follows a consistent structure ensuring maintainability and testability.
π Complete Architecture Guide - Deep dive into hexagonal patterns, module structure, and architectural principles
NestForge provides powerful code generation capabilities through Hygen generators. Create entire modules from JSON schemas, SQL statements, or interactive prompts with support for entities, relationships, and enums.
π Complete Hygen Documentation - All generators, JSON schemas, and usage examples π SQL to JSON Conversion - Convert SQL schemas to NestJS modules
Comprehensive testing suite with unit tests (Jest), E2E tests (Dockerized), and load testing (Artillery). All tests include automated seeding and detailed reporting for complete application validation.
π Complete Testing Guide - Unit, E2E, and Docker testing π Load Testing Guide - Performance benchmarking with Artillery
Complete documentation covering architecture, development workflows, and production deployment. Each feature has dedicated guides with examples and best practices.
π Full Documentation Index - Comprehensive guide with table of contents
- Zero Decision Fatigue: Pre-configured architecture and patterns
- AI-Assisted Development: Smart code generation and Cursor AI integration
- Comprehensive Documentation: Every feature thoroughly documented
- Hot Reload: Instant feedback during development
- Scalable Architecture: Hexagonal patterns for large applications
- Security First: Industry-standard authentication and authorization
- Production Monitoring: Sentry integration and error tracking
- CI/CD Pipeline: Automated testing and deployment
- Consistent Structure: Enforced patterns across all modules
- Type Safety: Full TypeScript support with strict typing
- Clean Code: ESLint, Prettier, and architectural guidelines
- Version Management: Automated dependency updates
We welcome contributions! Please see our Contributing Guidelines for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Ensure all tests pass
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- NestJS Team for the amazing framework
- TypeORM for excellent database integration
- Hygen for powerful code generation
- Cursor AI for AI-powered development assistance
- Cursor Commands for cursor commands
- Community Contributors for feedback and improvements