Next.jsReactSaaSStarter

xerv — Next.js SaaS Template

By pablocampelo

Xerv is an MIT-licensed SaaS foundation template built on Next.js, Supabase, Stripe, Resend and Vercel, providing connected implementations of authentication, private data, subscription billing and deployment, along with a replaceable example product domain.

Explore the design

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

2 previews
Desktop homepage1 / 2
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 2

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-13View source

What stands out

A quick read of the recorded project description.

01

Integrates Next.js App Router, strict TypeScript, Supabase Auth (Google and email/password), Postgres, RLS and Stripe subscription billing

02

Billing is handled authoritatively on the server: Stripe Checkout, Customer Portal, signed webhooks, idempotent event handling and paid-through entitlement state

03

Provides a replaceable example product domain demonstrating the end-to-end Auth → ownership → RLS → Pro → CRUD flow

04

Includes product flows such as sign-up, verification, login, recovery, Dashboard, Account, Billing, Help and legal templates

05

CI covers frozen install, lint, type checking, unit tests, production build, Supabase migrations, database security tests, generated types and Playwright E2E

Template Details

Xerv targets technical founders and small teams, providing the infrastructure for subscription SaaS rather than a feature-heavy general-purpose scaffold. The README states its stack as Next.js, Supabase, Stripe, Resend (SMTP) and Vercel, with connected authentication, private data, subscription and deployment paths, plus a replaceable example product domain (Example Resource) that demonstrates the full Auth → ownership → RLS → Pro → CRUD flow.

The template is deliberately narrow in scope: it supports only single-user accounts, Free + Pro tiers, and monthly or annual billing, and does not include teams/seats, usage-based billing, a CMS, an analytics framework or a general-purpose API. Security boundaries are explicit: Supabase Auth, Postgres ownership and RLS work together; billing is handled authoritatively on the server, and Stripe Checkout and the Customer Portal rely on signed webhooks, idempotent event handling and paid-through entitlement state, so a browser return does not directly grant Pro.

Running locally requires Node.js 24, pnpm 11.19.0 and Docker. The README provides steps for cloning, installing, starting Supabase, configuring environment variables, resetting the database and starting the dev server, and notes that local sign-up and password recovery use Mailpit. To test real Checkout and Pro, you need to add Stripe test-mode credentials, monthly/annual Price IDs and run a local Stripe webhook listener.

The README does not state the template's performance, scalability or long-term maintenance commitments in production, nor does it provide deployment target guidance other than Vercel.

Next.jsSaaSStarter

Is it right for your project?

Use Cases

  • Technical founders or small teams need to quickly set up the authentication, private data and billing foundation for a subscription SaaS
  • Those who want to clone or fork an MIT-licensed codebase and replace the example product domain to build their own product
  • Those who need a local development environment to verify Supabase Auth, RLS, Stripe Checkout and webhook flows
  • Those planning to deploy to Vercel and use Supabase, Stripe, Google OAuth and Resend SMTP as managed services

Suitable For

  • Subscription SaaS projects targeting individual user accounts
  • Scenarios requiring Free + Pro tiers and monthly/annual billing
  • Developers using the Next.js, Supabase, Stripe and Vercel stack
  • Projects that want to freely use, modify and distribute under the MIT license

Getting started & customization

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

  1. 1

    Running locally requires Node.js 24, pnpm 11.19.0 and Docker

  2. 2

    After cloning the repository, run pnpm install --frozen-lockfile, pnpm supabase:start and pnpm supabase:status

  3. 3

    Copy .env.example to .env.local, use the local Supabase URL and publishable key, keep NEXT_PUBLIC_SITE_URL=http://localhost:3000, and provide a support email

  4. 4

    Local billing writes must use the local service-role key as SUPABASE_SECRET_KEY and must not be exposed through NEXT_PUBLIC_* variables

  5. 5

    To test real Checkout and Pro, add Stripe test-mode credentials, monthly/annual Price IDs and run a local Stripe webhook listener

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; 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 freely use, modify, commercialize and distribute that version's code.
  • 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 against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments or AI may incur separate charges.
  • Running locally requires Node.js 24, pnpm 11.19.0 and Docker.
  • You need to copy .env.example to .env.local, use the local Supabase URL and publishable key, keep NEXT_PUBLIC_SITE_URL=http://localhost:3000, and provide a support email; local billing writes must use the local service-role key as SUPABASE_SECRET_KEY and must not be exposed through NEXT_PUBLIC_* variables.
  • To test real Checkout and Pro, add Stripe test-mode credentials, monthly/annual Price IDs and run a local Stripe webhook listener.
  • You need to create your own Supabase project, Google OAuth credentials, SMTP sender and Stripe products/prices.
  • Database reset will destroy the local Supabase database; never point it at hosted data; hosted credentials, redirects, SMTP and webhook targets still require environment-level verification.
  • The template supports only a single-user data model, one Pro entitlement, two billing periods and the Vercel deployment target; it does not include teams/seats, additional OAuth providers, usage-based billing, queues, a CMS, analytics, a general-purpose API, an automatic billing repair cron or an admin panel.
  • Cloning uses your own Supabase, Stripe, Google OAuth, Resend SMTP and Vercel configuration; the Supabase Site URL, allowed redirects and hosted confirmation/recovery email templates must point to the exact application canonical origin; committing local templates will not install them in a hosted Supabase project.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

