webgenix-code
v0.1.2
Published
Scaffold a slim TN³PR full-stack TypeScript monorepo (Next.js + Nest + Prisma + Redis).
Maintainers
Readme
webgenix-code
Scaffold a slim, production-ready TN³PR full-stack TypeScript monorepo in seconds: Next.js + NestJS + Prisma + PostgreSQL + Redis.
webgenix-code is a scaffolding CLI that generates a typed end-to-end monorepo — complete with auth, caching, shared types, and a polished shadcn/ui frontend — then prunes whatever you don't want. No boilerplate to delete, no wiring to untangle.
Quick start
pnpm dlx webgenix-code my-app
# or: npx webgenix-code my-app
# or: bunx webgenix-code my-appInteractive prompts collect a project name, namespace, and optional features. Then:
cd my-app
docker compose -f docker-compose.dev.yml up -d # PostgreSQL + Redis
pnpm db:sync
pnpm db:seed
pnpm dev # web on :3000, api on :3001Non-interactive usage
All flags are optional. Pass -y to accept every default and skip prompts.
pnpm dlx webgenix-code my-app --namespace acme --no-auth --no-redis -yFlags
| Flag | Effect |
| --- | --- |
| --namespace <ns> | Scope packages as @<ns>/* (default: project name slug) |
| --no-auth | Drop the auth package + web auth wiring |
| --no-redis | Drop the redis package (also disables auth + examples) |
| --no-examples | Drop example feature code (also disables auth) |
| --no-testing | Strip test harnesses (standalone) |
| --no-git | Skip git init |
| --pm <pnpm\|npm\|yarn\|bun> | Pin a package manager |
| -y | Use all defaults, no prompts |
| --ai | Optional: generate extra modules via a local Ollama model (skips cleanly if Ollama is unavailable) |
Feature dependency cascade
examples → auth → redis. Disabling a feature disables everything downstream — auth uses redis for sessions, and examples are auth-guarded. The CLI prints a warning whenever it coerces your selection. Only --no-testing is standalone.
What you get
A pnpm + Turbo monorepo:
apps/
web/ # Next.js 16 (App Router, Turbopack, React 19, shadcn/ui)
api/ # NestJS + Express
packages/
ui/ # shadcn/ui + Tailwind v4 design tokens
database/ # Prisma schema + client (PostgreSQL)
shared/ # Zod schemas + types, shared across web & api
auth/ # JWT auth (opt-in)
redis/ # Cache helpers (opt-in)
tsconfig/ eslint-config/ prettier-config/
docker-compose.dev.yml, docker-compose.prod.ymlCore packages (ui, database, shared, the config packages) are always included. auth and redis are opt-in; example code and the testing harness are opt-in feature sets. Type-safe communication flows across the whole stack.
Why a CLI and not a template clone?
Every scaffolded project starts clean: @webgenix placeholders are swapped to @<namespace>, disabled features are deleted (not commented out), and the import graph is reconciled so there are no dangling references. The result installs and runs on first try.
Requirements
- Node.js ≥ 20
- pnpm 10.20.0
- Docker (for PostgreSQL and Redis)
Development
pnpm install
pnpm build # tsup -> dist/index.js
pnpm test # vitest (unit + scaffold-matrix integration)
pnpm type-check # tsc --noEmitRun locally against a temp dir:
node packages/cli/dist/index.js ../my-test -y