Documentation
Install it, scaffold with it, run what it generates. Everything below mirrors the CLI's real behavior.
On this page
$ install
Installation
No setup needed — run it straight from the registry (Bun 1.2+ for the CLI itself is not even required this way):
bunx create-stackit-app@latest create my-app
# or with npm
npx create-stackit-app@latest create my-appPrefer a permanent command? Install once, use everywhere:
npm install -g create-stackit-app
stackit create my-appRunning from source instead? Clone, install, and run from cli/ — every bunx … command below becomes bun run src/index.ts …:
git clone <your-repo-url> stackit
cd stackit/cli
bun installPer-stack runtimes (Node 20+, Bun 1.2+, Go 1.24+) are checked automatically before scaffolding.
$ quickstart
Quickstart
Interactive mode asks 4 questions — stack, language, runtime, package manager:
bunx create-stackit-app@latest create my-appFully non-interactive with flags (great for scripts and CI):
# MERN + Bun + TypeScript, zero prompts
bunx create-stackit-app@latest create my-app --stack mern --language typescript --runtime bun --pm bun -y
# PERN + Node + JavaScript, skip install & git (fastest)
bunx create-stackit-app@latest create shop-api --stack pern --language javascript --runtime node --pm npm -y --no-install --no-git
# Go + Fiber (language/runtime auto-resolve to go)
bunx create-stackit-app@latest create fast-api --stack go-fiber -y$ commands
Commands & flags
One command exists today — create. Flags always win over prompts; invalid combos are rejected instead of generating broken projects.
| Flag | Values | Default |
|---|---|---|
| [project-name] | my-app (lowercase, - _) | prompt |
| --stack | mern | pern | hono-pg | go-fiber | prompt (mern with -y) |
| --language | typescript | javascript (go-fiber → go) | prompt (typescript with -y) |
| --runtime | node | bun (go-fiber → go) | prompt (stack default with -y) |
| --pm | npm | pnpm | yarn | bun | bun if runtime is bun, else npm |
| -y, --yes | skip all prompts | off |
| --no-install | skip dependency install | install |
| --no-git | skip git init | init |
[project-name]
- values
- my-app (lowercase, - _)
- default
- prompt
--stack
- values
- mern | pern | hono-pg | go-fiber
- default
- prompt (mern with -y)
--language
- values
- typescript | javascript (go-fiber → go)
- default
- prompt (typescript with -y)
--runtime
- values
- node | bun (go-fiber → go)
- default
- prompt (stack default with -y)
--pm
- values
- npm | pnpm | yarn | bun
- default
- bun if runtime is bun, else npm
-y, --yes
- values
- skip all prompts
- default
- off
--no-install
- values
- skip dependency install
- default
- install
--no-git
- values
- skip git init
- default
- init
$ stacks
Stacks
Four stacks, each a Vite + React frontend plus a backend with its own database:
MERN
MongoDB + Express + React — the classic, minus the boilerplate pain.
- backend
- Express + Mongoose
- database
- MongoDB
- runtime
- Bun / Node
PERN
PostgreSQL + Express + React — relational data done right.
- backend
- Express + pg
- database
- PostgreSQL
- runtime
- Bun / Node
Hono + PG
Edge-ready Hono API + Postgres — tiny, fast, modern.
- backend
- Hono + zod-validator
- database
- PostgreSQL
- runtime
- Bun-native / Node
Go + Fiber
Go Fiber API + React — raw speed with a Postgres upgrade path.
- backend
- Fiber + pgx (optional)
- database
- Postgres-ready
- runtime
- Go 1.24+
$ structure
Generated structure
JS stacks (mern / pern / hono-pg) share this layout — TypeScript just swaps extensions and adds tsconfigs:
my-app/
├── client/ # Vite + React (proxies /api → :5000)
│ └── src/{App, main, lib/api}
├── server/ # Express / Hono API
│ └── src/
│ ├── index.* # entrypoint (env → connect → listen)
│ ├── app.* # app factory (middleware + routes)
│ ├── config/ # env, db connection
│ ├── routes/ # health, users
│ ├── controllers/ # handlers (express)
│ ├── models/ # mongoose schema / SQL DDL
│ ├── middlewares/ # errorHandler, notFound, zod validation
│ └── utils/ # asyncHandler, ApiError
├── docker-compose.yml # one-command Mongo / Postgres
└── .env.exampleGo + Fiber instead generates server/cmd/api/main.go plus server/internal/{config,db,handlers,middleware,models,routes} and a Makefile.
$ run
Running it
cd my-app
cp .env.example server/.env # fill in MONGO_URI / DATABASE_URL
docker compose up -d # starts MongoDB / PostgreSQL
bun run dev # (or npm/pnpm/yarn run dev) → client + serverFrontend
http://localhost:5173
API
http://localhost:5000
Health
http://localhost:5000/api/health
Go stacks: cd server && go mod tidy && go run ./cmd/api, or everything via make dev. Without DATABASE_URL the API runs in demo mode (in-memory store); set it for real Postgres persistence.
$ troubleshooting
Troubleshooting
“X is not installed” before scaffolding
Server exits: Missing env var …
cp .env.example server/.env and fill in MONGO_URI or DATABASE_URL — boot fails fast on purpose.API connects nowhere / users endpoints 500
docker compose up -d from the project root, then confirm the port (27017 mongo / 5432 postgres) matches your env.Vite shows the demo page but “API: …” never loads
http://localhost:5000. Make sure the server is running, or set VITE_API_URL in client/.env.