SargenJS (v1.0)

🚀 A beginner-friendly CLI that builds a ready-to-use Express.js project. Just run the command to get routes, configs, and scripts so you can focus on writing features, not boilerplate & base configurations.

Important Note

Everything SargenJS generates is default compatible and follows CommonJS module structure. For ESModule, manual transfer/migration of files after generation is required.

Multiple Architectures

Generate Express.js projects with different architectural patterns:

  • • Layered (MVC) Architecture
  • • Modular (Feature-based) Architecture

Pre-configured Security

Essential middleware and security features included by default:

  • • Helmet for security headers
  • • CORS configuration
  • • Rate limiting

Database Support

Built-in database configuration with popular ORMs:

  • • Sequelize with MySQL/PostgreSQL
  • • Easy database setup commands

Git Integration

Seamless Git repository setup and GitHub integration:

  • • Initial commit and push
  • • Auto-create GitHub repositories

Quick Start

Install SargenJS

npm install -g sargenjs

Note: Make sure you have Node.js 14+ installed on your system.

Create a new project

sargen init my-project

Run your project

cd my-project && npm run dev

Project Structures

Layered Architecture (Default)

my-project/
├── src/
│ ├── routes/
│ ├── controllers/
│ └── services/
├── app.js
├── .env
└── package.json

Modular Architecture

my-project/
├── src/
│ ├── config/
│ ├── common/
│ └── modules/
├── app.js
├── .env
└── package.json