scaffold-my-stack
v1.0.0
Published
Interactive CLI to scaffold a full-stack project — pick your frontend, backend, database and ORM.
Maintainers
Readme
scaffold-my-stack
An interactive CLI that scaffolds a full-stack project — you pick the frontend, backend, database, and ORM, it generates working boilerplate wired together.
Usage
Without publishing (run locally):
npm install
node bin/cli.js my-appAfter publishing to npm:
npx scaffold-my-stack my-appCLI flags (powered by commander)
Usage: scaffold-my-stack [options] [project-name]
Arguments:
project-name name of the project / folder to create
Options:
-v, --version print the current version
-y, --yes skip prompts and use defaults (React + Express + PostgreSQL + Prisma)
--no-git skip git repository initialization
--no-docker skip docker-compose.yml generation
--pm <manager> package manager to use (npm, pnpm, yarn) (default: "npm")
-h, --help display help for commandExamples:
scaffold-my-stack # fully interactive
scaffold-my-stack my-app # interactive, name pre-filled
scaffold-my-stack my-app --yes # instant scaffold with sane defaults
scaffold-my-stack my-app --pm pnpm --no-dockerYou'll be walked through prompts like:
? Which frontend do you want? › React (Vite + TypeScript) / Next.js / Vue 3 / None
? Which backend do you want? › Express / Fastify / Go + Gin / None
? Which database do you want? › PostgreSQL / MySQL / MongoDB / SQLite / None
? Which ORM/client for Node.js? › Prisma / Raw driver
? Package manager? › npm / pnpm / yarn
? Generate docker-compose.yml for your database? › yes / no
? Initialize a git repository? › yes / noWhat it generates
my-app/
├── frontend/ # chosen frontend, dev server proxies /api to :4000
├── backend/ # chosen backend, wired to your chosen database
├── docker-compose.yml # if you picked a containerized database
├── README.md # exact setup commands for YOUR chosen stack
└── .gitignoreEvery combination generates real, runnable code:
- Node backends get a working
/api/healthroute plus a sample/api/itemsCRUD route wired to Prisma, Mongoose, or a raw driver depending on what you chose. - Go backend gets a Gin server with a health route and a stub for your chosen database client (GORM or the Mongo driver).
- Frontends ship a page that calls the backend's
/api/healthendpoint so you can confirm the stack is talking to itself.
Supported options
| Layer | Options | |-----------|---------| | Frontend | React (Vite + TS), Next.js (TS), Vue 3 (Vite + TS), none | | Backend | Express (TS), Fastify (TS), Go + Gin, none | | Database | PostgreSQL, MySQL, MongoDB, SQLite, none | | ORM | Prisma, Mongoose, or a raw driver (pg / mysql2 / better-sqlite3) |
Extending it
Each layer is its own generator module under src/generators/:
frontend.js— add a newif (choice === 'your-framework')block and a new choice insrc/questions.js.backend.js— same pattern;nodeDeps()centralizes dependency wiring per database/ORM.database.js-related logic (Prisma schema, Mongoose model, raw client) lives insidebackend.jssince it's backend-specific.docker.js— add aservices[...]entry for a new containerized database.
Publishing
npm login
npm publish --access publicMake sure the name field in package.json is unique on the npm registry first (npm view scaffold-my-stack to check).
