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

create-solostack

v1.3.7

Published

The complete SaaS boilerplate for indie hackers - Next.js 15 with auth, payments, database, and email

Readme

🚀 SoloStack

The complete SaaS boilerplate for indie hackers

Version License Node

Generate a production-ready Next.js 15 SaaS application with authentication, payments, database, and email - all pre-configured and working out of the box.

Built with ❤️ by Danish Akhtar

DocumentationReport BugRequest Feature


✨ Features

| Feature | Description | |---------|-------------| | 🚀 Quick Setup | Get a full SaaS up and running in minutes, not weeks | | 🔐 Authentication | NextAuth.js with email/password and OAuth (Google, GitHub) | | 💳 Payments | Stripe integration for subscriptions and one-time payments | | 📧 Emails | Resend for transactional emails with React Email templates | | 🗄️ Database | Prisma + PostgreSQL with pre-built models | | 🎨 UI Components | shadcn/ui components with Tailwind CSS | | 📱 Responsive | Mobile-first design out of the box | | 🔒 Type-Safe | Full TypeScript support |

Workflows & Architecture

System Architecture

graph TD
    User[User / Browser] -->|HTTPS| CDN[CDN / Edge]
    CDN -->|Request| App[Next.js 15 App]
    
    subgraph "Application Layer"
        App -->|Auth| Auth[NextAuth.js]
        App -->|API| Routes[API Routes]
        App -->|Pages| UI[shadcn/ui Components]
    end
    
    subgraph "Data Layer"
        Routes -->|Query| Prisma[Prisma ORM]
        Prisma -->|SQL| DB[(PostgreSQL)]
    end
    
    subgraph "External Services"
        Auth -->|OAuth| Providers[Google / GitHub]
        Routes -->|Payments| Stripe[Stripe API]
        Routes -->|Emails| Resend[Resend API]
        Stripe -->|Webhooks| Routes
    end

Authentication & Payment Flow

sequenceDiagram
    participant U as User
    participant A as App
    participant S as Stripe
    participant D as Database
    participant E as Resend
    
    U->>A: Sign Up
    A->>S: Create Customer
    S-->>A: Customer ID
    A->>D: Create User (with Stripe ID)
    A->>E: Send Verification Email
    E-->>U: Email Delivered
    
    U->>A: Upgrade to Pro
    A->>S: Create Checkout Session
    S-->>U: Redirect to Checkout
    U->>S: Complete Payment
    S->>A: Webhook (checkout.completed)
    A->>D: Update Subscription Status
    A-->>U: Access Granted

🚀 Installation

Get started in seconds with one command:

npx create-solostack my-saas-app

Alternative package managers:

# pnpm
pnpm create solostack my-saas-app

# yarn
yarn create solostack my-saas-app

📖 Usage

Run the CLI and follow the interactive prompts:

npx create-solostack my-app

The CLI will guide you through:

  • 📝 Project name
  • 🔐 Authentication provider (NextAuth.js)
  • 🗄️ Database (PostgreSQL + Prisma)
  • 💳 Payment provider (Stripe)
  • 📧 Email provider (Resend)
  • 🎨 Include shadcn/ui components? (Y/n)
  • 🔧 Initialize git repository? (Y/n)

What's Included

File Structure

my-saas-app/
├── prisma/
│   ├── schema.prisma          # Database schema
│   └── seed.ts                # Seed script
├── src/
│   ├── app/
│   │   ├── (auth)/
│   │   │   ├── login/         # Login page
│   │   │   └── signup/        # Signup page
│   │   ├── api/
│   │   │   ├── auth/          # NextAuth routes
│   │   │   ├── stripe/        # Stripe routes
│   │   │   └── webhooks/      # Webhook handlers
│   │   ├── dashboard/         # Protected dashboard
│   │   │   ├── billing/       # Subscription management
│   │   │   └── settings/      # User settings
│   │   ├── globals.css
│   │   ├── layout.tsx
│   │   └── page.tsx
│   ├── components/            # React components
│   └── lib/
│       ├── auth.ts            # NextAuth configuration
│       ├── db.ts              # Prisma client
│       ├── stripe.ts          # Stripe client
│       └── email/             # Email templates
├── .env.example
├── middleware.ts              # Route protection
├── next.config.js
├── package.json
├── tailwind.config.ts
└── tsconfig.json

