<?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: Habib Jutt</title>
    <description>The latest articles on DEV Community by Habib Jutt (@habibjutt).</description>
    <link>https://dev.to/habibjutt</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%2F282846%2Fa1426df1-9336-4eb4-abbc-658a1d1904bc.jpeg</url>
      <title>DEV Community: Habib Jutt</title>
      <link>https://dev.to/habibjutt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/habibjutt"/>
    <language>en</language>
    <item>
      <title>I built a free Next.js SaaS boilerplate because I was tired of rebuilding auth and payments from scratch</title>
      <dc:creator>Habib Jutt</dc:creator>
      <pubDate>Thu, 26 Mar 2026 06:14:01 +0000</pubDate>
      <link>https://dev.to/habibjutt/i-built-a-free-nextjs-saas-boilerplate-because-i-was-tired-of-rebuilding-auth-and-payments-from-4k6f</link>
      <guid>https://dev.to/habibjutt/i-built-a-free-nextjs-saas-boilerplate-because-i-was-tired-of-rebuilding-auth-and-payments-from-4k6f</guid>
      <description>&lt;p&gt;Every SaaS project I started had the same first two weeks: set up authentication, wire up Stripe, build an admin panel, configure emails, create a blog. By the third time around, I decided to just package everything into one starter and open-source it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this is
&lt;/h2&gt;

&lt;p&gt;A production-ready Next.js boilerplate for SaaS applications. It ships with the boring-but-necessary stuff already done so you can focus on the thing that actually makes your product different.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/habibjutt/nextjs_boilerplate" rel="noopener noreferrer"&gt;github.com/habibjutt/nextjs_boilerplate&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Live demo:&lt;/strong&gt; &lt;a href="https://nextjssaas.netlify.app/" rel="noopener noreferrer"&gt;nextjssaas.netlify.app&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the box
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Authentication
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Email/password, Google, GitHub, and Apple sign-in&lt;/li&gt;
&lt;li&gt;Two-factor authentication (TOTP)&lt;/li&gt;
&lt;li&gt;Email verification (toggleable via env var)&lt;/li&gt;
&lt;li&gt;Password reset flow&lt;/li&gt;
&lt;li&gt;Session management&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All powered by &lt;a href="https://www.better-auth.com/" rel="noopener noreferrer"&gt;Better Auth&lt;/a&gt;, which I picked over NextAuth because it handles edge cases around session management more reliably in my experience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Payments
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Stripe integration with subscriptions and one-time payments&lt;/li&gt;
&lt;li&gt;Customer portal for managing billing&lt;/li&gt;
&lt;li&gt;Webhook handling for payment events&lt;/li&gt;
&lt;li&gt;Configurable pricing plans&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Admin dashboard
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User management (view, edit, delete, assign roles)&lt;/li&gt;
&lt;li&gt;Role-based access control with custom roles&lt;/li&gt;
&lt;li&gt;Analytics overview&lt;/li&gt;
&lt;li&gt;Activity logs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Blog CMS
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;MDX-powered content&lt;/li&gt;
&lt;li&gt;Categories and tags&lt;/li&gt;
&lt;li&gt;SEO metadata per post&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Other stuff
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;50+ UI components (shadcn/ui)&lt;/li&gt;
&lt;li&gt;Dark mode&lt;/li&gt;
&lt;li&gt;Transactional emails via React Email + Resend&lt;/li&gt;
&lt;li&gt;Full SEO setup with structured data&lt;/li&gt;
&lt;li&gt;Responsive design, mobile-first&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tech stack
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Tech&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Framework&lt;/td&gt;
&lt;td&gt;Next.js 16 (App Router)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language&lt;/td&gt;
&lt;td&gt;TypeScript&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Database&lt;/td&gt;
&lt;td&gt;PostgreSQL + Prisma ORM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Styling&lt;/td&gt;
&lt;td&gt;Tailwind CSS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UI&lt;/td&gt;
&lt;td&gt;shadcn/ui + Radix&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Auth&lt;/td&gt;
&lt;td&gt;Better Auth&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Payments&lt;/td&gt;
&lt;td&gt;Stripe&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Email&lt;/td&gt;
&lt;td&gt;React Email + Resend&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Getting started
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/habibjutt/nextjs_boilerplate.git
&lt;span class="nb"&gt;cd &lt;/span&gt;nextjs_boilerplate
npm &lt;span class="nb"&gt;install
cp&lt;/span&gt; .env.example .env
&lt;span class="c"&gt;# Fill in your env vars (Stripe keys, database URL, etc.)&lt;/span&gt;
npx prisma migrate dev
npm run dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;.env.example&lt;/code&gt; file has comments explaining each variable. Most features can be toggled on or off through environment variables - for example, you can disable email verification or two-factor auth with a single flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I'm sharing this
&lt;/h2&gt;

&lt;p&gt;I built this primarily for myself, but figured it might save other people some time too. It's MIT licensed with no premium tier or gated features.&lt;/p&gt;

&lt;p&gt;If you try it out, I'd appreciate feedback. And if you find it useful, a GitHub star helps with visibility.&lt;/p&gt;

&lt;p&gt;Contributions are welcome - whether it's bug fixes, new features, or just pointing out something that could be better.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Links:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/habibjutt/nextjs_boilerplate" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://nextjssaas.netlify.app/" rel="noopener noreferrer"&gt;Live Demo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>opensource</category>
      <category>nextjs</category>
      <category>react</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