**Prerequisites:** Node.js 24, pnpm 11.19.0 and Docker.

Original README

Copy `.env.example` to `.env.local`. Use the local Supabase URL and publishable key printed by `pnpm supabase:status`, keep `NEXT_PUBLIC_SITE_URL=http://localhost:3000`, and provide a support email. For local billing writes, use the **local service-role key** as `SUPABASE_SECRET_KEY`. Never expose it through a `NEXT_PUBLIC_*` variable.

Original README

To exercise real Checkout and Pro, add Stripe **test-mode** credentials and the supported monthly/annual Price IDs, then run a local Stripe webhook listener. See [Setup](docs/SETUP.md) for the complete provider and deployment path.

Original README

2. **Own the providers.** Create your Supabase project, Google OAuth credentials, SMTP sender and Stripe products/Prices.

Original README

The database reset is **destructive to your local Supabase database**. Never point it at hosted data. CI validates the repository; hosted credentials, redirects, SMTP and webhook destinations still need environment-level verification.

Original README

The starter intentionally supports **one user-owned data model, one Pro entitlement, two billing intervals and Vercel as the deployment target**. It does not include teams/seats, extra OAuth providers, usage billing, queues, CMS, analytics, a generic API, automatic billing-repair cron or an admin panel.

Original README

Your clone uses **its own** Supabase, Stripe, Google OAuth, Resend SMTP and Vercel configuration. Supabase **Site URL**, allowed redirects, and hosted confirmation/recovery email templates must point to the exact canonical app origin. Committing the local templates does **not** install them in a hosted Supabase project. See the [release checklist](docs/RELEASE-CHECKLIST.md) before sharing a live link.

Original README
https://github.com/pablocampelo/xerv/blob/main/LICENSEhttps://github.com/pablocampelo/xerv/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-13. 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 · 85 / 100
Technologies
Next.js · React
Website type
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-10-13
Screenshot last checked
2026-10-13

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

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: codex-user-requested-batch-review-20261015 · 2026-10-15

Inspect the recorded source material

SHA-256: 406d43c626e8c264ef55c52d1093023fe5a33c08b8d529d7d17c53ddee1a91a6

2026-10-13T15:36:06.643Z

Source file / repository
# Xerv

**Build the product. Not the infrastructure.**

An MIT-licensed SaaS foundation built with **Next.js, Supabase, Stripe, Resend (SMTP) and Vercel**. Auth, private data, subscriptions and deployment are connected; replace the example product domain with yours.

**Free to use · Clone it · Fork it · Build your product.**

