Next.js SaaS boilerplate: buy or build your own?
Every SaaS needs auth, payments, email, a database and tests before its first real feature ships. When a ready-made boilerplate saves time, and how to spot a good one.
Updated 10 November 20263 min read
Every SaaS product needs the same foundation before it gets the first feature customers pay for: sign-in, payments, email, a database, legal pages, tests and a deployment. A boilerplate or starter kit delivers that foundation wired together. Whether it's worth it depends less on the price than on your project.
What a SaaS foundation includes
- Auth: email and password, magic links or Google sign-in, password reset, email change, account deletion
- Payments: checkout, subscriptions and one-time purchases, a customer portal, and signed, idempotent webhooks
- Email: welcome, sign-in links, receipts and failed-payment notices
- A database with migrations and seed data
- A marketing site with pricing, FAQ, blog, SEO basics and legal pages
- A dashboard with settings and billing
- Tests and a CI pipeline that runs on every change
- Where needed: several languages, data export and account deletion for your users
None of these is hard on its own. Together they take time, and mistakes in them are expensive: an insecure sign-in or a webhook that loses payments often only shows up once real customers are affected.
When a boilerplate pays off
- You want to get an idea in front of real customers quickly and spend your time on the feature that matters.
- Your product is a typical SaaS: accounts, subscriptions or one-time purchases, a dashboard and a marketing site.
- You build for clients and want the same solid foundation for every project.
- You want to see what an experienced structure looks like and learn from it.
When to build it yourself
- The goal is to learn exactly these parts yourself.
- Your product doesn't fit the usual pattern, for example an unusual data model, multi-tenancy with single sign-on for enterprise customers, or a different architecture.
- You already have a codebase the kit wouldn't fit into.
- Your team is committed to a different stack.
What to check before you buy
| Criterion | What to look for |
|---|---|
| Licence | How many projects? Can you build client projects? What is forbidden to redistribute? |
| Freshness | Current Next.js and React versions, visible updates and a way to get them |
| Code quality | TypeScript throughout, tests for auth and payments, a clear structure |
| Payments | Signed, idempotent webhooks and the billing models you need |
| Auth | A widely used library, the sign-in methods you want, and account deletion |
| Privacy | No tracking cookies by default, self-hosted fonts, data export |
| Documentation | Quick setup and a guide all the way to launch |
| Dependencies | Can services such as email delivery or hosting be swapped? |
A simple calculation
Compare the price with the time you would need yourself. An example with assumed figures: if you value your time at €60 an hour and need 40 hours for sign-in, Stripe subscriptions with webhooks, email and tests, that's €2,400. Add maintenance whenever frameworks and libraries release new versions. Plug in your own numbers: what matters is how many hours the kit really saves in your project.
After buying: making the kit your product
- Set it up locally and run the included tests.
- Change the name, colours, copy and legal pages.
- Create your own payment and email provider accounts and add the keys.
- Build your first own feature, with tests, before going live.
- Pull in kit updates regularly while your code is still close to the original.
Our Next.js SaaS starter kits share the same foundation and suit different products: Cairn for creators and founders selling digital products, Aven for subscription SaaS with an extra shop, and Fjord for B2B SaaS with a docs portal and AI assistant. Our learning product Devventura is built on Cairn.