Skip to content

Ship the SaaS,
not the scaffolding.

A production-ready Django + Next.js boilerplate with auth, multi-tenant workspaces, roles, Stripe billing, 2FA and i18n already wired and tested.

  • 928 automated tests
  • One-time payment
  • Updates for life
Dashboard of the demo workspace: onboarding checklist, member, storage, balance and notification counts, recent activity and the team
Team settings: members with their roles and status, a pending invitation and the invite button
Roles and permissions: the system roles Owner, Admin, Manager, Editor and Viewer with their permission and member counts
Subscription settings: the current Pro plan, its features, the next payment date and plan usage
Support tickets: a list with status, priority and category, and a new-ticket button
Sign-in screen: Google sign-in, email and password, password reset and sign-up links

Built on the stack you already know

  • Django
  • Next.js
  • TypeScript
  • PostgreSQL
  • Redis
  • Stripe
  • Tailwind CSS
  • shadcn/ui
  • Sentry
  • GitHub Actions

You have built this exact thing four times already.

Every new SaaS starts with the same month of plumbing before the first line your customers will ever see. This is that month, finished.

  1. Week 1

    Auth, JWT refresh, password reset, email verification, 2FA, Google OAuth

  2. Week 2

    Tenants, roles, member invites, a permission system with wildcards

  3. Week 3

    Stripe plans, add-ons, webhooks, idempotency, past-due grace

  4. Week 4

    i18n, audit logs, rate limits, error pages, tests, CI

    With SaaS Dock: day one is a feature

Everything between the idea and the first invoice.

Two repositories, a Django REST API and a Next.js app, reviewed end to end in internal security and quality audits. Not a starter template, not a tutorial with TODOs.

Multi-tenant from the first request

Every request resolves its workspace before your view runs, and every tenant-owned query is scoped by it.

  1. JWTAuthenticationMiddlewarerequest.user
  2. EmailVerificationMiddlewareverified or /auth/ only
  3. TenantMiddlewarerequest.tenant
  4. SubscriptionMiddleware403 once the plan lapses
  5. TenantPermissionMixinapp.resource.action

Stripe billing

Plans, add-ons and prepaid credits. Every webhook is recorded once and routed to its own task:

  • checkout.session.completedactivate or credit
  • invoice.paidrenew
  • invoice.payment_failedpast-due grace
  • customer.subscription.updatedchange plan
  • customer.subscription.deletedcancel

Roles with wildcards

Five default roles, any number of custom ones.

*.*support.*tenants.tenant_members.*support.tickets.create

Auth that was security-reviewed

Email and Google sign-in, TOTP or email-code 2FA with recovery codes, and an active-sessions list with remote sign-out.

17 security regression tests, one per closed finding

English and Spanish, both stacks

next-intl in the app, gettext in the API, 100% covered.

EN
Invite a teammate
ES
Invitar a alguien

Typed end to end

The app's types are generated from the Django OpenAPI schema, so after a serializer change tsc flags every call site it broke.

export const tenantMembersApi = {
  fetch: async (params?: QueryParams)
    : Promise<ApiData<'/tenants/members/', 'get'>> => …
}

Tested, and the tests ship with it

Run them on your machine before you change a line.

Backend · pytest
843
Frontend · Vitest
85
Screens
24

Three of the parts most boilerplates get wrong.

Simplified excerpts from the repositories you receive. The first is the pattern every new feature follows.

Tenant isolation you cannot forget to add.

Every request resolves its workspace before a view runs, and the mixins scope every queryset by it. A new feature inherits tenancy, roles and plan limits from two mixins; leaving them out is a decision, not an accident.

  • TenantMiddleware sets request.tenant on every request
  • TenantViewSetMixin filters querysets and stamps new rows
  • Wildcard permissions: *.*, app.*, app.resource.*
  • Revoking a permission invalidates its cache
