create-nepbs
v1.0.1
Published
NEPBS - Node Express Prisma Backend Server generator for JavaScript and TypeScript.
Maintainers
Readme
NEPBS
Node Express Prisma Backend Server
NEPBS is a beginner-friendly CLI tool for creating a ready-to-use Node.js + Express + Prisma backend server.
It helps developers skip repetitive backend setup and start building APIs faster.
📦 NPM Package:
https://www.npmjs.com/package/create-nepbs
Quick Start
Create a new backend project with one command:
npx create-nepbs my-appNEPBS will ask you to choose:
- Programming language
- Database
Then it automatically creates the project, installs the required packages, configures Prisma, and prepares the backend structure.
Language Selection
NEPBS supports both TypeScript and JavaScript.
Choose your language:
1. TypeScript
2. JavaScript
Enter your choice [1]:Press Enter to use the default option:
TypeScriptTypeScript
TypeScript is the default and recommended option.
TypeScript projects include:
- Strict TypeScript
- ES Modules
- NodeNext module resolution
tsxfor developmenttscfor production builds.jsextensions in relative imports where required by Node.js ESM
Example:
import app from "./app.js";JavaScript
JavaScript projects use modern ES Modules.
Example:
import express from "express";Your application source remains JavaScript when JavaScript mode is selected.
Database Selection
After selecting a language, NEPBS asks you to choose a database.
Choose your database:
1. PostgreSQL
2. MySQL
3. MariaDB
4. SQLite
5. SQL Server
6. CockroachDB
7. MongoDB
Enter your choice [1]:Press Enter to use:
PostgreSQLPostgreSQL is the default database.
Supported Databases
| Database | Prisma Provider | Notes |
| --- | --- | --- |
| PostgreSQL | postgresql | Default |
| MySQL | mysql | MySQL database |
| MariaDB | mysql | Uses Prisma MySQL connector |
| SQLite | sqlite | Local file database |
| SQL Server | sqlserver | Microsoft SQL Server |
| CockroachDB | cockroachdb | Distributed SQL database |
| MongoDB | mongodb | Uses a compatible Prisma profile |
Cloud database providers can also be used through the appropriate database option.
Examples:
Neon → PostgreSQL
Supabase → PostgreSQL
Railway → PostgreSQL / MySQL
PlanetScale → MySQL
MongoDB Atlas → MongoDBYou only need to provide the correct DATABASE_URL.
What NEPBS Creates
A generated project includes a clean backend foundation with:
- Node.js
- Express.js
- Prisma ORM
- TypeScript or JavaScript
- ES Modules
- Prisma Client setup
- Environment configuration
- CORS
- Cookie Parser
- JWT utilities
- bcrypt password utilities
- Global error handler
- Async error wrapper
- Not-found middleware
- API response helper
- Starter
/api/v1endpoint - Database-specific Prisma configuration
- Node.js version detection
- Automatic dependency installation
NEPBS intentionally does not generate authentication routes or CRUD modules by default.
The goal is to give developers a clean and understandable backend foundation instead of generating unnecessary application code.
Node.js Compatibility
NEPBS detects the Node.js version installed on your computer before creating the project.
It is designed to handle these Node.js major versions:
19
20
21
22
23
24NEPBS uses the detected Node.js version, selected language, and selected database to determine an appropriate Prisma configuration.
When the installed Node.js version supports the current Prisma release, NEPBS uses the latest compatible Prisma setup.
When a specific Node.js version or database requires a compatibility profile, NEPBS automatically uses the compatible Prisma configuration and displays a warning when necessary.
For production projects, a currently supported Node.js LTS release is recommended.
Check your versions:
node --version
npm --versionLatest Compatible Packages
NEPBS installs current compatible versions of generated project dependencies.
Common backend dependencies include:
express
prisma
@prisma/client
dotenv
cors
cookie-parser
jsonwebtoken
bcryptjs
http-status-codesTypeScript projects additionally include:
typescript
tsx
@types/node
@types/express
@types/cookie-parser
@types/jsonwebtoken
@types/cors
@types/bcryptjsWhen required, NEPBS also installs the appropriate Prisma database adapter and database driver.
Packages Not Installed by Default
NEPBS keeps generated projects minimal.
The following packages are not installed automatically:
zod
helmet
morgan
eslint
prettier
husky
swagger
nodemonYou can add them later if your project needs them.
Generated Project Structure
A TypeScript project follows a simple structure similar to:
my-app/
├── src/
│ ├── modules/
│ ├── middleware/
│ ├── utils/
│ ├── config/
│ ├── app.ts
│ ├── server.ts
│ └── index.ts
│
├── prisma/
│ └── schema.prisma
│
├── .env
├── .env.example
├── .gitignore
├── package.json
├── tsconfig.json
└── README.mdDepending on the Prisma profile, NEPBS may also generate:
prisma.config.ts
src/generated/prisma/JavaScript projects use the same basic structure with .js application files where appropriate.
Environment Configuration
NEPBS prepares environment variables such as:
NODE_ENV=development
PORT=5000
DATABASE_URL=
JWT_SECRET=
JWT_EXPIRES_IN=7d
CORS_ORIGIN=http://localhost:3000After generating your project, update .env with your real database connection.
Example PostgreSQL URL:
DATABASE_URL="postgresql://username:password@localhost:5432/my_database"Starting a Project
Create a project:
npx create-nepbs my-appEnter the generated folder:
cd my-appUpdate:
.envThen generate or migrate the database.
For relational databases:
npm run prisma:migrate -- --name initThen start development:
npm run devMongoDB Setup
MongoDB projects use Prisma schema push instead of Prisma Migrate.
Run:
npm run prisma:pushThen:
npm run devTest the API
After starting the server, open:
http://localhost:5000/api/v1Expected response:
{
"success": true,
"message": "API is running"
}Generated Backend Utilities
Prisma Client
NEPBS creates a reusable Prisma Client configuration based on the selected database and Prisma profile.
JWT Helper
JWT helper functions are included for:
Create token
Verify tokenPassword Helper
bcrypt helper functions are included for:
Hash password
Compare passwordError Handling
The generated project includes:
Global error handler
Not-found middleware
Async error wrapperAPI Response Helper
A reusable response helper keeps API responses consistent.
Example:
{
"success": true,
"message": "Request completed successfully",
"data": {}
}Available Commands
Development Server
npm run devGenerate Prisma Client
npm run prisma:generateCreate Prisma Migration
npm run prisma:migrate -- --name initPush Prisma Schema
npm run prisma:pushOpen Prisma Studio
npm run prisma:studioBuild
npm run buildProduction
npm run startExample
Create a backend project:
npx create-nepbs blog-apiChoose:
Language: TypeScript
Database: PostgreSQLEnter the project:
cd blog-apiUpdate .env:
DATABASE_URL="postgresql://username:password@localhost:5432/blog_api"
JWT_SECRET="your-secure-secret"Create the initial migration:
npm run prisma:migrate -- --name initStart development:
npm run devTest:
GET http://localhost:5000/api/v1Response:
{
"success": true,
"message": "API is running"
}Project Name Safety
NEPBS validates the project name before generating files.
It prevents:
Empty project names
Project names containing spaces
Unsafe characters
Unsafe command input
Overwriting non-empty foldersNEPBS will not delete or overwrite an existing non-empty project directory.
Cross-Platform Support
NEPBS is designed to work across common development environments, including:
Windows
macOS
Linux
PowerShell
Command Prompt
Git BashThe CLI includes Windows-safe process execution for npm commands where required.
Why NEPBS?
Creating a backend project usually requires repeating the same setup:
Install Express
Configure Prisma
Configure TypeScript
Setup database
Setup environment variables
Configure CORS
Configure cookies
Configure JWT
Configure password hashing
Configure error handling
Create project folders
Configure development scriptsNEPBS automates these repetitive tasks.
Instead of spending time configuring a project, you can start building your API.
Who Is NEPBS For?
NEPBS is designed for:
Beginner backend developers
Node.js developers
Express developers
Prisma developers
Students
API developers
Developers learning backend development
Developers who frequently start new backend projectsUse Without Global Installation
The recommended way to use NEPBS is:
npx create-nepbs my-appNo global installation is required.
Global Installation
You can also install NEPBS globally:
npm install -g create-nepbsThen run:
create-nepbs my-appNPM Package
Package Name
create-nepbsNPM Live Page
https://www.npmjs.com/package/create-nepbs
Run
npx create-nepbs my-appDevelopment Philosophy
NEPBS focuses on:
Simple code
Readable project structure
Beginner-friendly setup
Modern ES Modules
Minimal abstraction
Useful defaults
Automatic repetitive setup
Easy customizationThe generated project is intentionally kept simple so developers can understand and modify it easily.
License
MIT License
npx create-nepbs my-app