Next.jsReactAdmin dashboardSaaSStarter

surge — Next.js Admin dashboard Template

By The-DevOps-Daily

Surge is a Next.js AI-first SaaS starter built with authentication, Stripe payments, an admin dashboard, a blog and documentation engine, and provides convention files, skills, MCP servers, and OpenAPI specifications for AI coding agents.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

1 previews
Author preview
Author-provided previewTop of page

Preview provided in the project README.

One original preview is available. Open the full image to inspect the design.

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-03View source

What stands out

A quick read of the recorded project description.

01

Built-in NextAuth v5 authentication flows, including rate-limited registration, forgot password, reset password, change password, and account deletion

02

Integrated Stripe checkout, customer portal, webhooks, and tier-based feature gating

03

Provides an admin dashboard showing user statistics, MRR, growth charts, user management, blog content inventory, and system health

04

Blog and documentation engine share markdown frontmatter rendering, supporting reading progress, table of contents, share buttons, dynamic OG images, and raw .md routes

05

Provides CLAUDE.md, AGENTS.md, .claude/skills, .claude/agents, examples, MCP servers, OpenAPI specifications, and llms.txt for AI coding agents

06

Dark-mode-first design system using CSS variable tokens and base components such as Button, Input, Modal, ConfirmDialog, and Toast

Template Details

Surge is an open-source Next.js SaaS starter by The DevOps Daily, released under the MIT license. It pre-builds common SaaS modules such as authentication, payments, an admin dashboard, a blog, and documentation, and supplements them for AI coding agents with CLAUDE.md, AGENTS.md, .claude/skills, .claude/agents, examples, MCP servers, OpenAPI specifications, llms.txt, and content routes that accept an appended .md suffix. The goal is to reduce the cost of rediscovering conventions when developers or AI agents extend the project.

Functionally, authentication uses NextAuth v5 with credentials and JWT sessions, including rate-limited registration, forgot password, reset password, change password, and account deletion. Payments use Stripe, covering checkout, customer portal, webhooks, and tier-based feature gating. The admin dashboard displays user statistics, MRR, growth charts, user management, blog content inventory, and system health. The blog and documentation engine share a single markdown frontmatter-based renderer, supporting reading progress, table of contents, share buttons, dynamic OG images, and raw .md routes. The design system is dark-mode-first, using CSS variable tokens and base components such as Button, Input, Modal, ConfirmDialog, and Toast.

On the technical side, the project uses Next.js App Router, TypeScript, Tailwind, and Prisma, with SQLite by default in development and switchable to Postgres in production, and includes Recharts, Vitest, Docker Compose, and GitHub Actions. Specific framework version numbers mentioned in the README are not repeated in this introduction.

Usage limitations: the repository code is MIT-licensed, but third-party assets such as demo images, fonts, and icons require separate license verification. External services such as domain, hosting, database, payments, and email may incur costs. The README's claims about AI agents saving tokens are the project's own statements; this introduction does not treat them as performance promises.

Next.jsAdmin dashboardSaaSStarter kit

Is it right for your project?

Use Cases

  • Quickly building a SaaS product prototype with authentication, subscription payments, and an admin dashboard
  • Wanting a project that includes a blog and documentation engine with markdown content and dynamic OG images
  • Teams using AI coding tools such as Claude Code and Cursor that want built-in convention files, skills, and MCP servers to reduce repeated explanations
  • Needing self-hosted deployment using Docker Compose to package the app, Postgres, Nginx, and Certbot
  • Wanting to start from MIT-licensed code, modify it, and use it commercially

Suitable For

  • Developers or small teams familiar with Next.js, Prisma, and Stripe
  • Projects that need a SaaS starter and are willing to configure external services such as database, payments, and email themselves
  • Teams using AI coding agents to assist development and valuing in-project conventions and tooling
  • Frontend developers who accept a dark-mode-first design system and plan to customize branding on top of it

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    After cloning the repository, run npm install, copy .env.example to .env, and run Prisma migration and seed commands

  2. 2

    DATABASE_URL, NEXTAUTH_SECRET, and NEXTAUTH_URL must be configured; in production behind a proxy, set AUTH_TRUST_HOST=true

  3. 3

    To enable payments, fill in Stripe keys, webhook secret, and each price ID; to enable email, fill in SMTPFAST_API_KEY and the sender email

  4. 4

    For local Stripe webhook debugging, use stripe listen --forward-to localhost:3000/api/stripe/webhook

  5. 5

    Deployment can use Docker Compose, Vercel, or a VPS script, but external services such as database, domain, payments, and email must be prepared separately and may incur costs

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version in the public repository under the MIT license; the free scope is that version's code and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercialize, and distribute this version's code for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the full MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked under their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domain, hosting, database, payments, or AI may charge separately.
  • Enabling email requires registering with smtpfa.st and obtaining an API key (with email:send permission), which is an external service dependency and may incur costs.
  • Enabling payments requires creating a Stripe account and obtaining keys, which is an external service dependency and may incur costs.
  • Deploying with Vercel requires pointing the database to an external hosting service such as Neon, Supabase, or Railway, which may incur costs.
  • On low-memory development machines, running npm run dev or npm run build is not recommended; leave full builds to CI.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

