Multi-tenant Django foundation with Stripe billing, custom user model, and production-hardened settings — launch your SaaS in days.
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
cp .env.example .env
# Set DATABASE_URL, SECRET_KEY, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRETdocker compose -f docker/docker-compose.yml up -d
docker compose exec app python manage.py migrate
docker compose exec app python manage.py createsuperuserpip install -r requirements.txt
python manage.py migrate
python manage.py runserverfrom apps.tenants.models import Tenant, Plan
plan = Plan.objects.create(
name="Starter",
stripe_price_id="price_xxx",
max_users=5,
monthly_price_cents=2900,
)
tenant = Tenant.objects.create(
name="Acme Corp",
subdomain="acme",
plan=plan,
owner=user,
)
# Access at: https://acme.yourdomain.com# Local development with Stripe CLI
stripe listen --forward-to localhost:8000/api/v1/billing/webhook/
# Production: configure webhook URL in Stripe dashboard
# https://yourdomain.com/api/v1/billing/webhook/Get the full Django SaaS Boilerplate and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.