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_URLfor production. - Deployment ready – Gunicorn and Procfile for Railway, Heroku, or VPS.
Technology stack
| Layer | Technology |
|---|---|
| Backend | Django 6.0+, Python 3.12 |
| Auth | django‑allauth (email‑only) |
| Payments | Stripe (Payment Methods API) |
| Frontend | Tailwind CSS (CDN), Alpine.js, HTMX |
| Database | SQLite (dev) / PostgreSQL (prod) |
| Static files | WhiteNoise |
| Server | Gunicorn |
| Tasks | Django 6.0 native @task() |
| Linting | Ruff |
Requirements
- Python 3.12 or newer
pip(Python package installer)virtualenv(or the standard libraryvenvmodule)
Installation
- Download the project archive
curl -L -o /download/saas-boilerplate.zip https://github.com/eriktaveras/django-saas-boilerplate/archive/refs/heads/main.zip
- Extract the archive
unzip /download/saas-boilerplate.zip -d /download
cd django-saas-boilerplate
- Create a virtual environment
python3 -m venv .venv
- Activate the virtual environment
# Linux / macOS
source .venv/bin/activate
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
- Install Python dependencies
pip install -r requirements.txt
- Create an environment file
cp .env.example .env
Edit .env if you need to change defaults (e.g., Stripe keys, database URL).
- Run database migrations
python manage.py migrate
- Load seed data (admin user and demo plans)
make seed
The command prints the generated admin password; keep it for later login.
- Start the development server
make run
- Open the site
Visit
http://localhost:8000in 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_KEYandSTRIPE_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.pyand call them withawait 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 lintandmake formatto keep code style consistent. - The
make superusertarget creates an additional admin user without touching seed data. - For production, set
DEBUG=Falsein.envand 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.
Use this prompt with an AI coding assistant (Claude Code, Cursor, Copilot, ChatGPT and similar).
- Download the ZIP and extract it where your new project will live.
- Download the ZIP and extract it next to your project, so the assistant can read both.
- Fill in the bracketed parts under “About my project”.
- Paste the prompt into your assistant and review each change it proposes.
# Start a new project with SaaS Boilerplate ## Your task You are a senior frontend engineer. We are building a new project using SaaS Boilerplate, a web application built with Tailwind CSS, as the starting point. Keep its design and turn the demo into a clean, real codebase that I can maintain. ## About my project - What I'm building and for whom: [describe it] - Pages I need: [list them] - Stack: [keep it as plain static files, or name one: Vite / Laravel / Next.js / Astro] - Brand: [name, colours, fonts, logo] # SaaS Boilerplate — project brief ## Source project SaaS Boilerplate is a Django starter kit for SaaS applications that includes authentication, Stripe subscription handling, a user dashboard and public landing pages. It uses Tailwind CSS loaded from a CDN (no version number is specified in the repository) and Alpine.js for interactive components. Repository: https://github.com/eriktaveras/django-saas-boilerplate, license MIT (see LICENSE, author Erik Taveras). ## Files that matter **Pages (entry page is `templates/base.html`):** - `templates/base.html` – base layout for the whole site. - `templates/account/*.html` – all auth pages (login, signup, password reset, email verification, etc.). - `templates/dashboard/base.html` – base layout for the dashboard area. - `templates/dashboard/home.html`, `profile.html`, `settings.html`, `subscription_plans.html` – main dashboard screens. - `templates/landing/home.html`, `features.html`, `pricing.html` – public landing pages. - `templates/subscriptions/subscription.html` – Stripe subscription checkout page. **Stylesheets:** - `static/css/design-system.css` – the only custom CSS file; Tailwind utilities are loaded from the CDN in the HTML templates. **Scripts:** - No local JavaScript files; Alpine.js and HTMX are loaded from CDNs in the templates. **Images / Fonts:** - None in the repository (no image or font assets). **Partials / source templates:** - `templates/account/base.html` – wrapper for all auth pages. - `templates/dashboard/base.html` – wrapper for all dashboard pages. - `templates/base.html` – top‑level wrapper used by both public and auth sections. **Configuration files:** - `core/settings.py` – Django settings (environment‑variable driven). - `core/urls.py` – root URL configuration. - `apps/*/urls.py` – app‑specific routing (accounts, dashboard, landing, subscriptions). - `Makefile` – defines development commands. - `Procfile` – Gunicorn entry for production. - `requirements.txt` – Python dependencies. - `.env.example` – example environment file. ## Setup and build The project consists of static HTML templates and Django server code; no front‑end build step is required. ```bash # Install system requirement for virtualenv on Debian/Ubuntu sudo apt install python3.12-venv # Clone and enter the repository git clone https://github.com/eriktaveras/django-saas-boilerplate.git cd django-saas-boilerplate # Create virtualenv and install Python dependencies make install # Copy example environment and adjust if needed cp .env.example .env # Apply migrations and load seed data make migrate make seed # Run the development server make run ``` The `make` targets are the only scripts defined; there is no production build script because Tailwind is used via CDN. ## How it is put together The layout follows a classic two‑level structure: * **Base layout (`templates/base.html`)** – includes the HTML `<head>` with Tailwind CDN, Alpine.js, HTMX, and a block for page‑specific content. All public pages extend this file. * **Auth layout (`templates/account/base.html`)** – extends the top‑level base and adds a centered card for login‑related forms. * **Dashboard layout (`templates/dashboard/base.html`)** – extends the top‑level base and provides a sidebar navigation that appears on every dashboard page. Common sections (header, footer, navigation) are defined in the base templates and reused via Django’s `{% block %}` mechanism. The only custom CSS is in `static/css/design-system.css`; all utility classes come from Tailwind CDN. JavaScript libraries are loaded from CDNs in the base templates: - **Alpine.js** – used for dropdowns, toggles, and simple reactivity. - **HTMX** – enables AJAX‑style partial page updates without custom JS. No explicit initialization code is required; Alpine components activate automatically on page load. Dark mode and RTL are not supported (both are false in the verified facts). ## Watch out for 1. **Tailwind via CDN** – because there is no build step, any custom Tailwind configuration (e.g., extending the color palette) must be added to `design-system.css` or a separate stylesheet; otherwise Tailwind classes not present in the default CDN build will not work. 2. **Global CSS** – `design-system.css` applies to the whole site; unintended selectors may affect multiple pages. 3. **CDN script loading** – Alpine.js and HTMX are fetched from external URLs; network failures will break interactive components. 4. **DOM‑specific IDs** – some templates reference specific element IDs (e.g., for HTMX targets); changing the HTML structure without updating those IDs can cause silent failures. 5. **Class name collisions** – Tailwind utility classes may clash with custom CSS selectors in `design-system.css`; verify specificity if you add new styles. 6. **No JavaScript bundling** – adding local JS files will require manual inclusion in the templates; the project does not provide a bundler or asset pipeline. ## Verify - [ ] The home page (`templates/landing/home.html`) renders with Tailwind styling and no missing CSS. - [ ] All auth pages load Alpine.js and HTMX without console errors. - [ ] Dashboard pages display the sidebar navigation and correctly extend `templates/dashboard/base.html`. - [ ] The Stripe subscription page (`templates/subscriptions/subscription.html`) shows the checkout button and loads Alpine.js. - [ ] Responsive layout works on mobile widths (meta viewport is present and Tailwind utilities respond). - [ ] No duplicate script tags for Alpine.js or HTMX appear in the rendered HTML. - [ ] The MIT license file is present and unchanged. - [ ] `make run` starts the Django development server and serves static files via WhiteNoise without additional configuration. # How to work ## Step 1 — Get it running as it is Start from the downloaded ZIP or a clone of the repository. Serve the files locally as described in "Setup and build" above and open the entry page. Confirm it runs without console errors before changing anything. ## Step 2 — Plan the project with me List the pages and sections of SaaS Boilerplate to keep, rename or remove for my project, the folder structure you propose for my stack, and where the repeated parts will live. Wait for my OK. ## Step 3 — Build it - Keep the pages I need, remove the rest, and replace the sample content with real content. - Extract repeated parts (header, navigation, footer) into shared partials or components. - Put my brand name, colours and fonts where SaaS Boilerplate defines its theme (see "How it is put together" above), not as one-off overrides. - Keep Tailwind CSS's markup patterns and class conventions so the design stays consistent, and don't change its major version unless I ask. ## Step 4 — Polish and launch - Remove demo content and every CSS/JS file nothing uses any more; optimise images. - Check phone, tablet and desktop widths, labels, alt text, keyboard focus and colour contrast. - Tell me which files to upload to the host. - Keep the license file and credit the author of SaaS Boilerplate. ## Ground rules Work in small steps and show me each change. Use only the libraries already in the project unless I agree to add one.