`SMTPFAST_API_KEY` | for email | from https://smtpfa.st/api-keys with `email:send` scope

Original README

`STRIPE_SECRET_KEY` | for payments | from Stripe dashboard

Original README

**Vercel**: connect the repo, set env vars, point `DATABASE_URL` at Neon/Supabase/Railway.

Original README

Don't run `npm run dev` or `npm run build` on a low-RAM dev box — CI handles full builds.

Original README
https://github.com/The-DevOps-Daily/surge/blob/main/LICENSEhttps://github.com/The-DevOps-Daily/surge/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-04. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 76 / 100
Technologies
Next.js · React
Website type
Admin dashboard · SaaS · Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-05-22
Screenshot last checked
2026-10-04

No demo link is recorded. Use the repository instructions to evaluate the project locally; the screenshot alone cannot establish interactive behavior.

The catalog identifies Next.js as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-04

Inspect the recorded source material

SHA-256: 69e969f2474ebbd31596e283d10a45d1b393a4effce0b16e9e1ab88b50b3e701

2026-10-04T07:36:48.812Z

Source file / repository
# Surge

<p align="center">
  <img src="./.github/social-preview.png" alt="Surge — AI-first SaaS starter kit. Ship your SaaS in prompts, not months." width="100%" />
</p>

**An AI-first SaaS starter kit.**

Surge ships with Claude Code skills, auto-trigger subagents, an MCP server, an OpenAPI spec, `.md` content routes, an `llms.txt` index, and a comprehensive `CLAUDE.md` — so when you (or your AI agent) extend it, you spend prompts shipping features instead of rediscovering conventions.

Under the hood it's a production-ready Next.js 16 + Stripe + Prisma + NextAuth + smtpfa.st stack with auth, payments, admin, blog, docs, and a dark-mode-first design system. Clone it, customize it, ship.

