@debanjo/create-nestjs-multidb
v1.0.0
Published
Create a new NestJS multi-database API project
Maintainers
Readme
create-nestjs-multidb
Scaffold a production-ready NestJS multi-database API project with a single command.
Usage
npx create-nestjs-multidb my-projectOr install globally:
npm install -g create-nestjs-multidb
create-nestjs-multidb my-projectOptions
| Option | Description |
|--------|-------------|
| --pm <manager> | Package manager: npm, yarn, or pnpm |
| --no-install | Skip automatic dependency installation |
| --no-git | Skip git initialization |
Examples
# Interactive mode - prompts for all options
npx create-nestjs-multidb
# Specify project name
npx create-nestjs-multidb my-api
# Use pnpm and skip git init
npx create-nestjs-multidb my-api --pm pnpm --no-gitWhat's Included
The generated project includes:
- Multi-app architecture - Gateway, Service, Worker, and Admin apps
- Database support - MongoDB with Mongoose
- Authentication - JWT and local strategies with Passport
- Job processing - Background jobs with Bull/Redis
- File uploads - Media handling service
- Validation - Request validation with class-validator
- Docker ready - docker-compose configuration included
Quick Start
After creating your project:
cd my-project
cp _env/.env.example _env/.env
docker-compose up -d
npm run devProject Structure
my-project/
├── apps/
│ ├── admin/ # Admin dashboard API
│ ├── gateway/ # API gateway
│ ├── service/ # Main business logic
│ └── worker/ # Background job processor
├── libs/
│ ├── core/ # Shared utilities, guards, filters
│ └── banking/ # Banking/wallet module
├── config/ # Configuration files
└── _env/ # Environment filesLicense
MIT
