node-express-scaff-temps
v1.1.1
Published
Scaffold an Express + TypeScript API with JWT auth — choose Prisma or TypeORM
Maintainers
Readme
node-express-scaff-temps
Scaffold a JWT-auth starter in one command. Pick Express + Prisma, or the TypeORM stack — where you further choose an Express backend or a Next.js frontend (built to talk to that backend).
⚠️ This is a scaffolder — run it with
npx, don'tnpm installit.
npx node-express-scaff-temps my-appYou'll be asked which stack to use:
Which stack?
1) Express + Prisma
2) Express + TypeORM
Choose [1]: 2
Scaffold what?
1) Backend (Express + TypeORM API)
2) Frontend (Next.js app)
Choose [1]:Skip the prompts with flags:
npx node-express-scaff-temps my-app --prisma
npx node-express-scaff-temps my-app --typeorm --backend
npx node-express-scaff-temps my-app --typeorm --frontendPass --install to run npm install as part of the scaffold.
What you get
Express + Prisma / Express + TypeORM (backend)
- Express 4 + TypeScript, running through
ts-node/nodemon - JWT register / login, hashed passwords (bcrypt), auth middleware
- Centralised custom errors, error handler and 404 middleware
- A generated
.envwith a freshly mintedJWT_SECRETand aDATABASE_URLpointing at a database named after your project - Prisma stack: Prisma 7 +
pgadapter, user CRUD, a Postman collection. TypeORM stack: TypeORM 0.3 +Userentity,DB_SYNCfor dev, migration scripts.
Next.js frontend
- Next.js (App Router) + TypeScript + Tailwind + shadcn/ui
- Zustand (auth store), React Query (data), React Hook Form + Zod (forms)
- Register / login / home pages wired to the TypeORM backend's
/api/auth - A generated
.envwithNEXT_PUBLIC_API_URLpointing at the API
After scaffolding
Express + Prisma
cd my-app
npm install
createdb my_app # or point DATABASE_URL in .env somewhere else
npx prisma generate
npx prisma migrate dev --name init
npm run devExpress + TypeORM (backend)
cd my-app
npm install
createdb my_app # or point DATABASE_URL in .env somewhere else
npm run dev # DB_SYNC=true auto-creates the tablesNext.js (frontend)
cd my-app
npm install
npm run dev # http://localhost:3000Point NEXT_PUBLIC_API_URL in .env at your running backend (defaults to
http://localhost:3000/api).
Templates
| Choice | Folder |
| ------------------------- | ---------------------------- |
| Express + Prisma | templates/prisma/ |
| Express + TypeORM backend | templates/typeORMexpress/ |
| Next.js frontend | templates/nextjs/ |
