<?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: Mohammed Samrose</title>
    <description>The latest articles on DEV Community by Mohammed Samrose (@mohammedsamrose).</description>
    <link>https://dev.to/mohammedsamrose</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%2F3863339%2F36c6317c-f893-42d5-881f-f3137c0cd445.jpeg</url>
      <title>DEV Community: Mohammed Samrose</title>
      <link>https://dev.to/mohammedsamrose</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohammedsamrose"/>
    <language>en</language>
    <item>
      <title>I Built a CLI to Scaffold Next.js Apps with Any Stack — No More Boilerplate Hell</title>
      <dc:creator>Mohammed Samrose</dc:creator>
      <pubDate>Mon, 06 Apr 2026 07:37:03 +0000</pubDate>
      <link>https://dev.to/mohammedsamrose/i-built-a-cli-to-scaffold-nextjs-apps-with-any-stack-no-more-boilerplate-hell-45c9</link>
      <guid>https://dev.to/mohammedsamrose/i-built-a-cli-to-scaffold-nextjs-apps-with-any-stack-no-more-boilerplate-hell-45c9</guid>
      <description>&lt;p&gt;Every time I started a new Next.js project, I found myself doing the same thing: installing Prisma, wiring up NextAuth, setting up Zustand, configuring tRPC, and copy-pasting Docker files from my last project. It's not hard work — it's &lt;em&gt;tedious&lt;/em&gt; work. And after doing it for the fifth time, I decided to stop.&lt;/p&gt;

&lt;p&gt;That's how &lt;strong&gt;&lt;a href="https://www.npmjs.com/package/create-samrose-app" rel="noopener noreferrer"&gt;create-samrose-app&lt;/a&gt;&lt;/strong&gt; was born — an opinionated CLI that scaffolds a fully configured Next.js project with your exact stack choices, all in a single command.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem with Boilerplate
&lt;/h2&gt;

&lt;p&gt;Most Next.js starters fall into one of two traps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Too opinionated&lt;/strong&gt; — you're locked into one ORM, one auth library, one everything. Swap anything out and you're on your own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Too bare&lt;/strong&gt; — you get a blank canvas with zero integrations, and you're back to manually wiring things up.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What I wanted was something in the middle: a CLI that &lt;em&gt;asks&lt;/em&gt; what I want, then builds it — correctly wired, production-ready, no leftover config to clean up.&lt;/p&gt;




&lt;h2&gt;
  
  
  What create-samrose-app Does
&lt;/h2&gt;

&lt;p&gt;Run a single command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-samrose-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you get an interactive prompt that walks you through your stack:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;? Project name › my-app
? Select ORM › Prisma
? Select Database › PostgreSQL
? Select Auth › NextAuth
? Select UI Library › shadcn/ui
? Select State Management › Zustand
? Select API Layer › tRPC
? Select Testing › Vitest
? Extras › Docker, GitHub Actions, Husky
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that's it. Your project is scaffolded, every piece talking to every other piece, ready for &lt;code&gt;npm run dev&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  What's Supported
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ORM
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prisma&lt;/strong&gt; — schema-first, great DX, strong TypeScript support&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drizzle&lt;/strong&gt; — lightweight, SQL-like syntax, gaining fast adoption&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TypeORM&lt;/strong&gt; — decorator-based, familiar if you're coming from the Java/Spring world&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mongoose&lt;/strong&gt; — for MongoDB-native workflows&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Database
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL&lt;/li&gt;
&lt;li&gt;MySQL&lt;/li&gt;
&lt;li&gt;SQLite&lt;/li&gt;
&lt;li&gt;MongoDB&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NextAuth&lt;/strong&gt; — the community standard for Next.js auth&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Clerk&lt;/strong&gt; — drop-in auth with UI components&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JWT&lt;/strong&gt; — roll your own, full control&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  State Management
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Zustand&lt;/li&gt;
&lt;li&gt;Redux&lt;/li&gt;
&lt;li&gt;Recoil&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  API Layer
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;tRPC&lt;/strong&gt; — end-to-end typesafe APIs, no REST or GraphQL schema boilerplate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;oRPC&lt;/strong&gt; — a newer alternative worth watching&lt;/li&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Testing
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Jest&lt;/li&gt;
&lt;li&gt;Vitest&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Extras
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Docker — containerize from day one&lt;/li&gt;
&lt;li&gt;GitHub Actions — CI/CD out of the box&lt;/li&gt;
&lt;li&gt;Husky — pre-commit hooks for lint and type checks&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How It Works Under the Hood
&lt;/h2&gt;