[Live demo](https://xerv.vercel.app) · [Setup](docs/SETUP.md) · [Architecture](docs/ARCHITECTURE.md) · [Billing](docs/BILLING.md) · [Release checklist](docs/RELEASE-CHECKLIST.md)

[![CI](https://github.com/pablocampelo/xerv/actions/workflows/ci.yml/badge.svg)](https://github.com/pablocampelo/xerv/actions/workflows/ci.yml)

[![Xerv social card](https://xerv.vercel.app/opengraph-image)](https://xerv.vercel.app)

Xerv gives technical founders and small teams a focused subscription foundation instead of another oversized boilerplate. Authentication, private user data, paid access, billing recovery and the deployment path are connected and tested.

Built for **individual user accounts**, **Free + Pro**, and **monthly or annual billing**. The repository deliberately stays narrow: no teams, seats, usage billing, CMS, analytics framework or speculative provider abstraction.

## Why Xerv

- **Security boundaries are explicit.** Supabase Auth, Postgres ownership and RLS are exercised together instead of relying on client-side checks.
- **Billing is server-authoritative.** Stripe Checkout and Customer Portal are backed by signed webhooks, idempotent event handling and paid-through entitlement state. A browser return never grants Pro.
- **The sample domain is replaceable.** The Example Resource proves Auth → ownership → RLS → Pro → CRUD end to end without becoming architecture you have to keep.
- **The supported path is tested.** CI covers frozen install, lint, typecheck, unit tests, production build, Supabase migrations, database security tests, generated types and Playwright E2E.

## What's included

| Foundation | What ships |
| --- | --- |
| **Next.js** | App Router, strict TypeScript, responsive marketing/auth/app surfaces and Vercel deployment |
| **Supabase** | Google + email/password Auth, Postgres, migrations, generated types, ownership constraints and RLS |
| **Stripe** | Free + Pro, monthly/annual Checkout, Customer Portal, signed webhooks and paid-through access |
| **Product flows** | Signup, verification, login, recovery, Dashboard, Account, Billing, Help and legal templates |
| **Reliability** | Idempotent billing processing, concurrency protection, diagnostics and dry-run reconciliation |
| **Confidence** | GitHub Actions, unit tests, database tests and browser E2E |

## Run it locally

**Prerequisites:** Node.js 24, pnpm 11.19.0 and Docker.

```sh
git clone https://github.com/pablocampelo/xerv.git my-saas
cd my-saas
pnpm install --frozen-lockfile
pnpm supabase:start
pnpm supabase:status
```

Copy `.env.example` to `.env.local`. Use the local Supabase URL and publishable key printed by `pnpm supabase:status`, keep `NEXT_PUBLIC_SITE_URL=http://localhost:3000`, and provide a support email. For local billing writes, use the **local service-role key** as `SUPABASE_SECRET_KEY`. Never expose it through a `NEXT_PUBLIC_*` variable.

```sh
pnpm supabase:db:reset
pnpm dev
```

Open **http://localhost:3000**. Local signup and password recovery use Mailpit at **http://127.0.0.1:54324**, so you can exercise email flows without a real inbox.

To exercise real Checkout and Pro, add Stripe **test-mode** credentials and the supported monthly/annual Price IDs, then run a local Stripe webhook listener. See [Setup](docs/SETUP.md) for the complete provider and deployment path.

## Make it yours

1. **Brand it.** Edit `config/product.ts` (including `repositoryUrl`), replace the sample marketing/legal copy and point the canonical site URL at your deployment.
2. **Own the providers.** Create your Supabase project, Google OAuth credentials, SMTP sender and Stripe products/Prices.
3. **Replace Example.** Build your real domain in place of `lib/example/` and the Example routes. Add migrations and regenerate database types while preserving Auth, Billing and RLS trust boundaries.
4. **Deploy.** Apply hosted migrations deliberately, deploy to Vercel, configure the signed Stripe webhook and verify Auth, recovery and paid access on the hosted environment.

## Verify changes

```sh
pnpm lint
pnpm typecheck
pnpm test
pnpm build
pnpm supabase:db:reset
pnpm supabase:test:db
pnpm supabase:types
pnpm exec playwright install chromium
pnpm test:e2e
```

The database reset is **destructive to your local Supabase database**. Never point it at hosted data. CI validates the repository; hosted credentials, redirects, SMTP and webhook destinations still need environment-level verification.

## Scope

The starter intentionally supports **one user-owned data model, one Pro entitlement, two billing intervals and Vercel as the deployment target**. It does not include teams/seats, extra OAuth providers, usage billing, queues, CMS, analytics, a generic API, automatic billing-repair cron or an admin panel.

This constraint is intentional: the infrastructure stays understandable while the replaceable product domain stays yours.

## Documentation

- [Setup](docs/SETUP.md) — local development, hosted Supabase/Auth/SMTP, Stripe and Vercel
- [Architecture](docs/ARCHITECTURE.md) — boundaries, code map and replacing Example
- [Billing](docs/BILLING.md) — Stripe operations, recovery and safe reconciliation

## Before publishing a live demo

Your clone uses **its own** Supabase, Stripe, Google OAuth, Resend SMTP and Vercel configuration. Supabase **Site URL**, allowed redirects, and hosted confirmation/recovery email templates must point to the exact canonical app origin. Committing the local templates does **not** install them in a hosted Supabase project. See the [release checklist](docs/RELEASE-CHECKLIST.md) before sharing a live link.

[Star Xerv on GitHub](https://github.com/pablocampelo/xerv) if it helps you, or fork it to build on top of the code.

## License

[MIT](LICENSE)
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.