JSPM

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

CLI tool to instantly bootstrap full-featured SaaS applications with customizable modules

Package Exports

  • saas-factory
  • saas-factory/src/cli.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 (saas-factory) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🏭 SaaS Factory

Bootstrap Your SaaS in Minutes, Not Months

npm version license downloads


SaaS Factory is a powerful CLI tool that generates production-ready SaaS applications with authentication, payments, multi-tenancy, teams, and more. Stop writing boilerplate — start building your product.

✨ Features

  • 🎨 Frontend Options: Next.js 14 with App Router and Tailwind CSS
  • ⚙️ Backend Options: Node.js (Express) or Python (FastAPI)
  • 🔐 Authentication: Login, Register, OAuth, JWT tokens
  • 💳 Payments: Stripe subscriptions, billing portal, webhooks
  • 🏢 Multi-tenancy: Workspaces with isolated data
  • 🛡️ RBAC: Role-based access control system
  • 👥 Teams: Invite system, member management
  • 📊 Dashboard: Pre-built UI components

🚀 Quick Start

# Create a new SaaS project
npx saas-factory init

# Or install globally
npm install -g saas-factory
saas-factory init

📸 Screenshots

CLI Interface

  ╔═══════════════════════════════════════════════════════════╗
  ║                                                           ║
  ║   ███████╗ █████╗  █████╗ ███████╗                       ║
  ║   ██╔════╝██╔══██╗██╔══██╗██╔════╝                       ║
  ║   ███████╗███████║███████║███████╗                       ║
  ║   ╚════██║██╔══██║██╔══██║╚════██║                       ║
  ║   ███████║██║  ██║██║  ██║███████║                       ║
  ║   ╚══════╝╚═╝  ╚═╝╚═╝  ╚═╝╚══════╝                       ║
  ║                                                           ║
  ║         Bootstrap Your SaaS in Minutes, Not Months        ║
  ║                                                           ║
  ╚═══════════════════════════════════════════════════════════╝

? 🎨 Choose your frontend framework: Next.js (React with App Router)
? ⚙️  Choose your backend framework: Node.js (Express)
? 📦 Select additional modules to include:
  ◉ 🔐 Authentication (Login, Register, OAuth)
  ◉ 💳 Payments (Stripe integration)
  ◉ 🏢 Workspaces (Multi-tenant support)
  ◉ 🛡️  Permissions (RBAC system)
  ◉ 👥 Teams (Invite & collaboration)
  ◉ 📊 Dashboard UI Pack
? 📁 Enter your project name: my-saas-app

📖 Usage

Initialize a New Project

npx saas-factory init

The CLI will guide you through:

  1. Frontend Selection: Choose Next.js or API-only
  2. Backend Selection: Node.js (Express) or Python (FastAPI)
  3. Module Selection: Pick the features you need
  4. Project Name: Name your project

List Available Templates

npx saas-factory list

Generated Project Structure

my-saas-app/
├── frontend/                 # Next.js application
│   ├── app/                  # App router pages
│   │   ├── auth/            # Login, Register pages
│   │   ├── dashboard/       # Dashboard pages
│   │   └── ...
│   ├── components/          # React components
│   └── lib/                 # Utilities
├── backend/                  # Express/FastAPI server
│   ├── routes/              # API routes
│   ├── middleware/          # Auth, RBAC middleware
│   └── utils/               # Helpers
├── shared/                   # Shared modules
│   ├── auth/                # Auth utilities
│   ├── payments/            # Stripe integration
│   ├── workspaces/          # Multi-tenant logic
│   ├── permissions/         # RBAC system
│   ├── teams/               # Team management
│   └── utils/               # Common utilities
├── .env.example             # Environment template
├── package.json             # Root package.json
└── README.md                # Project documentation

🛠️ Modules

🔐 Authentication

  • Email/Password login and registration
  • OAuth support (Google, GitHub)
  • JWT access & refresh tokens
  • Password reset flow
  • Session management

💳 Payments (Stripe)

  • Subscription management
  • Checkout sessions
  • Customer portal
  • Webhook handlers
  • Invoice history

🏢 Workspaces

  • Multi-tenant architecture
  • Workspace switching
  • Isolated data per workspace
  • Workspace settings

🛡️ Permissions (RBAC)

  • Role-based access control
  • Custom roles
  • Permission middleware
  • Wildcard permissions

👥 Teams

  • Email invitations
  • Member management
  • Role assignment
  • Leave workspace

📊 Dashboard UI

  • Statistics cards
  • Data tables
  • Navigation layout
  • Modal dialogs
  • Form components

⚙️ Configuration

After generating your project:

  1. Copy environment variables:

    cp .env.example .env
  2. Configure your database:

    DATABASE_URL=postgresql://user:password@localhost:5432/mydb
  3. Set up Stripe (if using payments):

    STRIPE_SECRET_KEY=sk_test_...
    STRIPE_WEBHOOK_SECRET=whsec_...
  4. Configure OAuth (optional):

    GOOGLE_CLIENT_ID=...
    GOOGLE_CLIENT_SECRET=...
  5. Install dependencies:

    npm run install:all
  6. Start development:

    npm run dev

🔧 Commands

Command Description
npm run dev Start all development servers
npm run dev:frontend Start frontend only
npm run dev:backend Start backend only
npm run build Build for production
npm run lint Run linters
npm run install:all Install all dependencies

📚 Tech Stack

Frontend

  • Next.js 14 - React framework with App Router
  • Tailwind CSS - Utility-first CSS
  • React Hook Form - Form handling
  • Zod - Schema validation
  • Lucide Icons - Icon library

Backend (Node.js)

  • Express - Web framework
  • Prisma - Database ORM
  • JWT - Authentication tokens
  • Stripe - Payment processing
  • Zod - Validation

Backend (FastAPI)

  • FastAPI - Python web framework
  • SQLAlchemy - Database ORM
  • Pydantic - Data validation
  • JWT - Authentication
  • Stripe - Payment processing

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

MIT License - see the LICENSE file for details.

🙏 Acknowledgments


Made with ❤️ by the SaaS Factory team

GitHubnpmDiscord