Package Exports
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 (launchbase) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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: