npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

saas-factory-create-app

v0.1.0

Published

Interactive CLI for creating SaaS Factory projects

Readme

@saas-factory/create-app

Interactive CLI tool for scaffolding new SaaS Factory projects. Choose your design system, authentication setup, database, and templates to get a fully configured Next.js application in seconds.

Features

Interactive Prompts (guided project setup) ✅ 6 Design Systems (choose your aesthetic) ✅ Auth Options (sessions + OAuth) ✅ Database Selection (Prisma, MongoDB, Supabase) ✅ Pre-built Templates (dashboard, marketing, full-stack) ✅ Git Integration (automatic repo initialization) ✅ Type-Safe (TypeScript pre-configured) ✅ Environment Setup (.env.local generation) ✅ Dependency Installation (automatic pnpm/npm) ✅ Example Components (ready to modify)

Installation

npm create saas-factory@latest my-app
# or
npx @saas-factory/create-app@latest my-app

Usage

npm create saas-factory@latest

Interactive Setup Flow

Welcome to SaaS Factory! 🚀

? What is your project name?
  > my-awesome-app

? Choose your design system:
  ❯ Modern Minimal
  Dark Professional
  Colorful Playful
  Enterprise Formal
  Mobile-First
  Retro/Neomorphic

? Include authentication?
  ❯ Yes
  No

? Authentication methods:
  ❯ Session-based (default)
  ✓ OAuth (Google, GitHub)
  Toggle: Press SPACE to toggle

? Choose your database:
  ❯ Prisma + PostgreSQL
  MongoDB + Mongoose
  Supabase
  Skip for now

? Choose template:
  ❯ SaaS Dashboard (recommended)
  Marketing Site + App
  Minimal App (just auth + theme)

? Initialize git repository?
  ❯ Yes
  No

? Install dependencies now?
  ❯ Yes (pnpm)
  Yes (npm)
  No, I'll do it later

✓ Project created! 🎉

Command-Line Options

# Specify project name
npm create saas-factory@latest my-app

# Skip interactive prompts
npm create saas-factory@latest my-app --template minimal-dark --no-auth

# Use TypeScript (default)
npm create saas-factory@latest my-app --typescript

# Use JavaScript
npm create saas-factory@latest my-app --javascript

# Include all packages
npm create saas-factory@latest my-app --all

# Verbose output
npm create saas-factory@latest my-app --verbose

# Dry run (don't create files)
npm create saas-factory@latest my-app --dry-run

# Override existing directory
npm create saas-factory@latest my-app --force

Generated Project Structure

my-app/
├── app/
│   ├── api/
│   │   └── auth/
│   │       └── [...auth]/route.ts
│   ├── (dashboard)/
│   │   ├── page.tsx
│   │   └── layout.tsx
│   ├── layout.tsx
│   └── page.tsx
│
├── components/
│   ├── auth/
│   │   ├── SignInForm.tsx
│   │   └── SignUpForm.tsx
│   ├── dashboard/
│   │   ├── Navbar.tsx
│   │   ├── Sidebar.tsx
│   │   └── Stats.tsx
│   └── ui/
│       └── Button.tsx
│
├── lib/
│   ├── auth.ts
│   ├── db.ts
│   └── utils.ts
│
├── prisma/
│   └── schema.prisma (if Prisma selected)
│
├── public/
│   └── assets/
│
├── styles/
│   ├── globals.css
│   └── variables.css
│
├── .env.local
├── .env.example
├── .gitignore
├── next.config.js
├── package.json
├── tailwind.config.ts
├── tsconfig.json
└── README.md

Included Packages

All created projects include:

  • @saas-factory/auth (authentication)
  • Selected UI system (design system)
  • @saas-factory/animations (optional, can be excluded)
  • TailwindCSS (styling)
  • TypeScript (type safety)
  • Next.js 14 (framework)

Environment Variables

Automatically generates .env.local with:

# Database
DATABASE_URL=your-database-url

# Authentication
AUTH_SECRET=random-generated-secret
SESSION_SECRET=random-generated-secret

# OAuth (if selected)
GOOGLE_CLIENT_ID=your-client-id
GOOGLE_CLIENT_SECRET=your-client-secret
GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret

# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
NODE_ENV=development

Next Steps After Creation

  1. Update .env.local with your credentials (OAuth, database, etc.)
  2. Review generated code in app/ and components/
  3. Run migrations (if Prisma): npx prisma migrate dev
  4. Start development server: npm run dev
  5. Customize components to match your needs
  6. Deploy to Vercel, Netlify, or your platform

Customization After Creation

All packages are fully customizable:

# Update UI system
npm install @saas-factory/ui-dark

# Add another design system for reference
npm install @saas-factory/ui-playful

# Update auth package
npm install @saas-factory/auth@latest

Pre-built Templates

1. SaaS Dashboard (Recommended)

Complete admin dashboard with:

  • User authentication
  • Dashboard overview
  • User management
  • Settings pages
  • Navigation (navbar + sidebar)
  • Responsive design

2. Marketing Site + App

Combination template with:

  • Landing page
  • Pricing page
  • Features showcase
  • Sign up flow
  • Authenticated app dashboard
  • Email integration ready

3. Minimal App

Bare-bones setup with:

  • Auth flows only
  • Selected design system
  • Basic layout
  • Ready to build on

Database Options

Prisma + PostgreSQL

# Schema already configured
npx prisma migrate dev --name init

MongoDB

# Use included Mongoose connection
# Update MONGODB_URI in .env.local
npm run dev

Supabase

# Uses Supabase Auth + Database
# Configure SUPABASE_URL and SUPABASE_ANON_KEY
npm run dev

Development Commands

# Start dev server
npm run dev

# Build for production
npm run build

# Run production server
npm start

# Run linting
npm run lint

# Run tests
npm test

# Format code
npm run format

Troubleshooting

Installation fails?

  • Ensure Node.js 18+ is installed
  • Try npm create saas-factory@latest --force
  • Clear npm cache: npm cache clean --force

Dependencies not installing?

  • Use pnpm (faster, recommended)
  • Check your internet connection
  • Try deleting node_modules and reinstalling

Authentication not working?

  • Verify OAuth credentials are correct
  • Check .env.local is configured
  • Review auth setup in app/api/auth/[...auth]/route.ts

Database connection issues?

  • Verify DATABASE_URL is correct
  • Check database server is running
  • Run npx prisma db push for Prisma

Examples

See the examples folder for more detailed project examples.

Contributing

Found a bug or want a feature? See CONTRIBUTING.md.

License

MIT