Database Models

  • User - User accounts with authentication
  • Account - OAuth accounts
  • Session - User sessions
  • Subscription - Stripe subscriptions
  • Payment - Payment history
  • VerificationToken - Email verification

API Routes

  • /api/auth/[...nextauth] - NextAuth.js routes
  • /api/auth/signup - User registration
  • /api/stripe/checkout - Create checkout session
  • /api/stripe/portal - Customer portal
  • /api/webhooks/stripe - Stripe webhooks
  • /api/user/update - Update user profile

Pages

  • / - Landing page
  • /login - Login page
  • /signup - Signup page
  • /dashboard - User dashboard (protected)
  • /dashboard/billing - Subscription management (protected)
  • /dashboard/settings - User settings (protected)

Getting Started (Generated Project)

After generating your project:

1. Install Dependencies

cd my-saas-app
npm install

2. Set Up Environment Variables

cp .env.example .env

Add your environment variables:

DATABASE_URL="postgresql://..."
NEXTAUTH_SECRET="..." # Generate with: openssl rand -base64 32
NEXTAUTH_URL="http://localhost:3000"
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_test_..."
RESEND_API_KEY="re_..."

3. Set Up Database

npm run db:push
npm run db:seed

4. Run Development Server

npm run dev

Open http://localhost:3000

Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run start - Start production server
  • npm run lint - Run ESLint
  • npm run db:push - Push schema to database
  • npm run db:seed - Seed database
  • npm run db:studio - Open Prisma Studio

Configuration

Stripe Setup

  1. Create a Stripe account at stripe.com
  2. Get your API keys from the Dashboard
  3. Set up products and prices
  4. Configure webhook endpoint: https://yourdomain.com/api/webhooks/stripe
  5. Add webhook secret to .env

Resend Setup

  1. Create a Resend account at resend.com
  2. Get your API key
  3. Verify your sending domain
  4. Add API key to .env

Database Setup

  1. Create a PostgreSQL database
  2. Add connection string to .env
  3. Run npm run db:push to create tables
  4. Run npm run db:seed to add sample data

OAuth Providers (Optional)

For Google OAuth:

  1. Go to Google Cloud Console
  2. Create OAuth 2.0 credentials
  3. Add to .env

For GitHub OAuth:

  1. Go to GitHub Settings > Developer settings > OAuth Apps
  2. Create a new OAuth App
  3. Add to .env

🛠️ Tech Stack

| Category | Technology | |----------|-----------| | Framework | Next.js 15 (App Router) | | Language | TypeScript | | Styling | Tailwind CSS | | UI Components | shadcn/ui + Radix UI | | Database | PostgreSQL + Prisma | | Authentication | NextAuth.js 5 | | Payments | Stripe | | Email | Resend + React Email | | Form Handling | React Hook Form + Zod |

Requirements

  • Node.js 18 or higher
  • PostgreSQL database (local or hosted)

📚 Support & Resources

License

MIT © Danish Akhtar

🗺️ Roadmap

✅ Free Version

  • ✅ Next.js 15 + TypeScript
  • ✅ Authentication (NextAuth.js)
  • ✅ Database (Prisma + PostgreSQL)
  • ✅ Payments (Stripe)
  • ✅ Emails (Resend)
  • ✅ UI Components (shadcn/ui)

💎 Pro Version ($99)

  • 🔜 Multi-tenancy support
  • 🔜 Team/workspace management
  • 🔜 Advanced admin dashboard
  • 🔜 Analytics integration
  • 🔜 Email campaigns
  • 🔜 Advanced security features
  • 🔜 SEO optimization
  • 🔜 PWA support

Built with ❤️ for indie hackers and solo founders

Made by Danish AkhtarGitHub • Version 1.3.3