New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

create-solostack

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-solostack

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

latest
npmnpm
Version
1.3.7
Version published
Maintainers
1
Created
Source

🚀 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

FeatureDescription
🚀 Quick SetupGet a full SaaS up and running in minutes, not weeks
🔐 AuthenticationNextAuth.js with email/password and OAuth (Google, GitHub)
💳 PaymentsStripe integration for subscriptions and one-time payments
📧 EmailsResend for transactional emails with React Email templates
🗄️ DatabasePrisma + PostgreSQL with pre-built models
🎨 UI Componentsshadcn/ui components with Tailwind CSS
📱 ResponsiveMobile-first design out of the box
🔒 Type-SafeFull 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

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

Resend Setup

  • Create a Resend account at resend.com
  • Get your API key
  • Verify your sending domain
  • Add API key to .env

Database Setup

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

OAuth Providers (Optional)

For Google OAuth:

For GitHub OAuth:

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

🛠️ Tech Stack

CategoryTechnology
FrameworkNext.js 15 (App Router)
LanguageTypeScript
StylingTailwind CSS
UI Componentsshadcn/ui + Radix UI
DatabasePostgreSQL + Prisma
AuthenticationNextAuth.js 5
PaymentsStripe
EmailResend + React Email
Form HandlingReact 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

Keywords

saas

FAQs

Package last updated on 08 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts