100% Open Source & Free

Open Source SaaS Template —
Ship Your Next SaaS in Hours.

The Open Source SaaS Template for Next.js — ship your next SaaS in hours. MokerSaaS ships enterprise-ready authentication, Stripe billing, multi-language i18n, SEO, an admin dashboard, and built-in referral and affiliate systems, so you can cut your time from idea to revenue.

Core Tech Stack:
Next.js 16
Neon
Stripe
referral-rewards · route.ts
import { db } from '@/lib/db';
import { referrals, users } from '@/lib/schema';
import { grantReferralReward } from '@/lib/referral';

// Next.js 16 App Router · Referral reward grant
export async function POST(req: Request) {
  // 1. Query Neon Serverless Postgres for referral relation
  const relation = await db.select().from(referrals)
    .where(eq(referrals.code, 'MOKER8X'));

  // 2. Auto-grant credits + extend subscription days
  const reward = await grantReferralReward({
    referralId: relation[0].id,
    refereeId: relation[0].referredId,
    plan: 'pro',
  });

  // 3. Insert into Drizzle ORM history + trigger webhook
  await db.insert(referralHistory).values({
    userId: relation[0].referrerId,
    action: 'subscription_reward',
    pointsAwarded: reward.points,
    subscriptionDaysExtended: reward.days,
  });

  return Response.json({ ok: true, reward });
}
Full-Stack Tech · Modern SaaS Infrastructure

Full-Stack Open Source Tech Architecture Stack.

Production-grade modern dev frameworks, zero-config out of the box, so you can focus on your core business logic.

Next.js 16 App Router

Stack: React 19 + TS

Built on the latest Next.js App Router, with server-side rendering (SSR) and edge rendering optimizations for ultra-fast first paint.

Neon + Drizzle

Status: Type-safe ORM

High-performance Neon Serverless Postgres with the lightweight Drizzle ORM for fully type-safe database interactions.

NEXT_JS_16
NEON_POSTGRES
STRIPE_BILLING
Framework Live Test Status

> [04:22:11] Next.js 16 App Router route loaded... OK

> [04:22:15] Neon Postgres Serverless pool init succeeded (12ms)

> [04:22:19] Stripe SDK & Webhook received event: checkout.session.completed

Stripe Subscription Integration

Integration: Webhook + Portal

Built-in Stripe Checkout, monthly/annual subscriptions, webhook endpoints and a self-service customer billing portal.

100% Open & Free

Deploy: Vercel / Docker

No cloud vendor lock-in. One-click deploy to Vercel, Cloud Run or any Node.js / Docker compatible server.

Dev Efficiency Boost
10X+
Core Components
40+ Ready-to-use
DB Compatible
Full Neon Postgres
Open Source License
MIT License
All-in-One Open Source SaaS Solution

Out-of-the-box core business modules.

Admin console, user workspace, Stripe multi-tier subscriptions and affiliate rewards—all ready, no reinventing the wheel.

Module 1 / 4

Admin Console
Total Control of Your SaaS.

A powerful admin system with user management, role-based access, analytics and points adjustment—so you can run the whole platform with confidence.

  • User management with granular roles (Admin / Member)
  • Track active users, MRR revenue and subscription conversion
  • Manual/auto points adjustment with full audit logs
Avg. Dev Time Saved
200+ Hours
Ship your core business
Referral Commission
30% Rate
Auto-settled & withdrawable

Super Admin Panel (Admin Console)

Site-wide users, roles, points activity and financial analytics

SUPER_ADMIN
Admin Console Preview
Dashboard + user management + role permissions
100% Transparent Commercial License

Flexible plans for indie developers and growing teams.

Open-source version is free forever. Upgrade to a commercial license or deep customization support to get your SaaS shipped and monetized faster.

Trial
$4.99 / 7-day trial

7-day trial to experience full features

  • Duration: 7 days
  • Credits: 1,000 included
  • Complete SaaS template + advanced features
  • Complete user authentication system
Recommended
Annual
$159 / year

Annual subscription, best value option

  • Duration: 365 days
  • 15,000 credits included
  • Complete SaaS template + advanced features
  • Stripe payment integration
  • 1-year technical support
  • Best value - Save 34%
Professional
$15.9 / month

Ideal for startups and SMEs, includes advanced features

  • Duration: 30 days
  • Credits: 1,000 included
  • Complete SaaS template + advanced features
  • Stripe payment integration
  • 1-year technical support
Real Developer Reviews

Trusted by developers & creators.

Verified

Zhang Ming

Indie Developer · Founder @ AI Writing Assistant

MokerSaaS saved me tons of repetitive setup work on Next.js App Router and Stripe subscriptions. I shipped in 3 days and received my first overseas subscription payment!

Verified

Alex Chen

CTO @ CloudScale Engineering

The out-of-the-box PostgreSQL and Drizzle ORM schema config is super elegant. Clean codebase, second development is a breeze.

Verified

Wang Xiaolei

Full-Stack Engineer @ Global SaaS Geek

The cleanest Next.js open source template I've seen. No bloated third-party dependencies, focuses on auth, database and Stripe subscriptions—highly recommended!

FAQ

Technical & Deployment FAQ.

Answers to common questions indie developers and startups have about using the template, choosing the architecture, and shipping to production.

The template is built on full-stack Next.js 16 (App Router), NextAuth.js authentication, Resend email service, Neon Serverless Postgres (Drizzle ORM), and the Stripe subscription SDK.