← Back to all products
$59
Django SaaS Boilerplate
Complete Django SaaS starter with multi-tenancy, Stripe billing, user management, and admin dashboard.
DockerPythonJSONMarkdownYAMLDjangoRedisPostgreSQLNginx
📁 File Structure 18 files
django-saas-boilerplate/
├── LICENSE
├── README.md
├── apps/
│ ├── accounts/
│ │ ├── models.py
│ │ ├── serializers.py
│ │ ├── urls.py
│ │ └── views.py
│ ├── billing/
│ │ ├── models.py
│ │ └── webhooks.py
│ └── tenants/
│ ├── middleware.py
│ └── models.py
├── config/
│ ├── settings/
│ │ ├── base.py
│ │ ├── development.py
│ │ └── production.py
│ └── urls.py
├── docker/
│ ├── Dockerfile
│ └── docker-compose.yml
├── manage.py
└── templates/
└── base.html
📖 Documentation Preview README excerpt
Django SaaS Boilerplate
Multi-tenant Django foundation with Stripe billing, custom user model, and production-hardened settings — launch your SaaS in days.
[](https://www.python.org/downloads/)
[](https://www.djangoproject.com/)
[](LICENSE)
---
What You Get
- Custom User model — Email-based auth with roles, built from AbstractBaseUser
- Multi-tenant architecture — Subdomain-based tenant resolution with shared database
- Stripe billing — Plans, subscriptions, invoices, and webhook handling
- Production settings — Whitenoise, S3 storage, Sentry, secure cookies, HSTS
- REST API — Django REST Framework with JWT auth and OpenAPI docs
- Docker-ready — Gunicorn, PostgreSQL, Redis, Celery worker
- HTMX + Alpine.js — Modern server-rendered frontend without SPA complexity
- Split settings — Base / development / production configuration pattern
File Tree
django-saas-boilerplate/
├── config/
│ ├── settings/
│ │ ├── base.py # Shared Django settings
│ │ ├── development.py # Dev overrides
│ │ └── production.py # Production hardening
│ └── urls.py # Root URL configuration
├── apps/
│ ├── accounts/
│ │ ├── models.py # Custom User model
│ │ ├── serializers.py # DRF serializers
│ │ ├── views.py # Auth & profile ViewSets
│ │ └── urls.py # Account routes
│ ├── tenants/
│ │ ├── models.py # Tenant & plan models
│ │ └── middleware.py # Subdomain → tenant
│ └── billing/
│ ├── models.py # Subscription & Invoice
│ └── webhooks.py # Stripe webhook handler
├── templates/
│ └── base.html # HTMX + Alpine.js base
├── docker/
│ ├── Dockerfile # Multi-stage Django build
│ └── docker-compose.yml # Full stack
├── manage.py
└── manifest.json
Getting Started
1. Clone and configure
cp .env.example .env
# Set DATABASE_URL, SECRET_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET
... continues with setup instructions, usage examples, and more.
📄 Code Sample .py preview
manage.py
#!/usr/bin/env python
"""Django management script for the SaaS Boilerplate."""
from __future__ import annotations
import os
import sys
def main() -> None:
"""Run administrative tasks."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.development")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()