next-shrey
v7.5.0
Published
A CLI tool to quickly scaffold a Next.js project with shadcn , Prisma ORM, Tailwind CSS, or daisy ui and tanstack query.
Downloads
26
Maintainers
Readme
🚀 Next.js Fullstack Starter CLI
A custom project scaffolding CLI that bootstraps a full-featured Next.js 15 app with:
- ⚡ TypeScript + App Router + Src Dir
- 🎨 TailwindCSS + shadcn/ui components
- 🌓 Dark/Light mode via
next-themes - 📦 Prisma ORM (with singleton client setup)
- ✅ Zod validation + React Hook Form
- 🔔 Sonner for beautiful toast notifications
- 🏗️ Preconfigured folder structure (
hooks,lib,providers,schemas,server,actions)
This CLI saves hours by automating the setup of a modern fullstack stack.
📖 Features
- Prompts for project name.
- Runs
create-next-appwith TypeScript, Tailwind, ESLint, App Router, and custom alias. - Installs Prisma, next-themes, react-icons, shadcn/ui, sonner.
- Initializes Prisma with singleton client (
src/lib/prisma.ts). - Adds ThemeProvider (
src/providers/theme-provider.tsx). - Adds form validation schema with Zod (
src/schemas/index.ts). - Creates a sample form on
src/app/page.tsx. - Injects ThemeProvider and Sonner Toaster into
layout.tsx. - Prepares a starter project structure for scalable apps.
⚙️ Installation
Clone or copy this repo, then make the script executable:
Node:
npx next-shrey🛠️ What It Does
Prompts for project name.
Bootstraps a Next.js app using:
npx create-next-app@latest my-app --typescript --tailwind --eslint --app --src-dir --import-alias "@/*"Installs dependencies:
npm install next-themes react-icons npm install prisma --save-dev npm install @prisma/clientInitializes Prisma:
npx prisma initSets up shadcn/ui:
npx shadcn@latest init npx shadcn@latest add button form input label sonner cardCreates folders:
src/ ├── hooks ├── lib ├── providers ├── server ├── actions └── schemasAdds ThemeProvider, Prisma Client singleton, Zod schema, and replaces the homepage with a working form.
📝 Usage
After running the CLI:
cd your-project-name
npx prisma db push # Sync schema with your database
npm run dev # Start development serverThen open:
You’ll see a welcome page with a working form, validation, and toast notifications.
📂 Project Structure
src/
├── actions/ # Server actions
├── app/ # Next.js app router
│ ├── layout.tsx # Wrapped with ThemeProvider + Toaster
│ └── page.tsx # Example form page
├── hooks/ # Custom React hooks
├── lib/ # Prisma client & utilities
│ └── prisma.ts
├── providers/ # Context providers
│ └── theme-provider.tsx
├── schemas/ # Zod validation schemas
│ └── index.ts
└── server/ # Backend logic🎉 Example Form
- Uses React Hook Form + Zod
- Shows toast notifications with Sonner
- Example fields:
username,email
🔮 Next Steps
Add more shadcn/ui components with:
npx shadcn@latest add [component]Define your Prisma schema in
prisma/schema.prismaRun migrations:
npx prisma migrate devExtend
src/schemas/with more validation logicAdd new pages & API routes
✅ Done!
Your Next.js fullstack app is ready in minutes.
cd my-app
npm run devHappy coding! 🎉
