Gantrel
Get started
Next.js SaaS boilerplate

Auth, teams, billing, admin and docs: ready on day one.

Gantrel is the platform layer of a SaaS, built and tested so you spend your time on the product. It runs as a live demo called Brightpad; remove it with one command and keep everything else.

  • 290+unit and race tests
  • 50docs guides
  • 1command to remove the demo
A steel launch gantry and lightning mast at dusk

$ npm run make:module -- Projects

+ models/projects.ts

+ app/app/projects/page.tsx

+ app/api/v1/projects/route.ts

Created module Project. Tests pass.

Switch to Business

Unused Team time-$9.50
Business, rest of period$24.50
Due now$15.00

What is included

Eight platform areas, each with tests and a guide. Nothing here is a placeholder. See every feature or read how security works.

Auth with 2FA

Passwords, magic links, OAuth, TOTP and recovery codes. Sessions you can end.

Read the guide

Organisations and roles

Invitations bound to the invited email, teams, a permission matrix you extend.

Read the guide

Billing and proration

Plans, trials, coupons, credit, invoices and a mid-period preview before any charge.

Read the guide

Metering and limits

Allowances per plan, atomic reservations, storage as a gauge, overage pricing.

Read the guide

Admin console

MRR, organisations, plans editor, feature flags, audit log and safe impersonation.

Read the guide

API and OpenAPI

Scoped keys capped by role, rate limits, quotas and a generated OpenAPI 3.1 spec.

Read the guide

Signed webhooks

HMAC signatures, a retry schedule, a delivery log and SSRF-safe requests.

Read the guide

AI helper

One provider interface with a free deterministic driver, metered and flagged by plan.

Read the guide
Billing

Plan changes that price themselves honestly

Credit is based on what the customer actually paid, discounts included. Parallel checkouts leave one subscription, a payment that cannot be applied is refunded and flagged, and the gateway subscription is always ended when the plan moves.

  • Trials that fall back to the free plan, never an invoice
  • Coupons redeemed atomically
  • Stripe and Razorpay drivers, plus a simulator for demos
How proration works

Switch to Business (monthly)

Unused time on current plan (amount paid)-$9.50
Business for the rest of this period$24.50
Due now$15.00

Your current period is kept and ends on the same day.

Setup checklist

3 of 5 steps done · finish these to launch

Onboarding

A setup checklist that shows its progress

Every workspace gets a launch checklist on its dashboard: create the workspace, invite a teammate, choose a plan, make an API key, add a webhook. Each step ticks off as it is done.

Generator

Add a module in one command

A tenant-scoped model, service, actions, REST routes with OpenAPI entries, pages, tests and docs, registered in the nav and the role permissions. It refuses unsafe names and never overwrites your files.

Read the generator guide
$ npm run make:module -- Projects

+ models/projects.ts
+ lib/validators/projects.ts
+ lib/modules/projects.ts
+ lib/actions/projects.ts
+ app/app/projects/page.tsx
+ app/api/v1/projects/route.ts
+ tests/unit/projects.test.ts

Created module Project (projects).
Next: npm run typecheck && npm test

Tenant-safe by default

A plugin refuses queries that forget the organisation, and updates that try to move a row.

Docs you can search

50 guides, recipes and references with a sidebar and client-side search, plus an API reference built from your routes.

Global and accessible

English, Spanish and Arabic with right-to-left layouts, dark mode and AA contrast.

Stack

  • Next.js 16
  • React 19
  • TypeScript 6
  • Tailwind 4
  • MongoDB + Mongoose 9
  • zod 4
  • OpenAPI 3.1
  • Vitest
  • Playwright

Questions

Start from a platform, not a blank page.

Sign in to the live demo and try billing, the admin console and the API.