<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Qasim</title>
    <description>The latest articles on DEV Community by Qasim (@qasim_8479dc2df7dd9776c1f).</description>
    <link>https://dev.to/qasim_8479dc2df7dd9776c1f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3867397%2Fc0da2ff8-9dca-4706-a538-797914f74411.png</url>
      <title>DEV Community: Qasim</title>
      <link>https://dev.to/qasim_8479dc2df7dd9776c1f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/qasim_8479dc2df7dd9776c1f"/>
    <language>en</language>
    <item>
      <title>How I Built a Production-Ready Next.js SaaS Boilerplate You Can Actually Use</title>
      <dc:creator>Qasim</dc:creator>
      <pubDate>Fri, 10 Apr 2026 14:19:29 +0000</pubDate>
      <link>https://dev.to/qasim_8479dc2df7dd9776c1f/how-i-built-a-production-ready-nextjs-saas-boilerplate-you-can-actually-use-51mh</link>
      <guid>https://dev.to/qasim_8479dc2df7dd9776c1f/how-i-built-a-production-ready-nextjs-saas-boilerplate-you-can-actually-use-51mh</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6n9ec743ridgirfmg4s5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6n9ec743ridgirfmg4s5.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Every side project I've started in the last two years began the same way.&lt;br&gt;
Open VS Code. Create a new Next.js app. Start wiring up authentication.&lt;br&gt;
Three days later I'm debugging a NextAuth callback, Stripe webhooks aren't firing, and I haven't touched the actual idea I was excited about. The setup tax is real — and it quietly kills more projects than bad ideas ever do.&lt;br&gt;
So I stopped starting products and started building the foundation I kept rebuilding. This is what I learned, what I built, and why I made the decisions I did.&lt;/p&gt;

&lt;h2&gt;
  
  
  The stack
&lt;/h2&gt;

&lt;p&gt;No exotic choices here. Everything is boring on purpose.&lt;/p&gt;

&lt;p&gt;Next.js 14 (App Router) — stable, well-documented, widely understood&lt;br&gt;
NextAuth v5 — handles OAuth + credentials auth without reinventing the wheel&lt;br&gt;
Prisma — type-safe ORM that plays nicely with the App Router&lt;br&gt;
Stripe — payments and webhooks, subscription-ready&lt;br&gt;
React Email + Resend — transactional emails that actually land in the inbox&lt;br&gt;
MySQL — straightforward, production-proven, no surprises&lt;br&gt;
Tailwind CSS — utility-first, fast to build with&lt;br&gt;
TypeScript throughout&lt;/p&gt;

&lt;p&gt;The companion Express REST API boilerplate runs alongside it for projects that need a separate backend:&lt;/p&gt;

&lt;p&gt;Express + TypeScript&lt;br&gt;
JWT auth (access + refresh tokens)&lt;br&gt;
Prisma (shared schema pattern)&lt;br&gt;
Zod — request validation that doubles as documentation&lt;br&gt;
Winston — structured logging&lt;br&gt;
Vitest + Supertest — integration tests out of the box&lt;/p&gt;

&lt;h2&gt;
  
  
  Key decisions I had to make
&lt;/h2&gt;

&lt;p&gt;App Router, not Pages Router&lt;br&gt;
This was the easy call. Pages Router is legacy at this point. App Router has better support for server components, layouts, and loading states. The learning curve is real but the patterns are worth adopting now.&lt;br&gt;
NextAuth v5, not v4&lt;br&gt;
v5 is a near-complete rewrite. The config is cleaner, Edge runtime support is better, and it's where the project is heading. I hit a few rough edges during the build but nothing that wasn't solvable — and the result is cleaner than v4 ever was.&lt;br&gt;
Separate API boilerplate instead of Route Handlers only&lt;br&gt;
You could handle everything through Next.js Route Handlers. For simple projects, that's fine. But a lot of real-world SaaS products eventually need a standalone API — for mobile clients, third-party integrations, or just keeping concerns separated. I bundled both so you can start with one and grow into the other without changing your assumptions.&lt;br&gt;
Prisma over raw SQL or Drizzle&lt;br&gt;
Drizzle is worth watching. But Prisma has better tooling, better documentation, and a larger community right now. For a boilerplate meant to reduce friction, Prisma was the right call.&lt;br&gt;
JWT with refresh tokens, not sessions only&lt;br&gt;
Sessions are simpler. But if you're building anything that needs a mobile client or a public API, you'll want token-based auth. I implemented both access tokens (short-lived) and refresh tokens (long-lived, stored securely) so you don't have to bolt this on later.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually included
&lt;/h2&gt;

&lt;p&gt;This isn't a starter template. It's a working application with all the plumbing done.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication
&lt;/h2&gt;

&lt;p&gt;Email/password login with hashed passwords&lt;br&gt;
OAuth (Google ready to enable)&lt;br&gt;
Protected routes and middleware&lt;br&gt;
Session management&lt;/p&gt;

&lt;h2&gt;
  
  
  Payments
&lt;/h2&gt;

&lt;p&gt;Stripe Checkout integration&lt;br&gt;
Webhook handler (signature verified)&lt;br&gt;
Subscription status synced to the database&lt;br&gt;
Customer portal link&lt;/p&gt;

&lt;h2&gt;
  
  
  Email
&lt;/h2&gt;

&lt;p&gt;Welcome email on signup&lt;br&gt;
Password reset flow&lt;br&gt;
React Email templates (easy to customise)&lt;br&gt;
Resend as the transport (swap it for any SMTP provider)&lt;/p&gt;

&lt;h2&gt;
  
  
  Database
&lt;/h2&gt;

&lt;p&gt;Prisma schema with User, Account, Session, and Subscription models&lt;br&gt;
Migration files included&lt;br&gt;
Seed script for local development&lt;/p&gt;

