# FastAPI React Template: Free SaaS Starter Kit

> Free full-stack FastAPI and React template for your SaaS: sign-in, teams, emails, Stripe, Lemon Squeezy or Creem billing and an admin panel. MIT, one-click deploy.

[Templates](/templates) SaaS starter kit

# Full-stack FastAPI + React templateSaaS starter kit

For people building a SaaS or a micro SaaS in Python. Sign-in, teams, emails, notifications and subscription billing already work, so your first week goes into the thing customers will pay for. Every feature follows the same pattern from route to database, and you, Claude Code or Cursor can add the next one by copying the last. Free under MIT. One click copies it into your GitHub and runs it on Runsite with a database, storage and email connected.

[ Deploy on Runsite](https://dashboard.runsite.app/templates/ff27d3cf-54c2-4ce3-9359-07be4bc08725)[ View on GitHub](https://github.com/runsite-platform/runsite-saas-kit)

New accounts get €5 of credit for 30 days, no card needed. That covers most of the first month.

The kit

€0

MIT license, no seat fees

Running it

€6/mo

Runsite resources, billed by use

Built with

[Full stack](#stack)

app.yourproduct.com 

![SaaS kit dashboard with project, member and storage counters and a bar chart of projects created per day](/templates/saas-kit/overview-light-2560.webp)![SaaS kit dashboard with project, member and storage counters and a bar chart of projects created per day](/templates/saas-kit/overview-dark-2560.webp)

### A dashboard for every workspace

Projects, members and storage counted against the plan limit. The chart of projects per day unlocks on Pro, which shows how a paid feature gate works.

Screenshots use made-up people and companies. Switch the site theme to see the dark mode of the kit.

## A FastAPI and React stack you already know

A typed Python API and a React app in one repository. They build into one Docker image that talks to one PostgreSQL database.

### Backend

* Python 3.12The language of the API
* FastAPIAsync routes, dependencies, OpenAPI docs
* SQLAlchemy 2.0Async ORM, Alembic migrations
* Pydantic v2Request schemas and settings
* PostgreSQLThe only database it needs
* pytestTests against a real database

### Frontend

* React 19The dashboard and the landing page
* TypeScriptTyped API client and components
* ViteDev server and production build
* Tailwind CSS v4Styling with light and dark themes
* shadcn/uiButtons, dialogs, tables, forms
* VitestComponent and translation tests

### Plugs into

* StripeSubscriptions and customer portal
* Lemon SqueezyMerchant of record billing
* CreemMerchant of record billing
* GoogleSign in with Google
* GitHubYour copy of the code
* DockerOne image for API and frontend

## What one click sets up

The deploy copies the kit into a new repository in your GitHub account, creates four services in your Runsite project and connects them. You pay Runsite's normal rates for the services, and nothing for the kit.

* Your own GitHub repository  
The kit is a template repository. The deploy copies it into your GitHub account under the name you pick, and every push to it redeploys the app.  
€0  
Stays in your account if you leave Runsite
* [Web service](/services/web-services)  
Runs the API and serves the React app from one container. Migrations run on every start.  
Variables it fills in

  * `APP_URL`
  * `JWT_SECRET`
  * `BRAND_NAME`  
from €3/mo  
Nano plan. Starter at €5 stays always on and is indexed by search engines
* [PostgreSQL](/services/postgresql)  
Users, organizations, subscriptions, projects and file records.  
Variables it fills in

  * `DATABASE_URL`  
from €3/mo  
Nano plan with daily backups
* [Object storage bucket](/services/s3-storage)  
Uploaded files, avatars and organization logos. The key can read, write and delete.  
Variables it fills in

  * `S3_ENDPOINT_URL`
  * `S3_BUCKET`
  * `S3_ACCESS_KEY_ID`
  * `S3_SECRET_ACCESS_KEY`  
€0  
5 GB included, then €0.025 per GB a month
* [Email service](/services/email)  
Invitations, password resets and notifications. It starts in sandbox mode until you verify a domain.  
Variables it fills in

  * `EMAIL_API_KEY`
  * `EMAIL_FROM`  
€0  
3,000 emails a month included

Total on the smallest plans. New accounts start with €5 of credit for 30 days.

about €6 a month

Exact rates for every plan are on the [pricing page](/pricing).

## What the boilerplate already does

The parts every SaaS needs before the first customer pays, with tests for each of them.

### Accounts

* Email and password, plus Google sign-in when you add its keys
* Email verification and password reset
* Short-lived access tokens, rotating refresh tokens with reuse detection
* Rate limits on every sign-in endpoint

### Organizations

* A personal workspace on sign-up, more on demand
* Owner, admin and member roles
* Invitations by email or a copyable link
* Ownership transfer and a workspace switcher

### Billing

* Stripe, Lemon Squeezy or Creem, picked by one variable
* Plans, limits and trial length defined in code
* Upgrade prompts when a workspace hits a limit
* Signed, idempotent webhooks that retry on failure

### Email and notifications

* Verification, password reset, invitation and notification emails
* HTML templates with a shared layout and a plain-text part
* In-app notifications with read and unread states
* Per-user email preferences; removals and ownership changes always go out

### Files

* Uploads to any S3-compatible bucket, 25 MB per file
* Storage limit per plan, links that expire after 15 minutes
* Avatars and organization logos

### Admin panel

* Revenue, trials, conversion and churn
* Block users, override plans, sign in as a user
* A setup checklist that shows which integrations are configured

app.yourproduct.com/admin 

![Platform admin dashboard with revenue, subscription, trial and churn counters and sign-up charts](/templates/saas-kit/admin-dashboard-light-2560.webp)![Platform admin dashboard with revenue, subscription, trial and churn counters and sign-up charts](/templates/saas-kit/admin-dashboard-dark-2560.webp)

A separate admin panel for whoever runs the app

app.yourproduct.com/admin 

![Admin users table with emails, names, roles, active and blocked statuses and join dates](/templates/saas-kit/admin-users-light-2560.webp)![Admin users table with emails, names, roles, active and blocked statuses and join dates](/templates/saas-kit/admin-users-dark-2560.webp)

Every user and organization in one place

## How it compares to the Full Stack FastAPI Template

The official template from the FastAPI project is a good base for an app with users and a dashboard. We started from the same stack and added the parts you need once you charge money: workspaces, plans and payments.

| Feature              | [Full Stack FastAPI Template](https://github.com/fastapi/full-stack-fastapi-template) | Runsite SaaS starter kit                                                       |
| -------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| Backend              | FastAPI, SQLModel, PostgreSQL                                                         | FastAPI, SQLAlchemy 2.0, PostgreSQL                                            |
| Frontend             | React, Vite, Tailwind CSS, shadcn/ui                                                  | React 19, Vite, Tailwind CSS v4, shadcn/ui                                     |
| Sign-in              | Email and password, JWT, password recovery                                            | The same, plus Google sign-in, email verification and rotating refresh tokens  |
| Teams and roles      | Users and a superuser who manages them                                                | Organizations with owner, admin and member roles, invitations by email or link |
| Subscription billing | Not included                                                                          | Stripe, Lemon Squeezy or Creem, with plans, limits and trials                  |
| File uploads         | Not included                                                                          | S3-compatible storage with a limit per plan                                    |
| Notifications        | Not included                                                                          | In the app and by email, with per-user preferences                             |
| Admin panel          | User management                                                                       | Revenue, trials and churn, blocking users, signing in as a user                |
| Deployment           | FastAPI Cloud, or Docker Compose with Traefik                                         | One click to Runsite, or any host that runs Docker                             |

Based on the official template's README, October 2026.

## An architecture that grows with the product

Every feature goes through the same five layers. The tenth module looks like the first, so the codebase stays readable when the product gets big.

1. Route  
`routers/routes/`  
HTTP endpoints under /orgs/{org\_id}/...
2. Dependencies  
`utils/dependencies.py`  
Current user, membership, role and plan feature checks
3. Service  
`services/`  
Business rules, plan limits, one commit per write
4. Repository  
`repositories/`  
Every query takes the organization first and filters by it
5. Model  
`models/`  
SQLAlchemy tables, Alembic migrations

### Tenants cannot see each other

Data belongs to an organization, and repositories filter by it on every query. Tests for isolation and roles come with the reference module, ready to copy.

### Limits live in one file

Plans, prices, member, project and storage limits are plain Python. Add a limit or a paid feature there and protect a route with require\_feature.

### Configuration is environment variables

Every optional variable switches on one feature. A missing required variable stops the app with one message that names all of them.

### The frontend mirrors the backend

Typed API responses, one service client per module, pages per feature and every string in a translation file. New modules follow the same layout.

## Keep building with Claude Code or Cursor

Open your copy of the repository, describe the feature, and let the agent write it. Sign-in, billing and email are done, so its work goes into the part that makes your product different.

* ### A pattern to copy  
Agents work best when the codebase already shows the answer. Projects goes through every layer, and the README lists each file a new module needs, so the agent has a map instead of guessing.
* ### Tests that catch mistakes  
Backend and frontend tests and linters run with make commands, and the frontend build type-checks everything. The agent can check its own work before you read the diff.
* ### Deploys the agent can follow  
Push to your repository and Runsite rebuilds. Connect the Runsite MCP server and the agent can watch the build, read the logs and fix a failing deploy itself.
[ Connect the Runsite MCP server](/tools/mcp)

your-saas on main

\> Add an invoices module modelled on projects. Invoices belong to an organization; Free gets 20, Pro is unlimited. Copy the isolation and role tests.

Files a new module needs, from the README:

* \+ backend/app/models/invoice.py
* \+ backend/alembic/versions/…\_add\_invoices.py
* \+ backend/app/repositories/invoice\_repository.py
* \+ backend/app/schemas/invoices.py
* \+ backend/app/services/invoice\_service.py
* \+ backend/app/routers/routes/invoices.py
* \+ backend/tests/test\_invoices.py
* \+ frontend/src/services/invoiceService.ts
* \+ frontend/src/pages/app/InvoicesPage.tsx
* \+ frontend/src/i18n/locales/en/invoices.json

$ make test-backend && make lint

An example prompt. The file list follows the kit's own guide to adding a module.

## From click to sign-up page

No configuration before the first deploy. The app works out of the box; billing, Google sign-in and your own email domain come later.

1. ### Click Deploy on Runsite  
Sign in or create an account. New accounts get €5 of credit for 30 days, no card needed.
2. ### Name the project and the repository  
Runsite copies the kit into your GitHub account, creates the four services and sets every environment variable.
3. ### Open the URL and register  
When the first build finishes, the app is live on HTTPS. Sign up, create a project, invite a teammate.
4. ### Switch on what you need  
Add billing keys, Google sign-in or your sender domain as environment variables in the dashboard. Saving redeploys the service.

## The code is yours

The deploy copies the repository into your GitHub account. From then on it is your project: push to it and Runsite rebuilds. The MIT license lets you sell what you build and keep your changes private. Nothing in the code ties it to Runsite; it builds into a standard Docker image.

[ Deploy on Runsite](https://dashboard.runsite.app/templates/ff27d3cf-54c2-4ce3-9359-07be4bc08725)[ github.com/runsite-platform/runsite-saas-kit](https://github.com/runsite-platform/runsite-saas-kit)

### Where to make it yours

Product name

BRAND\_NAME environment variable

Colours, radius, light and dark palettes

frontend/src/index.css

Landing page copy

frontend/src/i18n/locales/en/landing.json

Plans, prices, limits, trial length

backend/app/services/billing/plans.py

Email templates

backend/app/emails/templates/

## Questions

Is the SaaS kit really free? 

Yes. The code is open source under the MIT license, so you can use it for commercial products, change it and keep your changes private. Runsite charges only for the services the app runs on, at the normal rates.

How much does it cost to run? 

On the smallest plans, a web service and a PostgreSQL database cost €3 a month each, so about €6 a month in total. Storage up to 5 GB and 3,000 emails a month are included. New accounts get €5 of credit for 30 days, which covers most of the first month. Nano web services sleep after 14 days without traffic and ask search engines not to index them, so move the web service to Starter (€5 a month) before you launch.

Do I have to host it on Runsite? 

No. The repository builds into a standard Docker image that needs PostgreSQL and an S3-compatible bucket. The one-click deploy saves you from creating and wiring those by hand, but nothing in the code ties it to Runsite.

Which billing providers does it support? 

Stripe, Lemon Squeezy and Creem. You pick one per deployment with the BILLING\_PROVIDER variable and add that provider's keys and price IDs. Until you do, every workspace stays on the Free plan and the billing pages explain how to turn billing on.

Can I change the stack? 

The backend is Python 3.12 with FastAPI and SQLAlchemy 2.0, the frontend is React 19 with TypeScript, Tailwind CSS v4 and shadcn/ui. You can swap anything, but the kit is most useful if you are happy building in that stack.

Can I build on it with Claude Code or Cursor? 

Yes, and the kit is laid out for it. Every feature follows the same layers, the projects module is a complete example to copy, and the README lists each file a new module needs. Point the agent at that, ask for the feature, and run the tests. Connect the Runsite MCP server if you want the agent to follow deploys and read logs too.

How is it different from the Full Stack FastAPI Template? 

Both run FastAPI, PostgreSQL and React. The official template gives you users, a superuser who manages them and an items example. This kit adds organizations with roles, subscription billing through Stripe, Lemon Squeezy or Creem, file uploads, notifications and an admin panel with revenue numbers. For an internal tool the official one is enough. If you plan to charge for the product, start here.

Does it work for a micro SaaS with one user per account? 

Yes. Everyone gets a personal workspace on sign-up, so a single-user product works without touching the team features. Sign-in, payments and email are still there on the first deploy, and the whole thing runs for about €6 a month.

How do I become the admin of my deployment? 

Set SUPERADMIN\_EMAIL to your email in the web service environment. You become superadmin when you register, or at the next start if you already have an account. You can also run the create-superadmin command in the service shell.

## Your app deserves to be online

€5 of credit on signup. Deploy in under a minute. No credit card needed.

[Start deploying](https://dashboard.runsite.app/login)[View documentation](https://docs.runsite.app)

---

Source: https://runsite.app/templates/saas-kit
