create-stackit
v0.1.0
Published
Pragmatic React/Next.js starter generator with curated, production-grade templates
Maintainers
Readme
create-stackit
Pragmatic React / Next.js starter generator. Answer a few questions and get a production-ready project with your exact stack — no manual wiring required.
Quick start
npm create stackit@latest
# or
npx create-stackit
# or pass a project name directly
npx create-stackit my-appThe CLI walks you through every choice interactively.
What gets generated
Each project is assembled from one of 16 curated templates covering every combination of the four axes below, then enriched by whichever add-ons you select.
| Axis | Options | |---|---| | Framework | Vite + React · Next.js | | Language | TypeScript · JavaScript | | State | Zustand · Redux Toolkit | | UI | shadcn/ui + Tailwind · Material UI |
Folder structure
| Style | Layout |
|---|---|
| Modular (default) | src/features/<name>/ — self-contained feature modules |
| Atomic | src/components/atoms / molecules / organisms / templates |
Add-ons (toggle at prompt time)
| Add-on | What it injects |
|---|---|
| TanStack Query | QueryClient, useApiQuery, useApiMutation hooks |
| Axios | Pre-configured api client with auth + error interceptors |
| react-hook-form + zod | Form library wired with a zod resolver |
| react-hot-toast | <AppToaster> component + API-error event bridge |
| Vitest + RTL | Test scripts, jsdom environment, @testing-library deps |
| ESLint + Prettier | Lint/format scripts, eslint-config-prettier |
| Custom hooks | useDebounce, useThrottle, useToggle, usePrevious |
| Auth boilerplate | Scaffold for JWT + refresh token flow |
CLI flags
Every prompt can be pre-answered with a flag — the CLI skips those questions and goes straight to the rest.
Usage: create-stackit [project-name] [options]
Arguments:
project-name name of the project directory
Options:
-f, --framework <fw> vite | next
-l, --language <lang> ts | js
-s, --state <state> zustand | redux
-u, --ui <ui> shadcn | mui
--structure <s> atomic | modular
--pm <pm> npm | pnpm | yarn (auto-detected if omitted)
--skip-install skip dependency installation
--skip-git skip git initialization
-V, --version output the version number
-h, --help display helpExamples
# Fully interactive
npx create-stackit
# Pre-fill name + framework, answer the rest interactively
npx create-stackit my-app --framework vite
# Fully non-interactive (no prompts at all)
npx create-stackit my-app \
--framework next \
--language ts \
--state redux \
--ui shadcn \
--structure modular \
--pm pnpm
# Skip heavy steps during development
npx create-stackit my-app --skip-install --skip-gitPackage manager support
create-stackit detects whichever package manager you are already using
(by checking lock files in the current directory) and uses it automatically.
Pass --pm to override.
| Flag | Installs with | Runs scripts with |
|---|---|---|
| npm | npm install | npm run dev |
| pnpm | pnpm install | pnpm dev |
| yarn | yarn | yarn dev |
After generation
cd my-appIf you passed --skip-install, install dependencies first:
npm install # npm
pnpm install # pnpm
yarn # yarnStart the dev server:
npm run dev # npm
pnpm dev # pnpm
yarn dev # yarnBuild for production:
npm run build # npm
pnpm build # pnpm
yarn build # yarnFor Next.js projects — serve the production build:
npm run start # npm
pnpm start # pnpm
yarn start # yarnRequirements
- Node.js
>=18.18.0(LTS 20.x recommended) - Git — optional, only needed when "Initialize a git repository?" is accepted
Template matrix
All 16 template keys follow the pattern {framework}-{lang}-{state}-{ui}:
vite-ts-zustand-shadcn vite-ts-zustand-mui
vite-ts-redux-shadcn vite-ts-redux-mui
vite-js-zustand-shadcn vite-js-zustand-mui
vite-js-redux-shadcn vite-js-redux-mui
next-ts-zustand-shadcn next-ts-zustand-mui
next-ts-redux-shadcn next-ts-redux-mui
next-js-zustand-shadcn next-js-zustand-mui
next-js-redux-shadcn next-js-redux-muiContributing
- Fork and clone the repo.
npm installnpm run test:local— scaffold a project into./test-appand verify it.- To add a new template, create
templates/<key>/and add the key toSUPPORTED_COMBOSinsrc/choices.js.
License
MIT