&lt;p&gt;Developer experience&lt;/p&gt;

&lt;p&gt;TypeScript strict mode&lt;br&gt;
ESLint + Prettier configured&lt;br&gt;
Environment variable validation on startup&lt;br&gt;
Detailed README with setup steps that actually work&lt;/p&gt;

&lt;h2&gt;
  
  
  What I left out (on purpose)
&lt;/h2&gt;

&lt;p&gt;No admin dashboard. No analytics integration. No multi-tenancy pattern.&lt;br&gt;
Not because those aren't useful — but because every project needs them differently. The boilerplate handles the parts that are almost always identical. The parts that vary by product, I left for you to build.&lt;/p&gt;

&lt;h2&gt;
  
  
  The honest part
&lt;/h2&gt;

&lt;p&gt;This took longer than I expected. NextAuth v5 had some edge cases that weren't well-documented. Getting Stripe webhooks to behave locally (Stripe CLI is your friend) took a few hours. The React Email setup is cleaner than I thought it would be — that was a pleasant surprise.&lt;br&gt;
But the end result is something I genuinely wish had existed when I started. I've already used it to spin up a new project and the difference is significant — working on actual features on day one instead of debugging OAuth flows on day four.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to get it
&lt;/h2&gt;

&lt;p&gt;I packaged both boilerplates together as the Indie Dev Starter Kit — available on Gumroad for $49.&lt;br&gt;
You get the full source code for both the Next.js SaaS boilerplate and the Express REST API boilerplate, plus documentation covering setup, environment variables, deployment, and customisation.&lt;br&gt;
If you're an indie dev, a freelancer who keeps spinning up similar projects, or someone who just wants to stop rebuilding the same foundation — it's at [&lt;a href="https://muhammadqasim897.gumroad.com/l/uuhtsw" rel="noopener noreferrer"&gt;https://muhammadqasim897.gumroad.com/l/uuhtsw&lt;/a&gt;].&lt;br&gt;
Happy to answer questions in the comments about any of the stack decisions.&lt;/p&gt;

&lt;p&gt;Built with Next.js 14, NextAuth v5, Prisma, Stripe, React Email, and TypeScript.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>typescript</category>
      <category>webdev</category>
      <category>indiehackers</category>
    </item>
    <item>
      <title>I got tired of rebuilding the same SaaS boilerplate — so I packaged it into a kit</title>
      <dc:creator>Qasim</dc:creator>
      <pubDate>Wed, 08 Apr 2026 09:20:23 +0000</pubDate>
      <link>https://dev.to/qasim_8479dc2df7dd9776c1f/i-got-tired-of-rebuilding-the-same-saas-boilerplate-so-i-packaged-it-into-a-kit-om1</link>
      <guid>https://dev.to/qasim_8479dc2df7dd9776c1f/i-got-tired-of-rebuilding-the-same-saas-boilerplate-so-i-packaged-it-into-a-kit-om1</guid>
      <description>&lt;p&gt;Every time I started a new SaaS project, I wasted 2+ days on the same setup.&lt;/p&gt;

&lt;p&gt;Not building features. Not solving problems. Just... setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pain
&lt;/h2&gt;

&lt;p&gt;Here's what every new project looked like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install and configure NextAuth (always breaks something)&lt;/li&gt;
&lt;li&gt;Wire up Stripe webhooks (never works first try)&lt;/li&gt;
&lt;li&gt;Set up Prisma schema from scratch&lt;/li&gt;
&lt;li&gt;Build Express API boilerplate again&lt;/li&gt;
&lt;li&gt;Configure email system&lt;/li&gt;
&lt;li&gt;Set up TypeScript + Tailwind&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By day 3 I hadn't written a single line of actual product code.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;

&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I packaged everything I kept reusing into the &lt;strong&gt;Indie Dev Starter Kit&lt;/strong&gt; — a complete boilerplate bundle for indie developers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Next.js SaaS Boilerplate includes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;NextAuth v5 — Google OAuth + email/password auth&lt;/li&gt;
&lt;li&gt;Stripe subscriptions + webhook handling&lt;/li&gt;
&lt;li&gt;Prisma ORM + full database schema&lt;/li&gt;
&lt;li&gt;React Email templates&lt;/li&gt;
&lt;li&gt;Dashboard + billing page&lt;/li&gt;
&lt;li&gt;TypeScript + Tailwind CSS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Express REST API Boilerplate includes:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Clean route structure&lt;/li&gt;
&lt;li&gt;JWT authentication middleware&lt;/li&gt;
&lt;li&gt;Error handling&lt;/li&gt;
&lt;li&gt;Zod validation&lt;/li&gt;
&lt;li&gt;Vitest + Supertest test setup&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The result
&lt;/h2&gt;

&lt;p&gt;Instead of spending 2 days on setup, you clone the repo, add your credentials to &lt;code&gt;.env&lt;/code&gt;, and start building your actual product.&lt;/p&gt;

&lt;p&gt;That's it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who this is for
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Indie developers starting a new SaaS&lt;/li&gt;
&lt;li&gt;Solo founders who want to ship fast&lt;/li&gt;
&lt;li&gt;Developers tired of rebuilding the same stack&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where to get it
&lt;/h2&gt;

&lt;p&gt;Available on Gumroad — early bird discount active now.&lt;/p&gt;

&lt;p&gt;[&lt;a href="https://muhammadqasim897.gumroad.com/l/uuhtsw" rel="noopener noreferrer"&gt;https://muhammadqasim897.gumroad.com/l/uuhtsw&lt;/a&gt;]&lt;/p&gt;

&lt;p&gt;Have you built your own boilerplate or do you start from scratch every time? Would love to hear how others handle this in the comments.&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
