launchbase
v1.3.1
Published
Generate production-ready NestJS backends with authentication, multi-tenancy, billing, and deployment in minutes
Downloads
2,806
Maintainers
Readme
🚀 LaunchBase CLI
Generate production-ready NestJS backends in minutes, not weeks.
✨ Features
LaunchBase CLI scaffolds a complete, production-ready NestJS backend with:
🔐 Authentication & Security
- JWT access & refresh tokens with rotation
- Email verification & password reset
- Two-factor authentication (TOTP)
- OAuth integration (Google, GitHub, Apple)
- Helmet security headers & CORS
🏢 Multi-Tenancy
- Organization-based data isolation
- Role-based access control (RBAC)
- Team invitations & member management
💳 Billing & Payments
- Stripe integration ready
- Subscription management
- Customer portal
- Webhook handling
🗄️ Database & ORM
- Prisma ORM with PostgreSQL
- Automatic migrations
- Seed data for development
- Audit logging
🚀 Production Ready
- Docker multi-stage builds
- Docker Compose for local & production
- Nginx reverse proxy with SSL
- GitHub Actions CI/CD pipeline
- Health checks & monitoring
- Prometheus & Grafana dashboards
🎨 Frontend Template
- React + TypeScript + Vite
- Tailwind CSS styling
- Authentication flows
- Dashboard, Organizations, Projects pages
📦 API Client SDK
- TypeScript SDK for frontend integration
- Full type safety
- Token refresh handling
📋 Quick Start
# Create a new project
npx launchbase my-app
# Navigate to project
cd my-app
# One-command setup (installs deps, sets up DB, starts dev server)
npx launchbase devThat's it! Your backend is now running at:
- API: http://localhost:3000
- Docs: http://localhost:3000/docs
- Health: http://localhost:3000/health
Manual Setup (Alternative)
# Setup environment
cp .env.example .env
# Edit .env with your values (secrets are auto-generated)
# Start with Docker
docker compose up -d
# Or run locally
npm install
npx prisma migrate dev
npm run start:dev🛠️ CLI Options
Usage: launchbase [options] [project-name]
Generate a production-ready NestJS backend
Arguments:
project-name Name of the project (default: "my-app")
Options:
-V, --version output the version number
-t, --template include frontend template
-s, --sdk include TypeScript SDK
--no-docker skip Docker files
--no-cicd skip CI/CD workflow
-h, --help display help for command
Examples:
$ launchbase my-saas
$ launchbase my-saas --template --sdk
$ launchbase my-saas --no-docker📁 Project Structure
my-app/
├── src/
│ ├── modules/
│ │ ├── app/ # App configuration
│ │ ├── auth/ # Authentication
│ │ ├── users/ # User management
│ │ ├── orgs/ # Organizations
│ │ ├── projects/ # Projects
│ │ ├── billing/ # Stripe billing
│ │ ├── files/ # File uploads
│ │ └── health/ # Health checks
│ ├── common/
│ │ ├── decorators/ # Custom decorators
│ │ ├── filters/ # Exception filters
│ │ ├── guards/ # Auth guards
│ │ └── interceptors/ # Logging, etc.
│ └── main.ts
├── prisma/
│ ├── schema.prisma
│ ├── migrations/
│ └── seed.ts
├── test/
│ └── app.e2e-spec.ts # Integration tests
├── frontend/ # React frontend (optional)
├── sdk/ # TypeScript SDK (optional)
├── scripts/
│ ├── deploy.sh # Production deployment
│ ├── backup.sh # Database backup
│ └── restore.sh # Database restore
├── Dockerfile.prod # Multi-stage Docker
├── docker-compose.yml # Local development
├── docker-compose.prod.yml # Production stack
├── nginx.conf # Reverse proxy config
└── .github/workflows/ # CI/CD pipeline🔧 Environment Variables
| Variable | Description | Required |
|----------|-------------|----------|
| DATABASE_URL | PostgreSQL connection string | ✅ |
| JWT_ACCESS_SECRET | JWT access token secret (32+ chars) | ✅ |
| JWT_REFRESH_SECRET | JWT refresh token secret (32+ chars) | ✅ |
| APP_BASE_URL | Your API URL | ✅ |
| FRONTEND_URL | Your frontend URL | ✅ |
| SMTP_HOST | Email server host | For email |
| STRIPE_SECRET_KEY | Stripe API key | For billing |
| GOOGLE_CLIENT_ID | Google OAuth client ID | For OAuth |
| REDIS_URL | Redis connection string | For caching |
🚢 Deployment
Docker (Recommended)
# Generate secrets
./scripts/generate-secrets.sh
# Setup SSL
./scripts/setup-ssl.sh your-domain.com
# Deploy
./scripts/deploy.shManual Deployment
- Build the application:
npm run build - Run migrations:
npx prisma migrate deploy - Start the server:
npm run start:prod
Supported Platforms
- Docker / Docker Compose
- AWS ECS / Fargate
- Google Cloud Run
- Azure Container Apps
- Railway / Render / Fly.io
🧪 Testing
# Unit tests
npm test
# E2E tests
npm run test:e2e
# Test coverage
npm run test:cov📚 API Documentation
Once running, access Swagger documentation at:
http://localhost:3000/docs🤝 Contributing
Contributions are welcome! Please read our Contributing Guide for details.
📄 License
MIT © LaunchBase
� Pricing
Open Source (Free)
- ✅ Full backend generation
- ✅ AI-powered code generation (GLM-5)
- ✅ All features: Auth, DB, Files, Real-time
- ✅ Self-host anywhere (Render free tier)
- ✅ Community support
Cloud Hosting (Coming Soon)
- 🚀 Managed hosting on LaunchBase Cloud
- 🔄 Automatic backups & scaling
- 📊 Built-in monitoring dashboard
- 🛡️ Enterprise security & compliance
- 🎫 Priority support
�� Acknowledgments
Built with amazing open-source projects:
