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 tedious work. And after doing it for the fifth time, I decided to stop.
That's how create-samrose-app was born — an opinionated CLI that scaffolds a fully configured Next.js project with your exact stack choices, all in a single command.
The Problem with Boilerplate
Most Next.js starters fall into one of two traps:
- Too opinionated — you're locked into one ORM, one auth library, one everything. Swap anything out and you're on your own.
- Too bare — you get a blank canvas with zero integrations, and you're back to manually wiring things up.
What I wanted was something in the middle: a CLI that asks what I want, then builds it — correctly wired, production-ready, no leftover config to clean up.
What create-samrose-app Does
Run a single command:
npx create-samrose-app
Then you get an interactive prompt that walks you through your stack:
? 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
And that's it. Your project is scaffolded, every piece talking to every other piece, ready for npm run dev.
What's Supported
ORM
- Prisma — schema-first, great DX, strong TypeScript support
- Drizzle — lightweight, SQL-like syntax, gaining fast adoption
- TypeORM — decorator-based, familiar if you're coming from the Java/Spring world
- Mongoose — for MongoDB-native workflows
Database
- PostgreSQL
- MySQL
- SQLite
- MongoDB
Authentication
- NextAuth — the community standard for Next.js auth
- Clerk — drop-in auth with UI components
- JWT — roll your own, full control
State Management
- Zustand
- Redux
- Recoil
API Layer
- tRPC — end-to-end typesafe APIs, no REST or GraphQL schema boilerplate
- oRPC — a newer alternative worth watching
- GraphQL
- REST
Testing
- Jest
- Vitest
Extras
- Docker — containerize from day one
- GitHub Actions — CI/CD out of the box
- Husky — pre-commit hooks for lint and type checks
How It Works Under the Hood
The CLI is built with Node.js and uses a prompt-driven approach to collect your choices. Based on your selections, it:
- Copies a base Next.js template
- Conditionally injects the right dependencies into
package.json - Scaffolds config files (e.g.,
prisma/schema.prisma,drizzle.config.ts,auth.ts,trpc/router.ts) - Wires integrations together — for example, if you pick tRPC + Prisma + PostgreSQL, the router already has a database client initialized
- Sets up extras like
Dockerfile,.github/workflows/ci.yml, and.husky/pre-commit
Every combination is tested to work together — you're not getting a patchwork of copy-pasted snippets.
A Real Example
Say you pick: Drizzle + PostgreSQL + Clerk + tRPC + Zustand + Vitest + Docker.
You'll get:
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
The .env.example is pre-populated with every variable your stack needs — no hunting through docs to figure out what's required.
Why Not Just Use create-t3-app?
T3 Stack 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.
create-samrose-app is built around flexibility. Every layer of the stack is a choice, and every combination is first-class.
Try It
npx create-samrose-app
- 📦 npm: npmjs.com/package/create-samrose-app
- 🌐 Docs: csa.mohammedsamrose.com.np
- 💻 GitHub: github.com/samrosemohammed/create-samrose-app
What's Next
There are a few things on the roadmap:
- Payload CMS integration for headless CMS setups
- Turborepo support for monorepo scaffolding
- Storybook as an extras option
- A
--yesflag for non-interactive scaffolding with defaults
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.
Building create-samrose-app saved me hours on every new project. Hopefully it does the same for you.
Top comments (0)