nirmitee-backend
v0.0.3
Published
Scaffold an Express backend with TypeScript/JavaScript and MongoDB/Prisma
Downloads
22
Maintainers
Readme
nirmitee-backend
Scaffold an Express backend with TypeScript or JavaScript and MongoDB or Prisma (Postgres).
Usage
npx nirmitee-backend my-appChoose database (MongoDB or SQL), language (TypeScript or JavaScript), package
manager (pnpm, npm, yarn, bun), and whether to init git. The CLI copies
env.example to .env, installs dependencies, and optionally creates an
initial commit. Then:
cd my-app
# Edit .env with your DB URL and secrets (if using a database)
pnpm run dev # or npm/yarn/bun run devOptions
--template-version <tag>— Use a specific template tag or branch from GitHub instead of the bundled templates (e.g.npx nirmitee-backend my-app --template-version v1.0.0).
Template structure
template/
├── typescript/ # Base TS source (no DB-specific code)
│ └── components/db/
│ ├── mongodb/ # MongoDB overlay
│ ├── prisma/ # Prisma/SQL overlay
│ └── none/ # No database
├── javascript/ # Base JS (ESM)
│ └── components/db/
│ ├── mongodb/
│ ├── prisma/
│ └── none/
└── components/db/
├── mongodb/README.md # MongoDB setup guide
├── none/README.md # No database
└── prisma/
├── schema.prisma # Canonical Prisma schema
└── README.md # Prisma setup guideThe CLI composes base + database overlay: it copies the language base,
overlays the chosen DB (MongoDB or Prisma), merges package.json and
env.example, then runs pnpm install.
Development
pnpm run scaffold— scaffold a test project (my-backend) using bundled templatespnpm run lint/pnpm run lint:fix— ESLintpnpm run spellcheck— cspell
License
MIT — see LICENSE.
