Integrates Next.js App Router, strict TypeScript, Supabase Auth (Google and email/password), Postgres, RLS and Stripe subscription billing
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.
Actual screenshot captured by the server browser.
All pages & views 2
Screenshots show visual appearance; interactive behavior may differ.
What stands out
A quick read of the recorded project description.
Billing is handled authoritatively on the server: Stripe Checkout, Customer Portal, signed webhooks, idempotent event handling and paid-through entitlement state
Provides a replaceable example product domain demonstrating the end-to-end Auth → ownership → RLS → Pro → CRUD flow
Includes product flows such as sign-up, verification, login, recovery, Dashboard, Account, Billing, Help and legal templates
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.
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
Running locally requires Node.js 24, pnpm 11.19.0 and Docker
- 2
After cloning the repository, run pnpm install --frozen-lockfile, pnpm supabase:start and pnpm supabase:status
- 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
Local billing writes must use the local service-role key as SUPABASE_SECRET_KEY and must not be exposed through NEXT_PUBLIC_* variables
- 5
To test real Checkout and Pro, add Stripe test-mode credentials, monthly/annual Price IDs and run a local Stripe webhook listener
License & source material
Usage conditions & limitations
Free to use · keep license noticeThis 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
https://github.com/pablocampelo/xerv/blob/main/LICENSEhttps://github.com/pablocampelo/xerv/blob/main/README.mdYour 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
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) [](https://github.com/pablocampelo/xerv/actions/workflows/ci.yml) [](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)
Explore similar templates
Compare previews and descriptions within the same stack and category.

Next.js SaaS Starter
The official Next.js SaaS starter template, integrating email/password authentication, Stripe Checkout subscriptions, a dashboard with user/team CRUD, basic Owner/Member RBAC, and activity logging.
Next.js · SaaS

Next.js Commerce
Vercel's officially maintained Next.js App Router ecommerce starter with deep Shopify integration, offering a complete product catalog, cart, and checkout flow. Core logic is modular for swapping backends, and community provider versions exist for BigCommerce, Medusa, and Saleor.
Next.js · E-commerce

Next-js-Boilerplate
A developer-first Next.js 16 starter with Tailwind CSS 4 and TypeScript, supporting both App Router and Page Router.
Next.js · Starter

tailwind-nextjs-starter-blog
A Next.js and Tailwind CSS blog starter template using Contentlayer for Markdown/MDX, with built-in SEO, code highlighting, and tags. It targets personal technical blogs and migration from Jekyll/Hugo to React, and supports one-click Vercel deployment.
Next.js · Blog

next-forge
next-forge is a Turborepo-based Next.js template maintained by Vercel, positioned as a starting point for SaaS products.
Next.js · Starter

SaaS-Boilerplate
SaaS-Boilerplate is an open-source SaaS starter template built with Next.js App Router, React 19, TypeScript, Tailwind CSS, and Shadcn UI.
Next.js · SaaS
