A powerful CLI to scaffold production-ready full-stack projects in seconds.
Stop wasting time wiring up boilerplate. stackzap gives you a full-stack project — frontend, backend, database, ORM, styling, and caching — ready to go with a single command.
- Installation
- Quick Start
- Modes
- Supported Technologies
- Presets Reference
- Generated Project Structure
- CLI Reference
- Environment Variables
- Security
- Requirements
- Changelog
- Contributing
- License
Global install (recommended):
npm install -g stackzapOr run without installing:
npx stackzap initVerify installation:
stackzap --versionstackzap initThe interactive CLI will guide you through every choice. That's it — your project is ready to cd into and npm run dev.
stackzap offers two ways to get started:
One-click famous stacks. Pick a preset and stackzap handles all the wiring automatically.
> How do you want to start? Preset
> Project name? my-app
> Select preset MERN Stack
> Package manager? npm
See Presets Reference for the full list.
Full control. Pick each layer of your stack individually.
> How do you want to start? Custom
> Project name? my-app
> Frontend Next.js
> Styling Tailwind
> Backend Fastify
> Database PostgreSQL
> ORM / Driver Prisma
> Add Redis caching? Yes
> Package manager? pnpm
| Technology | Scaffold Method | Notes |
|---|---|---|
| React | Vite | Fast dev server, HMR |
| Next.js | create-next-app |
Pages Router, JavaScript |
| Vue.js | Vite | Composition API ready |
| Nuxt.js | nuxi |
Full-stack Vue framework |
| SvelteKit | sv create |
Compiler-based, minimal bundle |
| Technology | What Gets Installed | Boilerplate |
|---|---|---|
| Express | express, cors, dotenv |
server/index.js with health endpoint |
| Fastify | fastify, @fastify/cors, dotenv |
server/index.js with health endpoint |
| Hono | hono, @hono/node-server, dotenv |
server/index.js with health endpoint |
| NestJS | @nestjs/cli |
Full NestJS scaffold in server/ |
| Database | ORM / Driver | Packages Installed | Setup |
|---|---|---|---|
| MongoDB | Mongoose | mongoose |
— |
| PostgreSQL | Prisma | prisma, @prisma/client |
npx prisma init |
| PostgreSQL | Drizzle | drizzle-orm, drizzle-kit, pg |
Config + starter schema |
| SQLite | Prisma | prisma, @prisma/client |
npx prisma init --datasource-provider sqlite |
| SQLite | better-sqlite3 | better-sqlite3 |
— |
| Technology | Packages Installed | Notes |
|---|---|---|
| Tailwind CSS | tailwindcss@3, postcss, autoprefixer |
Auto-initializes config |
| CSS Modules | — (built-in) | Creates example .module.css |
| Sass / SCSS | sass |
— |
| shadcn/ui | Tailwind + tailwind-merge, clsx, class-variance-authority, lucide-react |
React / Next.js only |
| Chakra UI | @chakra-ui/react, @emotion/react, @emotion/styled, framer-motion |
React / Next.js only |
| Technology | Packages Installed | Generated Files |
|---|---|---|
| Redis | ioredis |
src/lib/redis.js connection helper |
| Preset | Frontend | Backend | Database + ORM | Styling | Extras |
|---|---|---|---|---|---|
| T3 Stack | Next.js | — | PostgreSQL + Prisma | Tailwind | tRPC, NextAuth |
| MERN Stack | React | Express | MongoDB + Mongoose | Tailwind | — |
| PERN Stack | React | Express | PostgreSQL + Prisma | Tailwind | — |
| MEVN Stack | Vue.js | Express | MongoDB + Mongoose | Tailwind | — |
Exact structure depends on your choices, but here's a typical MERN + Tailwind output:
my-app/
├── node_modules/
├── public/
├── server/
│ └── index.js # Express server with health endpoint
├── src/
│ └── ... # Frontend source files
├── .env # Auto-generated with sensible defaults
├── package.json
├── postcss.config.js
├── tailwind.config.js
└── vite.config.js
Usage: stackzap [command] [options]
Commands:
init Scaffold a new project interactively
Options:
-V, --version Display version number
-h, --help Display help
# Interactive project setup
stackzap init
# Check installed version
stackzap --versionstackzap auto-generates a .env file based on your stack choices:
| Variable | When Generated | Default |
|---|---|---|
PORT |
Always | 5000 |
MONGO_URI |
MongoDB selected | mongodb://localhost:27017/my-app |
DATABASE_URL |
PostgreSQL selected | postgresql://user:password@localhost:5432/mydb |
DATABASE_URL |
SQLite + Prisma selected | file:./dev.db |
REDIS_URL |
Redis enabled | redis://localhost:6379 |
NEXTAUTH_SECRET |
T3 preset | your-secret-here |
NEXTAUTH_URL |
T3 preset | http://localhost:3000 |
stackzap is built with safety in mind:
- Input validation — Project names are restricted to
[A-Za-z0-9_-]. Path traversal patterns (..,/,\) and dot-prefixed names are blocked. - Directory overwrite guard — Refuses to scaffold into an existing directory.
- Node.js version check — Exits cleanly with a message if Node < 14.
- No
eval— All scaffolding runs trusted npm packages via child processes. No remote code execution. - Pinned dependency ranges — All installed packages use caret (
^) ranges for stability.
| Requirement | Minimum |
|---|---|
| Node.js | >= 14.0.0 |
| Package Manager | npm, yarn, or pnpm |
- Added preset stacks: T3, MERN, PERN, MEVN
- Added frontends: Vue.js, Nuxt.js, SvelteKit
- Added backends: Fastify, Hono, NestJS
- Added databases: PostgreSQL (Prisma/Drizzle), SQLite
- Added styling: CSS Modules, Sass, shadcn/ui, Chakra UI
- Added optional Redis caching layer
- Two-mode prompt architecture (Preset vs Custom)
- Context-aware
.envgeneration - Boilerplate server files for Express, Fastify, Hono
- Gradient ASCII banner and visual upgrade
- Step progress indicators during installation
- Boxed success summary with stack details
- Initial release
- React, Next.js, Express, MongoDB, PostgreSQL, Tailwind CSS
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-framework) - Commit your changes (
git commit -m 'Add new framework support') - Push to the branch (
git push origin feature/new-framework) - Open a Pull Request