&lt;p&gt;The CLI is built with &lt;strong&gt;Node.js&lt;/strong&gt; and uses a prompt-driven approach to collect your choices. Based on your selections, it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copies a base Next.js template&lt;/li&gt;
&lt;li&gt;Conditionally injects the right dependencies into &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Scaffolds config files (e.g., &lt;code&gt;prisma/schema.prisma&lt;/code&gt;, &lt;code&gt;drizzle.config.ts&lt;/code&gt;, &lt;code&gt;auth.ts&lt;/code&gt;, &lt;code&gt;trpc/router.ts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Wires integrations together — for example, if you pick tRPC + Prisma + PostgreSQL, the router already has a database client initialized&lt;/li&gt;
&lt;li&gt;Sets up extras like &lt;code&gt;Dockerfile&lt;/code&gt;, &lt;code&gt;.github/workflows/ci.yml&lt;/code&gt;, and &lt;code&gt;.husky/pre-commit&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every combination is tested to work together — you're not getting a patchwork of copy-pasted snippets.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Real Example
&lt;/h2&gt;

&lt;p&gt;Say you pick: &lt;strong&gt;Drizzle + PostgreSQL + Clerk + tRPC + Zustand + Vitest + Docker&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You'll get:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;my-app/
├── src/
│   ├── app/              # Next.js App Router
│   ├── server/
│   │   ├── db/           # Drizzle schema + client
│   │   └── api/          # tRPC routers
│   ├── store/            # Zustand stores
│   └── middleware.ts     # Clerk auth middleware
├── drizzle.config.ts
├── .env.example          # All required env vars listed
├── Dockerfile
└── vitest.config.ts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;.env.example&lt;/code&gt; is pre-populated with every variable your stack needs — no hunting through docs to figure out what's required.&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Not Just Use create-t3-app?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://create.t3.gg/" rel="noopener noreferrer"&gt;T3 Stack&lt;/a&gt; is excellent and was a big inspiration. But it's tightly coupled to its own set of choices (tRPC + Prisma + NextAuth + Tailwind). If you want Drizzle instead of Prisma, or Clerk instead of NextAuth, or Zustand instead of nothing — you're doing manual surgery.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;create-samrose-app&lt;/code&gt; is built around flexibility. Every layer of the stack is a choice, and every combination is first-class.&lt;/p&gt;




&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx create-samrose-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;📦 npm: &lt;a href="https://www.npmjs.com/package/create-samrose-app" rel="noopener noreferrer"&gt;npmjs.com/package/create-samrose-app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 Docs: &lt;a href="https://csa.mohammedsamrose.com.np" rel="noopener noreferrer"&gt;csa.mohammedsamrose.com.np&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💻 GitHub: &lt;a href="https://github.com/samrosemohammed/create-samrose-app" rel="noopener noreferrer"&gt;github.com/samrosemohammed/create-samrose-app&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;p&gt;There are a few things on the roadmap:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Payload CMS&lt;/strong&gt; integration for headless CMS setups&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Turborepo&lt;/strong&gt; support for monorepo scaffolding&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storybook&lt;/strong&gt; as an extras option&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;--yes&lt;/code&gt; flag for non-interactive scaffolding with defaults&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you try it and hit something broken, or have a stack combination you'd love to see supported, open an issue on GitHub. PRs are welcome too — the more combinations that get tested in the wild, the better.&lt;/p&gt;




&lt;p&gt;Building &lt;code&gt;create-samrose-app&lt;/code&gt; saved me hours on every new project. Hopefully it does the same for you.&lt;/p&gt;

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