apps/your_feature/views.pyPython
class InvoiceViewSet(    TenantViewSetMixin,      # tenant scope + app.resource.action    SubscriptionLimitMixin,  # plan quota for limit_feature    viewsets.ModelViewSet,):    serializer_class = InvoiceSerializer    queryset = Invoice.objects.all()    limit_feature = "invoices" # Multi-tenant, role-checked and plan-gated.

Stripe, done the way it should be done.

Stripe retries webhooks and Celery retries tasks, so every handler is idempotent: events are recorded in a StripeEvent table, credit purchases deduplicate on payment_intent_id, and balance changes run under select_for_update(). Duplicate, concurrent and out-of-order deliveries are covered by tests.

  • Plans, add-ons and prepaid credits
  • Customer portal, invoices, failed-payment retries
  • Trials, a past-due grace period, a cancellation safety net
apps/subscriptions/tasks.pyPython
@app.task(bind=True, max_retries=6)def handle_credit_purchase_completed(self, stripe_event_id, session):    with transaction.atomic():        balance = CreditBalance.objects.select_for_update()            .get_or_create(tenant=tenant)[0]         # Re-check inside the lock: the task may run twice.        if already_processed(payment_intent_id):            return  # idempotent, nothing to do         balance.deposit(amount, metadata={...})

Auth that was reviewed, not assembled.

JWT with rotation and a blacklist, 2FA by email code or TOTP with one-time recovery codes, and an active-sessions list where users sign out any device. It went through repeated internal security audits, and every finding that was closed has its own regression test — 17 of them.

  • Login lockout after 5 failed attempts in 15 minutes (configurable)
  • Six-digit codes from secrets.randbelow; invitations signed with a separate key
  • Deleting an account, transferring ownership or changing the email needs a fresh proof of identity
apps/users/tests/test_security_regressions.pyPython
def test_patching_email_does_not_change_user(authed_client, user):    # Closes an account takeover via PATCH /auth/user/    original = user.email    resp = authed_client.patch("/auth/user/", {"email": "attacker@example.com"})    assert resp.status_code == 200    user.refresh_from_db()    assert user.email == original

Two repositories, one contract.

The API owns the data, the rules and the background work; the web app renders it. They meet at the OpenAPI schema: the API's CI fails when the schema is stale, and regenerating the app's types makestsc flag every call site a serializer change broke.

Django 6.0 · DRF

saasdock-api

  • PostgreSQL with multi-tenant scoping
  • Celery worker and beat on Redis
  • django-auditlog on sensitive models
  • OpenAPI export and a Postman collection
  • Demo seed and an email previewer

Next.js 16 · React 19

saasdock-web

  • TypeScript, strict; types generated from the API
  • NextAuth: credentials and Google OAuth
  • TanStack Query and a useFetch hook
  • Tailwind v4 and shadcn/ui
  • next-intl in English and Spanish

Prefer a server-rendered Django app? That is simpler, and a Django-first boilerplate may fit you better — the comparison guide says where.

Built so your AI agent can ship the next feature.

Both repositories carry an AGENTS.md — the open format Codex, Cursor, Copilot and Zed read natively, and Claude Code through a CLAUDE.md pointer — mapping the request pipeline, the permission engine, the billing invariants and the traps. 9 skills cover the jobs agents (and people) most often get wrong.

saasdock-api/AGENTS.mdexcerpt
## Request pipeline

Every request passes through this stack.
Understand it before changing auth/tenant/
billing behaviour:

1. JWTAuthenticationMiddleware — request.user
2. EmailVerificationMiddleware — 403 if unverified
…

**Middleware raises 500s, not 4xx.**
Exceptions thrown inside middleware bypass
DRF's exception handler …
  • /saasdock-api-patternsapi

    Models, serializers, ViewSets, services and Celery tasks in the house style

  • /saasdock-add-appapi

    Scaffold a tenant-scoped Django app: mixins, permission catalog, default roles, i18n

  • /saasdock-permissionsapi

    Add a permission, catalog it, back-fill roles, debug a 403

  • /saasdock-stripe-webhookapi

    Idempotency, payment-intent dedup, atomic blocks with row locks

  • /saasdock-testsapi

    Fixtures, real-JWT clients, one regression test per finding

  • /saasdock-app-patternsweb

    Server Component page, client component, API client, query keys, routes

  • /saasdock-add-featureweb

    A new page or module end to end, sidebar and breadcrumbs included

  • /saasdock-formsweb

    react-hook-form + Zod + shadcn, with the React 19 traps called out

  • /saasdock-i18nweb

    next-intl on the client, gettext on the API, and the drift checks

Works with Claude Code · Codex · Cursor · Copilot · Zed. Thin CLAUDE.md, Cursor and Copilot pointers keep every tool reading the same map.

Buy it, or build it again.

SaaS Pegasus, Cookiecutter Django and Apptension are compared from their own documentation in the boilerplate comparison, and the Next.js-only starters in a guide of their own, including where they are the better choice.

QuestionSaaS DockBuild it yourself
A running dashboard on day oneYes: One docker compose up and a seedNo: Weeks
Multi-tenant by defaultYes: Every queryset scopedNo: You design it
Idempotent Stripe webhooks, testedYes: Duplicate, concurrent, out-of-orderNo: You write it
Role permissions with wildcardsYes: *.*, app.*, app.resource.*No: You write it
Automated testsYes: 843 backend + 85 frontendPartly: As many as you find time for
i18n in the API and the appYes: EN + ES, 100% coveredNo: You wire both
Documented for AI agentsYes: AGENTS.md + 9 skillsNo: —
CostYes: One payment, updates for lifePartly: Your time

Pay once. Own it forever.

No subscription, no seats, no renewal. Both tiers get the same source, the same repositories and every release after it. Pick by how many products you will ship.

Solo

One product · Updates for life

$249one-time

  • Django 6.0 + Next.js 16 · 928 automated tests · security-reviewed
  • Multi-tenant, Stripe billing, RBAC, 2FA, i18n (EN+ES) — wired
  • AGENTS.md + 9 agent skills — Claude Code, Cursor, Codex, Copilot
  • Ship one product, commercially, forever
  • Updates for life · Email support
Buy Solo

Unlimited

Best value

Unlimited products · Client work

$499one-time

  • Everything in Solo, and:
  • Ship unlimited products on one licence
  • Build with it for clients
  • Private Discord community
  • Early access to new features · vote on the roadmap
Buy Unlimited
  • Secure checkout through Stripe
  • Repository access by email, in minutes
  • Full refund within 7 days if you have not claimed access
  • Not sure? Email me first

Questions, answered honestly.

Anything else? hello@saasdock.dev

What exactly do I get when I buy?

Access to a private GitHub organization with two repositories: saasdock-api (Django 6.0 + DRF) and saasdock-web (Next.js 16 + React 19). Plus the AGENTS.md architecture maps, 9 agent skills, pointer files for Claude Code, Cursor and Copilot, the CI configuration, 928 automated tests, and a CHANGELOG. Everything in the box — yours.

Can I use it for commercial projects? Multiple projects?

Commercially, yes, on both tiers — you never owe us a cut or a credit. The difference is how many products you can ship: Solo covers one, Unlimited covers as many as you like plus work you build for clients. The only thing neither tier allows is reselling the boilerplate itself as your own starter kit.

What's the difference between Solo and Unlimited?

The same source code, the same repository access, and updates for life on both. Solo licenses one product. Unlimited licenses as many as you want, adds the right to build client work on it, and comes with the private Discord, early access and a vote on the roadmap. If you ever outgrow Solo, email us and we'll credit what you paid against the difference.

Do I have to credit SaaS Dock anywhere?

No. Strip every reference to SaaS Dock from the codebase. Rename every file. Use it however you want.

How do I get access, and how do updates work?

Right after checkout you get an email with a claim link. Enter your GitHub username and you're invited to the private GitHub organization within minutes. Pulling updates is a normal git fetch + merge; each release ships with a CHANGELOG and migration notes when relevant. Both tiers keep receiving updates for as long as SaaS Dock is maintained — there is no renewal and nothing expires.

What's the refund policy?

Honest answer: once you've claimed access to the private GitHub organization, the source code is in your hands and we can't take it back — so we don't offer refunds after that point. If you change your mind before claiming access, email us within 7 days and we'll refund in full. The best way to avoid buyer's regret is to read the FAQ, scroll through the screens, and email us if you're unsure before you check out — happy to answer anything.

Can I see more before I buy?

Yes — the product frame at the top of the page switches between six real screens of the demo workspace — dashboard, team, roles, billing, support and sign-in — and the sections below show the code behind tenancy, billing and auth. If you want a deeper look at a specific area (a particular page, a code pattern, the Stripe webhook handler), email us and we'll send you a short Loom or a code snippet. We'd rather walk you through it than have you regret the purchase.

How is SaaS Dock different from SaaS Pegasus?

SaaS Pegasus is one of the longest-running Django boilerplates (since 2019) and a configurable code generator; its default frontend is server-rendered Django with HTMX, with a React front end as an option. SaaS Dock is one fixed, decoupled architecture: a Django REST Framework API plus a Next.js 16 App Router app in strict TypeScript, with API types generated from the OpenAPI schema, and multi-tenancy, wildcard permissions, credits, referrals and support tickets included in every tier. Pick Pegasus for a server-rendered Django app; pick SaaS Dock if you want the frontend in Next.js. Full comparison in our guides.

Do I need to know Django and Next.js to use this?

Yes — this is a foundation, not a no-code product. If you've shipped anything in either framework, you'll be at home. The bundled AGENTS.md files and skills make it easier to onboard with any AI coding assistant.

Is the frontend TypeScript?

Entirely. Every file in the Next.js app is TypeScript under strict mode, and the API types are generated from Django’s own OpenAPI schema — so after a serializer change, regenerating the types makes tsc flag every call site that broke instead of it surfacing as undefined in production. The API's CI fails when the schema is stale, and type-checking runs in the web CI next to lint, tests and the build.

Is the multi-tenant model strict isolation or schema-per-tenant?

Logical isolation: every tenant-scoped model carries a tenant FK and the middleware sets request.tenant. ViewSets auto-scope queries. This is the right tradeoff for early-stage SaaS — schema-per-tenant adds operational complexity that you don't need until you hit thousands of tenants.

What if I find a bug or need a feature?

Email support is included on every tier — reply to your welcome email and you'll get a response within 24 hours on weekdays. Unlimited buyers also get the private Discord where I drop early builds, answer architecture questions, and pick the next features with the community. Security fixes ship to every license holder for free, regardless of tier.

“After 13+ years of building web products, I kept rebuilding the same auth, tenants and billing for every client. SaaS Dock is that work, done once and done properly — reviewed, tested, and documented for the next developer or the next AI agent.”
Franyer VerjelFounder, FVA Software LLC · franyer.dev

Not sure it fits your project? Email me before you buy — hello@saasdock.dev. I read every message.

Stop writing auth. Start writing features.

Get SaaS Dock — $249

One-time payment · updates for life