Package Exports
- create-enterprise-nestjs
- create-enterprise-nestjs/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (create-enterprise-nestjs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
create-enterprise-nestjs
Enterprise-grade NestJS boilerplate generator with three-layer architecture.
Installation
npm install -g create-enterprise-nestjsUsage
npx create-enterprise-nestjs my-appOr with project name:
npx create-enterprise-nestjs my-appGenerated Project Setup
After generating your project, you have two options:
Option 1: Using Docker (Recommended)
cd my-app
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your database configuration
# Start Docker services
npm run docker:up
# Setup database
npm run db:create
npm run db:migrate
# Enable DatabaseModule in src/app.module.ts
# Uncomment: DatabaseModule, // Uncomment after setting up database configuration
# Start development server
npm run start:devOption 2: Local Database Installation
If you prefer to install MySQL/PostgreSQL locally:
cd my-app
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env
# Edit .env with your local database configuration
# Update DB_HOST to 'localhost' or your database host
# Install and configure your database locally
# Then create the database manually or use:
npm run db:create
npm run db:migrate
# Enable DatabaseModule in src/app.module.ts
# Uncomment: DatabaseModule, // Uncomment after setting up database configuration
# Start development server
npm run start:devNote: Docker commands will gracefully fail if Docker is not available, allowing you to use local database installations instead.
Features
- Three-layer architecture (Controller → Service → Repository)
- JWT authentication with role-based access control
- Sequelize ORM with MySQL/PostgreSQL support
- Swagger/OpenAPI documentation
- Winston logging with file rotation
- Docker Compose setup
- TypeScript strict mode
- Enterprise-grade error handling
Generated Structure
my-app/
├── src/
│ ├── common/ # Shared utilities
│ ├── config/ # Configuration
│ ├── database/ # Sequelize setup
│ └── modules/ # Feature modules
├── docker-compose.yml
└── package.jsonLicense
MIT