What is SaaS Boilerplate?
SaaS Boilerplate is an open-source web application starter codebase from Async Labs (the team behind Builder Book and Async) that saves development time by pre-implementing the common features every SaaS product needs. It takes your product-specific business logic as input and produces a production-ready app and API server, covering authentication, billing, teams, and file uploads out of the box. The project is written in TypeScript and runs on a Next.js, Express, React, and MongoDB stack, with the official repository containing separate app, api, and lambda deployment folders.
Key Features
- User authentication — Google OAuth API and passwordless login, with cookie- and session-based auth handled by Express.
- Stripe subscriptions — subscribe or unsubscribe a team to a plan, update card details, and verify Stripe webhooks for failed subscription payments.
- Team management — create teams, invite team members, and manage team and user settings from dedicated pages.
- Email integrations — transactional emails via AWS SES (welcome, team invitation, payment) and newsletter list updates via Mailchimp for new and paying users.
- File uploads — pre-signed request upload, load, and deletion on AWS S3 for posts, team profile, and user profile images.
- Real-time features — websockets powered by socket.io v3 for live discussion updates.
- Opinionated architecture — server-side rendering with Material-UI, a withAuth higher-order component for route protection, and a custom logger that controls what is printed in production.
- Reusable components — ActiveLink, Confirm, Notifier, MenuWithLinks, and other common React components are included.
The tech stack on the page is explicitly React, Material-UI, Next, MobX, Express, Mongoose, MongoDB, and TypeScript, with Google Analytics for tracking.
Who is it for?
- SaaS founders — start your MVP with billing, teams, and authentication already implemented, so you can focus on your differentiator.
- Full-stack developers — learn or reuse a production-ready codebase with clear separation between the app (Next/Express) and api (Express) servers.
- Startups building internal tools — the team, invitation, and discussion components can be adapted for urgent vs. non-urgent team communication, as Async Labs did with their own product.
- Job board owners — workinbiotech.com was built from this boilerplate, showing it can power niche job boards with team and file upload features.
What can you do with SaaS Boilerplate?
- Build a team communication tool — the built-in discussions, posts, and websockets let you create async-first messaging, as Async Labs did with Async.
- Launch a job board — workinbiotech.com used the boilerplate to add job listings, resumes, and company profiles for biotech startups.
- Publish documentation or books — Builder Book is built on the same codebase and demonstrates publishing long-form content with markdown and HTML views.
- Create a content save-and-annotate app — Retaino, listed in the showcase, saves and annotates web content using the boilerplate foundation.
How does SaaS Boilerplate work?
The repository has an app folder (Next.js frontend/SSR) and an api folder (Express REST API). To run locally, create a .env file in api based on .env.example, set MongoDB, Google OAuth, AWS SES/S3, Mailchimp, and Stripe keys, then run yarn dev in api and app. The lambda folder symlinks the api directory and provides a serverless.yml for AWS Lambda deployment; Heroku and Elastic Beanstalk instructions are covered in the companion book.
Pros and cons
- Pros: open-source MIT license, uses TypeScript, includes Stripe billing, AWS SES/S3, Mailchimp, Google OAuth, and passwordless auth, and separates app and api for scalability.
- Cons: requires setting up and paying for external services (AWS, Stripe, MongoDB) and configuring multiple environment variables; the project is not actively maintained as a commercial product, with updates coming from the open-source community.
Pricing
The boilerplate itself is free and open-source under the MIT License. The associated Builder Book course is a paid product sold at builderbook.org, but the code in the saas folder is freely available.
FAQ
Is SaaS Boilerplate free?
Yes, the code in the repository is released under the MIT License, so you can use and modify it freely, even for commercial projects. The optional Builder Book guide is a separate paid product.
What stack does SaaS Boilerplate use?
It uses React, Material-UI, Next.js, MobX, Express, Mongoose, MongoDB, and TypeScript. The app server handles server-side rendering and the API server handles data processing.
Does it include subscription billing?
Yes, billing is built in with Stripe: you can subscribe and unsubscribe a team, update card info, and handle failed payment webhooks.
How do I run it locally?
After cloning the repo, create a .env file in the api folder with your MongoDB, Google OAuth, AWS, Mailchimp, and Stripe keys, then run yarn install and yarn dev in both the api and app folders. Detailed instructions are in the README.
