project-starter is a composable CLI for bootstrapping modern development projects through an interactive questionnaire.
Instead of shipping one giant template per combination, it uses a layered architecture:
- minimal base templates for project shape
- optional modules layered on top
- deterministic composition rules
- post-generation hooks for install, git init, and summary output
That keeps the codebase maintainable today and much easier to extend tomorrow.
- Supports
frontend only,backend only, andfullstack - Frontend starters:
react-vite,nextjs - Backend starters:
go-fiber,express,fastify,nestjs - Data modules:
gorm,postgres,prisma,drizzle,supabase - Frontend modules:
tailwind,react-query,router,radix-ui,shadcn,vitest,supabase - Shared modules:
docker,docker-compose,vercel,railway,github-actions,git,readme,env.example - Per-app
.env.examplefiles instead of a single root env file - Feature-oriented starter structures for both frontend and backend
- Non-interactive CLI flags for scripting and CI
- Conflict policies:
overwrite,skip, anderror - Strongly typed registries for stacks and modules
- File rendering with placeholder replacement
- Post steps for dependency installation and git initialization
Clone the repository and install dependencies:
npm installRun the CLI in development:
npm run dev -- initInstall the CLI globally from the local repository:
npm install -g .
project-starter initUpdate a local global install after making changes:
npm install -g .That reinstalls the current state of the repository globally, so the project-starter
command picks up your latest local changes.
Build the executable:
npm run build
node dist/index.js initRun the generator test suite:
npm testAfter publishing, the intended usage is:
npx project-starter initproject-starter initExample non-interactive usage:
project-starter init \
--yes \
--project-name my-app \
--project-kind fullstack \
--frontend-framework react-vite \
--backend-framework express \
--database postgres \
--frontend-modules tailwind,react-query,vitest \
--backend-modules prisma,jest \
--shared-modules git,readme,env.example,github-actions \
--conflict-policy overwriteThe interactive flow asks for:
- Project name
- Project mode
- Frontend framework when applicable
- Backend framework when applicable
- Database choice
- Frontend modules
- Backend modules
- Shared modules
- Whether to install dependencies
- Whether to initialize git
- Conflict policy
my-app/
src/
app/
features/
shared/
styles/
package.json
.env.examplemy-api/
# go-fiber
cmd/server
internal/
features/
platform/
server/
# express / fastify / nestjs
src/
features/
platform/
.env.examplemy-app/
apps/
web/
.env.example
api/
.env.example
packages/The project is intentionally split by responsibility:
src/
cli/ # command entrypoints and argument parsing
prompts/ # interactive questionnaire
core/ # plan resolution, file application, post steps
generators/ # orchestration layer
modules/ # module registry
stacks/ # framework/base registry
types/ # shared contracts
utils/ # filesystem, rendering, logging helpers
templates/
base/ # minimal framework and topology templates
modules/ # composable opt-in layersGeneration works in layers:
- Resolve the project selection into a generation plan.
- Add base layers for the chosen mode and framework(s).
- Add module layers compatible with that selection.
- Copy files into the destination in deterministic order.
- Render placeholders like
{{projectName}}. - Run optional post steps for Node.js and Go apps.
routeris only available forreact-vitegormandgo-testare only available forgo-fiberprisma,drizzle,jest, and backendsupabasetarget Node.js backendsauth-jwtis currently scaffolded forgo-fiber,express, andfastifyverceltargets frontend apps, whilerailwaytargets backend apps
These are the versions currently used by the generated starters in this repository. They are template defaults, so they may change over time as the project evolves.
- Node.js engine for this CLI:
>=18.17.0 - TypeScript in the CLI:
5.8.3 - React starters:
react 18.3.1 - Vite starter:
vite 5.4.10 - Next.js starter:
next 15.0.3 - Go starter:
go 1.23.0 - Fiber starter:
github.com/gofiber/fiber/v2 2.52.5 - Express starter:
express 4.21.2 - Fastify starter:
fastify 5.2.1 - NestJS starter:
@nestjs/common,@nestjs/core,@nestjs/platform-express11.0.1 - Tailwind module:
tailwindcss 3.4.15 - React Query module:
@tanstack/react-query 5.59.13 - Radix UI module:
@radix-ui/themes 3.2.1 - Supabase module:
@supabase/supabase-js 2.49.4 - Prisma module:
prisma 5.22.0 - Drizzle module:
drizzle-orm 0.36.4 - Vitest module:
vitest 2.1.8 - Jest module:
jest 29.7.0
If you want stricter control later, we can also add:
- a dedicated
VERSION_MATRIX.md - a test that asserts the documented versions match the templates
- a release checklist step to review version bumps intentionally
- Create a new template folder under
templates/base/.... - Register it in
src/stacks/registry.ts. - Point the stack to its source directory and default target.
- Optionally mark incompatible modules through the module registry.
Because the generator works with typed definitions, most new frameworks only need files plus one registry entry.
- Create a template folder under
templates/modules/.... - Register it in
src/modules/registry.ts. - Define which project kinds and frameworks it supports.
- Add any post hook if the module needs follow-up steps later.
Modules can target the root, apps/web, or apps/api depending on the active mode.
promptskeeps the questionnaire lightweightfs-extrahandles recursive file operations cleanlychild_process.spawnkeeps post-generation shell steps dependency-light- a small placeholder renderer avoids unnecessary template complexity in V1
- later layers override earlier ones intentionally, which lets modules augment base templates without branching the generator
MIT