Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-enterprise-starter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Node Enterprise Starter
Production-Ready Node.js Backend Framework
A modern, scalable, and secure foundation for building enterprise-grade applications
📚 Visit the Official Documentation Site
✨ Overview
Node Enterprise Starter is a powerful CLI tool that generates production-ready Node.js applications with enterprise-level architecture. Skip the boilerplate setup and focus on building your business logic with our battle-tested foundation.
npx node-enterprise-starter
🚀 Key Features
🔐 AuthenticationComplete JWT authentication with access/refresh tokens and password management |
🛡️ TypeScriptBuilt with TypeScript for robust type safety across your entire application |
🗄️ MongoDB ReadyMongoose ODM integration with models, schemas, and data validation |
👥 User ManagementRole-based access control system with flexible permissions |
📝 Error HandlingGlobal error handler with custom error classes and consistent responses |
📊 LoggingAdvanced logging with request tracking and performance monitoring |
📦 Installation
Start your new project in one command:
# Using npm
npx node-enterprise-starter
# Using yarn
yarn dlx node-enterprise-starter
# Using pnpm
pnpm dlx node-enterprise-starter
# Using bun
bunx node-enterprise-starter
Our interactive CLI guides you through setup, allowing you to customize your project structure and features.
🏗️ Project Structure
node-enterprise-starter/
├── src/
│ ├── app/
│ │ ├── errors/ # Custom error classes
│ │ ├── middlewares/ # Express middlewares
│ │ ├── modules/ # Feature modules
│ │ │ ├── Auth/ # Authentication module
│ │ │ ├── User/ # User management module
│ │ │ └── ...
│ │ ├── routes/ # API routes
│ │ ├── services/ # Shared services
│ │ └── utils/ # Helper functions
│ ├── config/ # Configuration
│ ├── shared/ # Shared resources
│ │ └── constants/ # Application constants
│ ├── app.ts # Express application
│ └── server.ts # Server entry point
├── .env # Environment variables
├── .env.example # Environment template
├── tsconfig.json # TypeScript configuration
└── package.json # Dependencies and scripts
📐 Module Architecture
Each feature is isolated in its own module with a clean separation of concerns:
Auth/
├── auth.controller.ts # Request handlers
├── auth.service.ts # Business logic
├── auth.model.ts # Data models
├── auth.validation.ts # Request validation
├── auth.utils.ts # Helper functions
├── auth.interface.ts # TypeScript interfaces
└── auth.routes.ts # Route definitions
🛣️ API Routes
Method | Route | Description | Auth Required |
---|---|---|---|
POST |
/api/v1/auth/login |
User login | No |
POST |
/api/v1/auth/register |
User registration | No |
POST |
/api/v1/auth/forgot-password |
Request password reset | No |
POST |
/api/v1/auth/reset-password |
Reset password | No |
POST |
/api/v1/auth/change-password |
Change password | Yes (User) |
GET |
/api/v1/users |
Get all users | Yes (Admin) |
GET |
/api/v1/users/profile |
Get current user profile | Yes |
GET |
/api/v1/users/:id |
Get user by ID | Yes |
PATCH |
/api/v1/users/:id |
Update user | Yes |
DELETE |
/api/users/:id |
Delete user | Yes (Admin) |
⚙️ Environment Configuration
# Application
NODE_ENV=development
PORT=8000
# Database
DATABASE_URL=mongodb://localhost:27017/myapp
# Authentication
BCRYPT_SALT_ROUNDS=10
JWT_ACCESS_SECRET=supersecretaccesskey123
JWT_ACCESS_EXPIRES_IN=7d
JWT_REFRESH_SECRET=supersecretrefreshkey456
JWT_REFRESH_EXPIRES_IN=30d
# Email
EMAIL_USER=noreply@myapp.com
EMAIL_PASSWORD=password123
RESET_LINK_URL=https://myapp.com/reset-password
# Frontend
CLIENT_URL=http://localhost:3000
# Admin defaults
ADMIN_NAME=Abu Jobayer
ADMIN_EMAIL=admin@myapp.com
ADMIN_PASSWORD=adminpassword123
ADMIN_CONTACT=+1-234-567-8901
ADMIN_PROFILE_IMAGE_LINK=https://myapp.com/images/admin-profile.png
💡 Why Choose Node Enterprise Starter?
- Production Ready: Battle-tested patterns used in real-world applications
- Developer Experience: Clean architecture with intuitive organization
- Scalable: Designed to grow from small projects to enterprise applications
- Time Saving: Skip weeks of boilerplate setup and configuration
- Best Practices: Follows industry standards for Node.js and Express
- Comprehensive: Includes everything you need for a modern backend
🛠️ Technologies
📚 Documentation & Support
📄 License
This project is MIT licensed.
Crafted with ❤️ by Abu Jobayer