Build SaaS products faster in React, Django and AWS.
A complete SaaS starter kit based on a battle-tested stack with out-of-the-box features every SaaS should have
---
[**SaaS Boilerplate Documentation**](https://docs.demo.saas.apptoku.com/)
[**SaaS Boilerplate Page**](https://www.apptension.com/saas-boilerplate?utm_source=readme-file&utm_medium=referral&utm_campaign=SaaS%20Boilerplate&utm_term=SaaS%20Boilerplate)
[**SaaS Boilerplate Demo**](https://app.demo.saas.apptoku.com/)
---
Supercharge your SaaS development with our comprehensive starter kit, designed to accelerate your project and save you
valuable time and resources. Our battle-tested boilerplate eliminates the need for extensive configuration and
development work, allowing you to focus on innovation from day one.
SaaS Boilerplate includes essential features that every SaaS application requires, such as frontend, backend API, admin
panel, and workers. With a scalable AWS-based architecture and continuous deployment, you can easily deploy multiple
environments representing different stages in your pipeline.
Say goodbye to weeks of setup and coding. Our proven stack and ready-to-use features empower you to jumpstart your
project and prioritize building your product's intellectual property. Unlock your SaaS potential faster than ever before
and seamlessly transition from setup to innovation.
## Getting started
### Requirements
- Install [Docker](https://docs.docker.com/get-docker)
- Install [Node.js](https://nodejs.org/en/download/) version 20 or above (which can be checked by running \`node -v\`).
We recommend Node.js 20+ for optimal compatibility with the latest features. You can use [nvm](https://github.com/nvm-sh/nvm) or [n](https://github.com/tj/n) for managing multiple Node versions installed on a single machine.
- Install [pnpm](https://pnpm.io/installation) version 9 or above (which can be checked by running \`pnpm --version\`)
- (Windows only) Install [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install)
#### Optional
- Install [Python](https://www.python.org/downloads/) version 3.11 (which can be checked by running \`python3 --version\`) and [uv](https://docs.astral.sh/uv/getting-started/installation/) (which can be checked by running
\`uv --version\`)
- You need this one if you want to run \`uv sync\` command in \`packages/backend\` or \`packages/workers\` outside
docker container
- You can use [\`pyenv\`](https://github.com/pyenv/pyenv) for managing multiple Python versions installed on a single machine.
### Fresh installation
#### Setup using CLI starter kit
You can use a special CLI tool to run a new local instance of the SaaS Boilerplate as soon as possible. It will clone
the repository and take care of setting up the environment. Run the following command in the directory where you would
like to create a new project:
**_Using \`npm\`:_**
\`\`\`bash
npm init saas-boilerplate PATH
\`\`\`
**_Using \`pnpm\`:_**
\`\`\`bash
pnpm create saas-boilerplate PATH
\`\`\`
**_Using \`yarn\`:_**
\`\`\`bash
yarn create saas-boilerplate PATH
\`\`\`
> :information_source: Replace \`PATH\` with your desired project directory name (e.g., \`my-saas-app\`).
>
> :warning: **The target directory must be empty or non-existent!** The CLI will create it for you.
#### Manual setup
For the manual setup clone this repository and follow the steps in
[Getting started guide](https://docs.demo.saas.apptoku.com/getting-started/run-project/run-new-project#manual-setup).
### Run existing project
> :warning: **If you are using a Windows machine**, it's mandatory to have **WSL 2** (Windows Subsystem for Linux)
> installed on your system to run the commands for installing dependencies and running the application.
#### Clone the repository
\`\`\`sh
git clone
cd
\`\`\`
#### Install dependencies
The project is configured to use pnpm workspaces, which means that you can install \`node_modules\` of all packages in
repository, with single command:
\`\`\`sh
pnpm install
\`\`\`
> **Environment Files:** Make sure you have the necessary \`.env\` files from your team. If not, copy from \`.env.shared\` templates:
>
> \`\`\`sh
> cp .env.shared .env
> cp packages/backend/.env.shared packages/backend/.env
> \`\`\`
### Start the app
Start both: backend and webapp
\`\`\`sh
pnpm saas up
\`\`\`
#### Start backend
\`\`\`sh
pnpm saas backend up
\`\`\`
#### Start webapp
\`\`\`sh
pnpm saas webapp up
\`\`\`
#### Local documentation
In order to run your local documentation server execute following command:
\`\`\`sh
pnpm saas docs up
\`\`\`
#### Stop services
To stop all services:
\`\`\`sh
pnpm saas down
\`\`\`
### What's Running Locally?
After starting the application, you'll have these services available:
| Service | URL | Description |
| --------------- | ---------------------------------------------------------- | -------------------------- |
| **Web App** | [http://localhost:3000](http://localhost:3000) | Your SaaS frontend |
| **Backend API** | [http://localhost:5001](http://localhost:5001) | Django + GraphQL API |
| **Admin Panel** | [http://admin.localhost:5001](http://admin.localhost:5001) | Django admin interface |
| **Mailcatcher** | [http://localhost:1080](http://localhost:1080) | Catches all emails locally |
| **Docs** | [http://localhost:3006](http://localhost:3006) | Local documentation |
| **Workers** | [http://localhost:3005](http://localhost:3005) | Workers trigger server |
> **First Steps:**
>
> 1. Open [http://localhost:3000](http://localhost:3000) and create an account
> 2. Check [http://localhost:1080](http://localhost:1080) for the verification email
> 3. Log in to the Admin Panel at [http://admin.localhost:5001](http://admin.localhost:5001) using credentials from your \`.env\` file
## Features
This boilerplate includes plenty of ready to use features that you can adjust to your needs:
Authentication and authorization
- User registration and login, including Facebook and Google OAuth
- WebAuthn/Passkeys for passwordless authentication
- Enterprise SSO (SAML 2.0, OIDC) with SCIM 2.0 directory sync
- Basic user data like name, surname, and user role for authorization
- User email address verification via a transactional email
- Password change and password recovery within the app flow
- User management panel in Django admin
- Two-factor authentication (2FA)
- Active session management across devices
Emails
- A set of ready-to-send transactional emails (new user verification, password recovery, subscription renewals, errors, etc.)
- Ability to schedule emails at a given time
- Sending test emails directly from a Storybook
- Internationalization support out of the box
Payments
- Integration with Stripe services and its dashboard
- No customer payment method data is stored locally
- Support for multiple payment methods and their management (storing for future use and removal)
Subscriptions
- Ability to charge users immediately or to set up recurring payments
- Subscription plans support and ability to freely modify current plans
- Free trial subscription plan, a grace period for credit card issues
- Superadmin panel enables customer management (i.e. refunds) without the Stripe dashboard
Multi-tenancy
- Start immediately with a default tenant provided upon account creation
- Add new tenants as needed to manage multiple entities within a single account
- Utilize three default roles ”Owner, Admin, and Member” to control tenant activities and collaboration
- Securely invite and manage new members within each tenant
Tenant backup and restore
- Per-tenant XML backups of selected modules and models
- Encryption of backup content (AWS Secrets Manager or DB fallback with
BACKUP_MASTER_KEY); configurable schedule (interval and retention)
- Restore into the same or another tenant with conflict handling (skip, update, or fail)
- Email notifications when a backup is ready or fails, and when a restore completes or fails
- Backup/restore notification templates defined in the backup (tenants) module
CMS integration (Contentful)
- Integration with Contentful service
- Example content model (image, title, and description)
- Ready to use CMS with a free plan
Notifications
- Real-time in-app notifications with WebSocket support
- Notification center UI with unread indicators
- Mark all as read functionality
- Easy to add new notification types
AI Integration
- OpenAI integration ready for building AI-powered features
- Example implementation included
- Easy to extend with other AI providers
CRUD Generator
- Plop-based generators for quickly scaffolding new features
- Example CRUD module included
- Tenant-scoped data isolation
- Generate forms, tables, and GraphQL operations automatically
Management Dashboard
- Complete financial management module (example module)
- Projects, iterations, revenue & cost tracking
- AI-powered CSV import with intelligent column mapping
- Financial forecasting with backtesting and scenarios
- Multi-currency support with FX rate management
- Excel-like timesheet with copy/paste and fill handle
- CFO Command Center with KPI dashboards
RBAC Permissions
- Fine-grained role-based access control
- Custom organization roles with color coding
- Permission categories (organization, members, security, billing, features)
- Frontend and backend permission enforcement
Activity Logs
- Comprehensive audit trail for all actions
- Field-level change tracking (old value → new value)
- Multiple actor types (User, AI Agent, System)
- Export to CSV for compliance
AI Agent (MCP)
- Model Context Protocol integration for AI assistants
- Natural language data queries and mutations
- RBAC-aware tool execution
- WebSocket streaming for real-time responses
Session Management
- Cross-origin cookie support for separate frontend/backend domains
- Safari/iOS authentication fallback with Authorization headers
- Multi-device session tracking and remote revocation
- Activity logging for authentication events
Storage Backends
- Flexible file storage with AWS S3, Cloudflare R2, Backblaze B2
- Dynamic backend selection based on environment
- Public and private storage separation
- CDN integration for translations and assets
---
... and more
The full list with the descriptions can be found in the [features documentation](https://docs.demo.saas.apptoku.com/introduction/features/).
## Tech stack
Front-end stack:
- [React](https://github.com/facebook/react) 19.2.x
- [TypeScript](https://www.typescriptlang.org/) 5.4.x
- [GraphQL](https://graphql.org/)
- [Apollo Client](https://github.com/apollographql/apollo-client) 4.x
- [React Router](https://github.com/remix-run/react-router) 7.x
- [Vite](https://github.com/vitejs/vite) 6.x
- [tailwindcss](https://github.com/tailwindlabs/tailwindcss) 3.4.x
- [shadcn/ui](https://github.com/shadcn-ui/ui)
- [jest](https://github.com/jestjs/jest)
- [Storybook](https://github.com/storybookjs/storybook) 10.x
> ℹ️ **Styling Approach:** **Tailwind CSS** is the primary styling solution for all components. Use Tailwind utility classes with the \`cn()\` helper for conditional styling. [styled-components](https://github.com/styled-components/styled-components) is included as a dependency for internal theme infrastructure and email template rendering, but developers should use Tailwind CSS for all new component styling. See the [shadcn/ui guide](https://docs.demo.saas.apptoku.com/working-with-sb/shadcn) for component styling patterns.
Back-end stack:
- [Python](https://www.python.org/) 3.11.x
- [Django](https://github.com/django/django) 5.2.x
- [Django REST Framework](https://github.com/encode/django-rest-framework) 3.15.x
- [Graphene Django](https://github.com/graphql-python/graphene) 3.2.x
- [Celery](https://github.com/celery/celery) 5.4.x
- [Sentry SDK](https://github.com/getsentry/sentry-python) 2.0.x
- [dj-stripe](https://github.com/dj-stripe/dj-stripe/)
- [Postgres](https://www.postgresql.org/) 14+
- [Redis](https://redis.io/) 7+
Infrastructure:
- [NX](https://github.com/nrwl/nx) 19.x
- AWS infrastructure written in [AWS CDK](https://github.com/aws/aws-cdk) 2.x
- [Docker](https://www.docker.com/) (Latest)
- [pnpm](https://pnpm.io/) 9+ (package manager)
- GitHub or Bitbucket
3rd party services:
- Stripe
- Contentful
- Sentry
- SonarCloud
- OpenAI
The [detailed stack description](https://docs.demo.saas.apptoku.com/introduction/stack-description) is available in the documentation.
## How was the SaaS Boilerplate created?
In our experience in Apptension, we have built hundreds of web and mobile applications over the years and saw a bunch of standard features. For example, all applications (or at least 99% of them) need a login, email templating, payments and subscriptions, CMS integration, and more.
A broader list of elements that can be implemented in projects in this way was created after building dozens of different types of SaaS products. We analyzed them and noticed many common parts appeared virtually unchanged. So we created SaaS Boilerplate that is the base, and while it requires design or functional customization for a specific SaaS product, it dramatically reduces development time.
That's why you don't have to start by writing the code for that login or payment function. Instead, you can use off-the-shelf elements in those places and focus on creating the rest of the features unique to the project.
The development process is ongoing as we continually add new features and improve existing ones. We started with AWS Boilerplate, which evolved into the current SaaS Boilerplate. It originally contained only infrastructure (a configured AWS account) and was a template for the project, which had blanks for the back-end and front-end.
We saw that it was already a handy and very well-received tool, so the next natural step was to add more elements to it – front-end, back-end, and pack the relevant features that were most often repeated in different projects, including logging, CRUD, payments, integration with content pool, etc.
Our idea was that it shouldn't be just the code itself because SaaS Boilerplate also contains our know-how – because we gathered everything needed for development and around development in one package. So you don't have to think about choosing code formatting, matching different tools and their subsequent configuration, etc. Moreover, such a package is proven and battle-tested – you can just upload it to the cloud and start so-called heavy development.
## Who are we?
We're [Apptension](https://apptension.com?utm_source=readme-file&utm_medium=referral&utm_campaign=SaaS%20Boilerplate&utm_term=SaaS%20Boilerplate), a team that turns ideas into world-class software using expertise in technology, design, and product management. We work with founders, investors, and creative agencies to help them bring uncommon ideas to the market.
Our partners value our outside-the-box thinking, clear and honest communication, and reliability – even in the most dynamic and time-compressed projects. Among our clients – plenty of early-stage startups, as well as international tech behemoths like Netflix and Uber. We live and breathe tech – and we're darn good at it.
To bring even more value to our partners, we create bespoke tools (like SaaS Boilerplate), allowing us to shorten time-to-market while avoiding technical debt.
## License
SaaS Boilerplate is licensed under the [MIT License](./LICENSE).
## Contributing to SaaS Boilerplate
We welcome contributions from anyone interested in improving SaaS Boilerplate. Please keep in mind that this project follows a [Code of Conduct](./CODE_OF_CONDUCT.md) to ensure a welcoming community for all.
For more detailed information on how to contribute to this project, please refer to our [Contributing Guide](./CONTRIBUTING.md).
If you have any questions about contributing, please join our [Discord server](https://discord.apptension.com) - we are happy to help you!
Thank you for considering contributing to SaaS Boilerplate!