[![License: MIT](https://img.shields.io/badge/License-MIT-18181b.svg)](LICENSE)
[![Next.js](https://img.shields.io/badge/Next.js-16-black.svg)](https://nextjs.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-6-blue.svg)](https://www.typescriptlang.org/)
[![Tailwind](https://img.shields.io/badge/Tailwind-4-38bdf8.svg)](https://tailwindcss.com/)

---

## AI-first, what does that mean

Pure starter kits dump 10,000 lines on you and call it done. Three weeks later, when you ask Claude to add a feature, it burns 50k tokens grepping for the auth pattern, the design tokens, and the right primitive. Surge is built so that doesn't happen.

| Feature | What it does for you |
|---|---|
| [`CLAUDE.md`](./CLAUDE.md) | Conventions, primitives, helpers, rules — read automatically by every Claude session |
| [`AGENTS.md`](./AGENTS.md) | Same content, cross-tool format (Cursor, Aider, Continue, Codex) |
| `.claude/skills/` | Five invokable skills: `/customize`, `/add-page`, `/add-api-route`, `/add-stripe-tier`, `/add-email` |
| `.claude/agents/` | Three auto-trigger subagents: route-auditor, migration-reviewer, token-enforcer |
| `examples/` | Six canonical snippets the skills reference — no boilerplate re-derivation |
| `mcp/server.ts` | Local MCP server with read-only tools (`list_users`, `subscription_stats`, etc.) — query your app data in chat |
| `/api/openapi.json` | Auto-generated OpenAPI 3 spec so agents can introspect your API surface |
| `/llms.txt` + `/llms-full.txt` | AI-crawler link tree and full content bundle |
| `/blog/*.md`, `/docs/*.md` | Append `.md` to any URL for raw markdown — no HTML parsing |
| `robots.txt` | Explicit `Allow` for GPTBot, ClaudeBot, PerplexityBot, etc. |
| `docs/prompts/` | Prompt cookbook of proven recipes (add usage-based tier, OAuth, team seats, public API) |

The result: features that used to take a 30k-token back-and-forth become 3k-token one-shots.

---

## Quickstart

```bash
git clone https://github.com/The-DevOps-Daily/surge.git
cd surge
npm install
cp .env.example .env
npx prisma migrate dev --name init
npx prisma db seed
npm run dev
```

Then, in Claude Code (in the same directory):

```
/customize
```

Walks you through making the starter yours — product name, pricing, branding, env vars. Done in a few minutes instead of a few hours.

For a one-shot brand-only pass: `/customize --quick`.

---

## What's in the box

### App surfaces
- **Authentication** — NextAuth v5 credentials, JWT sessions, rate-limited register/forgot/reset, password change, account delete
- **Stripe** — checkout, customer portal, webhook handler, tier-based feature gating, configurable pricing
- **Admin dashboard** — user stats, MRR, growth chart, user management, blog content inventory, system health
- **Blog engine** — markdown frontmatter, reading progress, TOC, share buttons, dynamic OG images, raw `.md` routes
- **Docs engine** — same engine pointed at `content/docs/`, with prev/next navigation
- **Dark-mode-first design system** — CSS-variable tokens, primitive components (Button, Input, Modal, ConfirmDialog, Toast), responsive
- **Email** — smtpfa.st, light-friendly transactional templates with a shared scaffold

### Stack
- Next.js 16 (App Router) · TypeScript · Tailwind 4 · Prisma + SQLite (dev) / Postgres (prod)
- NextAuth v5 · Stripe · smtpfa.st · Recharts · Vitest · Docker Compose · GitHub Actions

### MCP server

Connect the read-only MCP server and ask your AI client about your app state directly:

```bash
claude mcp add saas-starter -- npx tsx mcp/server.ts
```

Then in chat:
- "How many Pro subscribers do we have?"
- "Show me the last 5 signups."
- "What's MRR right now?"
- "Any paid users with expired tier?"

See [docs/mcp](/docs/mcp) for the full tool list.

---

## Environment

Copy `.env.example` to `.env` and fill in:

| Variable | Required | Notes |
|---|---|---|
| `DATABASE_URL` | yes | SQLite `file:./dev.db` for local, Postgres URL for prod |
| `NEXTAUTH_SECRET` | yes | `openssl rand -base64 32` |
| `NEXTAUTH_URL` | yes | `http://localhost:3000` locally |
| `AUTH_TRUST_HOST` | prod | `true` behind a proxy |
| `REGISTRATION_ENABLED` | optional | `true` (default) or `false` |
| `STRIPE_SECRET_KEY` | for payments | from Stripe dashboard |
| `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | for payments | from Stripe dashboard |
| `STRIPE_WEBHOOK_SECRET` | for payments | from Stripe dashboard |
| `NEXT_PUBLIC_STRIPE_PRO_PRICE_ID` | for payments | monthly Pro price |
| `NEXT_PUBLIC_STRIPE_PRO_YEARLY_PRICE_ID` | for payments | yearly Pro price |
| `NEXT_PUBLIC_STRIPE_FAMILY_PRICE_ID` | for payments | monthly Team price |
| `NEXT_PUBLIC_STRIPE_FAMILY_YEARLY_PRICE_ID` | for payments | yearly Team price |
| `SMTPFAST_API_KEY` | for email | from https://smtpfa.st/api-keys with `email:send` scope |
| `SMTPFAST_API_URL` | optional | defaults to `https://smtpfa.st`, override for staging/self-hosted |
| `SMTPFAST_FROM_EMAIL` | for email | `Your App <[email protected]>` |

---

## Project layout

```
.claude/                # skills, agents, settings
  skills/<name>/SKILL.md
  agents/<name>.md
  settings.json
examples/               # canonical snippets the skills reference
mcp/                    # read-only MCP server (stdio)
content/
  blog/                 # markdown blog posts
  docs/                 # markdown docs
docs/prompts/           # prompt cookbook
src/
  app/                  # Next.js App Router
    (admin)/            # admin pages (role-gated)
    (app)/              # authed app pages
    (marketing)/        # public marketing pages
    api/                # route handlers (auto-introspected by openapi.json)
    llms-full.txt/      # dynamic AI ingest bundle
  components/
    admin/              # admin chrome
    blog/, docs/        # content rendering
    layout/             # app shell, sidebar, mobile nav
    marketing/          # marketing chrome
    ui/                 # design system primitives
  lib/                  # auth, prisma, stripe, email, rate-limit, etc.
prisma/                 # schema, migrations, seed
public/                 # static assets, manifest, llms.txt, robots.txt
CLAUDE.md               # conventions for Claude — primes every session
AGENTS.md               # cross-tool agent summary
```

---

## Deployment

**Docker Compose** (recommended for self-hosting):

```bash
docker compose up -d                                # dev (builds locally)
docker compose -f docker-compose.prod.yml up -d     # prod (uses pre-built image)
```

Bundles the app, Postgres, Nginx, and Certbot for SSL.

**Vercel**: connect the repo, set env vars, point `DATABASE_URL` at Neon/Supabase/Railway.

**VPS**: `scripts/setup-server.sh` provisions Ubuntu 22.04+ with Docker. GitHub Actions deploy on push to main when `DEPLOY_HOST`, `DEPLOY_USER`, `DEPLOY_SSH_KEY` secrets are configured.

---

## Stripe webhook (local)

```bash
stripe listen --forward-to localhost:3000/api/stripe/webhook
```

---

## Tests

```bash
npm test          # vitest run
npx tsc --noEmit  # type-check
```

Don't run `npm run dev` or `npm run build` on a low-RAM dev box — CI handles full builds.

---

## License

MIT. See [LICENSE](LICENSE).

Copyright 2026 [The DevOps Daily](https://github.com/The-DevOps-Daily).
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.