Skip to content
SaaS Templates Tailwind CSS djangopythonalpine.jshtmx

Tailwind CSS SaaS Template with Auth Pages - SaaS Boilerplate

A Django starter kit for SaaS apps with email‑only auth, Stripe subscriptions, dashboard and landing pages. Ready to run in a dev environment.

By eriktaveras eriktaveras/django-saas-boilerplate 253 stars

Introduction

SaaS Boilerplate is a starter kit for building SaaS applications with Django. It includes ready‑made authentication pages, Stripe subscription handling, a user dashboard, and public landing pages styled with Tailwind CSS. The project is intended for Django developers who want a quick development environment that works out of the box.

What this project offers

  • Email‑only user registration and login (django‑allauth).
  • Full set of styled authentication templates (21 pages).
  • Stripe integration for subscription payments.
  • Dashboard with profile, settings, and subscription‑plan management.
  • Public landing site with home, features, and pricing pages.
  • Simple background tasks using Django 6.0 native @task.
  • Ready‑to‑run development server and deployment configuration (Gunicorn, Procfile, WhiteNoise).

Main features

  • Email‑only signup – no username required.
  • Login, email verification, password reset – all handled by django‑allauth.
  • Stripe subscription payments – payment‑method API, webhook handling, and subscription status stored on the user.
  • Dashboard – sidebar navigation, profile editing, settings, and API‑key generation.
  • Admin‑managed subscription plans – create plans with trial support.
  • Landing pages – home, features, pricing, plus a robots.txt.
  • Background tasks – email sending and other jobs via Django’s built‑in task system.
  • Security – CSP middleware, HSTS, SSL redirect, secure cookies (auto‑enabled in production).
  • Database support – SQLite for development, PostgreSQL via DATABASE_URL for production.
  • Deployment ready – Gunicorn and Procfile for Railway, Heroku, or VPS.

Technology stack

LayerTechnology
BackendDjango 6.0+, Python 3.12
Authdjango‑allauth (email‑only)
PaymentsStripe (Payment Methods API)
FrontendTailwind CSS (CDN), Alpine.js, HTMX
DatabaseSQLite (dev) / PostgreSQL (prod)
Static filesWhiteNoise
ServerGunicorn
TasksDjango 6.0 native @task()
LintingRuff

Requirements

  • Python 3.12 or newer
  • pip (Python package installer)
  • virtualenv (or the standard library venv module)

Installation

  1. Download the project archive
curl -L -o /download/saas-boilerplate.zip https://github.com/eriktaveras/django-saas-boilerplate/archive/refs/heads/main.zip
  1. Extract the archive
unzip /download/saas-boilerplate.zip -d /download
cd django-saas-boilerplate
  1. Create a virtual environment
python3 -m venv .venv
  1. Activate the virtual environment
# Linux / macOS
source .venv/bin/activate
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
  1. Install Python dependencies
pip install -r requirements.txt
  1. Create an environment file
cp .env.example .env

Edit .env if you need to change defaults (e.g., Stripe keys, database URL).

  1. Run database migrations
python manage.py migrate
  1. Load seed data (admin user and demo plans)
make seed

The command prints the generated admin password; keep it for later login.

  1. Start the development server
make run
  1. Open the site

    Visit http://localhost:8000 in a web browser. Use the admin credentials printed in step 8 to log into the Django admin at /admin/.

Configuration

  • All settings are read from environment variables defined in .env.
  • Key variables include:
    • SECRET_KEY – Django secret key.
    • DATABASE_URL – Database connection string (defaults to SQLite).
    • STRIPE_PUBLIC_KEY and STRIPE_SECRET_KEY – Stripe API credentials.
    • SEED_ADMIN_EMAIL / SEED_ADMIN_PASSWORD – Override the generated admin user.
  • Static files are served by WhiteNoise; no additional web server configuration is required for development.

Customizing the project

  • Tailwind styling – The project loads Tailwind from a CDN. For production you may replace the CDN link with a compiled Tailwind build.
  • Templates – All HTML pages live under templates/. Modify the files to change layout or add new pages.
  • Views and URLs – Application code is organized in the apps/ directory (accounts, dashboard, landing, subscriptions). Add or edit views and URL patterns as needed.
  • Background tasks – Define additional tasks in apps/*/tasks.py and call them with await task_name() or schedule them via Django’s task runner.

Project structure

django-saas-boilerplate/
├── apps/
│   ├── accounts/
│   ├── dashboard/
│   ├── landing/
│   └── subscriptions/
├── core/
│   ├── settings.py
│   ├── urls.py
│   ├── asgi.py
│   └── wsgi.py
├── static/
│   └── css/
│       └── design-system.css
├── templates/
│   ├── account/
│   ├── dashboard/
│   ├── landing/
│   └── subscriptions/
├── manage.py
├── requirements.txt
├── Makefile
├── Procfile
└── README.md

Tips

  • Use make lint and make format to keep code style consistent.
  • The make superuser target creates an additional admin user without touching seed data.
  • For production, set DEBUG=False in .env and configure a proper PostgreSQL database.
  • Remember to replace the CDN Tailwind link with a compiled version if you need custom utilities or purge unused CSS.

License and attribution

The project is licensed under the MIT License. See the full license file in the repository.

Original repository: https://github.com/eriktaveras/django-saas-boilerplate

When redistributing, keep the LICENSE file and retain attribution to the original author.