JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 20
  • Score
    100M100P100Q55527F
  • License MIT

Generate production-ready NestJS backends with authentication, multi-tenancy, billing, and deployment in minutes

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.

    npm version License: MIT

    โœจ 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 dev

    That's it! Your backend is now running at:

    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

    # Generate secrets
    ./scripts/generate-secrets.sh
    
    # Setup SSL
    ./scripts/setup-ssl.sh your-domain.com
    
    # Deploy
    ./scripts/deploy.sh

    Manual Deployment

    1. Build the application: npm run build
    2. Run migrations: npx prisma migrate deploy
    3. 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

    Join Waitlist โ†’

    ๏ฟฝ๏ฟฝ Acknowledgments

    Built with amazing open-source projects: