Best-practice layouts
Layered backends — routes, controllers, models, middlewares, config, utils. No dumping everything in index.js, ever.
server/src/
├── app.ts
├── routes/
├── controllers/
├── models/
└── middlewares/
▊ no index.js dumping ground
Coming soon — NestJS · Django · FastAPI · Gin stacks
stackit is the create-next-app for backends — pick MERN, PERN, Hono or Go Fiber and get a best-practice monorepo with layered APIs, validation, Docker and docs. In one command.
$ bunx create-stackit-app@latest create my-app --stack mern -y
✔ Environment looks good
✔ Scaffolded 33 files → ./my-app
✔ Done! my-app (mern, typescript, bun)
$ cd my-app && bun run dev # → client :5173 + api :5000▊ zero config · prompts when you want them · flags when you don't
0
production stacks
0
files per scaffold
30s
idea → running app
0
config to write
$ stacks
Every stack ships a Vite + React frontend and a layered backend with validation, env handling and Docker. Pick a tab to see exactly what you get.
MongoDB + Express + React — the classic, minus the boilerplate pain.
Backend
Express + Mongoose
Database
MongoDB
Runtime
Bun / Node
scaffold it · via bunx, no install
bunx create-stackit-app@latest create my-app --stack mern --language typescript --runtime bun --pm bun -y# then
$ cd my-app
$ docker compose up -d
$ bun run dev
→ frontend :5173 · api :5000 · health /api/health
$ features
No 200-line tutorials to follow, no decisions to agonize over. The boring-but-critical parts are already done — correctly.
Layered backends — routes, controllers, models, middlewares, config, utils. No dumping everything in index.js, ever.
server/src/
├── app.ts
├── routes/
├── controllers/
├── models/
└── middlewares/
▊ no index.js dumping ground
Bun gets --hot reload and native TS. Node gets tsx watch + tsc builds. The template adapts scripts per runtime automatically.
Every write endpoint ships with zod validation, a central error handler, 404s and an async wrapper. 400s, not 500s.
docker-compose.yml for Mongo or Postgres in every scaffold. Copy .env.example, compose up, done.
Fully non-interactive with -y and --stack/--language/--runtime/--pm. Perfect for scripts, CI and dotfiles.
client/ + server/ with concurrently wired dev. One command boots the full stack, Vite proxy already pointing at the API.
$ bun run dev$ workflow
Three steps. No Yeoman generators to debug, no wiki pages to read, no 'now wire up CORS' left as an exercise.
Stack, language, runtime, package manager. Or skip it all with -y and flags — CI-friendly by design.
Node, Bun, Go versions verified before a single file is written. Missing something? You get the exact install hint.
33 best-practice files, dependencies installed, repo initialized. cd in and run dev. That's the whole workflow.
✔ Environment looks good
✔ Scaffolded 33 files → /home/you/test-mern
✔ Done! test-mern (mern, typescript, bun)
Next steps:
$ cd test-mern
$ bun run dev # runs client + server// client/src/lib/api.ts — generated
export function getHealth(): Promise<Health> {
return req<Health>("/api/health"); // → { status: "ok", uptime: 12 }
}$ faq
Those give you one frontend. stackit scaffolds the whole full-stack repo — Vite + React client, a layered API backend, database wiring, Docker and env files — across 4 backend stacks, 2 languages and 2 runtimes, from one CLI.
No — bunx/npx runs the published binary with plain Node. You only need Bun if you run the CLI from source. Generated projects run on whatever you pick — Node 20+, Bun 1.2+, or Go 1.24+. The CLI even checks your machine first and tells you exactly what's missing.
Your call, per scaffold. TypeScript gets strict tsconfigs, typed API helpers and tsc builds; JavaScript stays lean with zero build step. Go stacks always use Go for the backend with a TypeScript frontend.
Yes by default — root, client and server (or go mod tidy + npm for Go stacks), plus git init. Pass --no-install / --no-git to skip either. Offline? Scaffold first, install later.
That's what -y is for. Every prompt has a flag: --stack, --language, --runtime, --pm. Invalid combos are rejected with a clear error instead of generating something broken.
Yes! No setup needed: bunx create-stackit-app@latest create my-app --stack mern -y (or npx). Prefer a global install? npm install -g create-stackit-app gives you the stackit command everywhere. Source runners can still git clone + bun install from cli/.
$ stop configuring · start shipping
Clone, install, scaffold. The backend boilerplate you've written a hundred times — done right, in seconds.
bunx create-stackit-app@latest create my-app --stack mern -y