kickstart-express
v2.2.9
Published
A powerful CLI tool to quickly scaffold Express.js projects with modern tooling and best practices
Maintainers
Readme
Kickstart Express v2
A powerful CLI tool to quickly scaffold Express.js projects with modern tooling and best practices. Get up and running with a fully configured Express server in seconds!
⚡ Quick Demo
# Install globally
npm install -g kickstart-express
# Create a new project (default behavior)
kickstart-express --name my-api --language ts --docker --src --structured
# Add features to existing projects
kickstart-express add database
# Navigate and start
cd my-api && pnpm devYour Express server will be running at http://localhost:3000 with a fully configured TypeScript setup, Docker containers, and organized project structure!
📋 Table of Contents
- ⚡ Quick Demo
- 🚀 Features
- 📦 Installation
- 🛠️ Usage
- 📁 Project Templates
- 🏃♂️ Quick Start Examples
- 📋 Available Scripts
- 🔧 Requirements
- 🌟 What's Included
- 🚀 Generated API Example
- 📝 Project Structure Explained
- 📚 Documentation
- 🤝 Contributing
- 💖 Support
- 📄 License
🚀 Features
- Simplified CLI - No more "create" command needed - scaffolding is the default behavior
- Feature Addition - Use
addcommand to extend existing projects with databases, auth, and more - Interactive & Non-Interactive CLI - Use prompts or pass arguments for instant scaffolding
- Graceful Interruption Handling - Safe Ctrl+C handling with automatic cleanup of partial projects
- TypeScript & JavaScript Support - Choose your preferred language
- Flexible Project Structure - From simple to enterprise-ready architectures
- Docker Ready - Optional Docker configuration included
- Modern Tooling - Pre-configured with ESLint, hot reloading, and build scripts
- Best Practices - CORS, environment variables, and structured routing
📦 Installation
Global Installation (Recommended)
npm install -g kickstart-expressUsing npx (No Installation Required)
npx kickstart-express🛠️ Usage
Creating New Projects
Interactive Mode (Default)
Simply run the command and follow the interactive prompts to create a new Express.js project:
kickstart-expressThe CLI will ask you:
- Project name - Name for your new project directory
- Language - Choose between TypeScript or JavaScript
- Include Dockerfile - Optional Docker configuration
- Source folder structure - Simple or organized structure
- Structured architecture - Controllers, services, and routes separation
Non-Interactive Mode (CLI Arguments)
You can also pass arguments to skip prompts and scaffold projects instantly:
kickstart-express --name my-api --language ts --docker --src --structuredAvailable CLI Options for Project Creation:
-n, --name <project-name>- Specify the project name-l, --language <ts|js>- Choose language (default: ts)-d, --docker- Include Dockerfile and docker-compose.yml-s, --src- Create src folder structure--structured- Use structured architecture (controllers, services, routes)-h, --help- Display help information-V, --version- Display version number
Adding Features to Existing Projects
Kickstart Express v2 introduces the add command to extend your existing projects with both interactive and non-interactive modes:
kickstart-express add <feature> [options]Available Features:
databaseordb- Add database support (MongoDB/PostgreSQL with Mongoose/Prisma/Drizzle)auth- Add authentication support (JWT or Clerk)
Interactive Mode (Default)
When run without CLI options, prompts guide you through feature configuration:
# Interactive database setup
kickstart-express add db
# Interactive authentication setup
kickstart-express add authNon-Interactive Mode (CLI Arguments)
Skip prompts by providing configuration options directly:
Database CLI Options:
--db-type <mongodb|postgres>- Database type selection--orm <mongoose|prisma|drizzle>- ORM/ODM selection
Authentication CLI Options:
--auth-type <jwt|clerk>- Authentication type selection
Examples:
Interactive Mode:
# Add database support (interactive prompts)
kickstart-express add database
# Add authentication (interactive prompts)
kickstart-express add authNon-Interactive Mode:
# Add MongoDB with Mongoose
kickstart-express add db --db-type mongodb --orm mongoose
# Add PostgreSQL with Prisma
kickstart-express add db --db-type postgres --orm prisma
# Add PostgreSQL with Drizzle
kickstart-express add db --db-type postgres --orm drizzle
# Add JWT authentication
kickstart-express add auth --auth-type jwt
# Add Clerk authentication
kickstart-express add auth --auth-type clerkFallback Behavior: When run outside a kickstart-express project, the add command will prompt to create a new project instead.
Examples
Create Projects:
TypeScript project with all features:
kickstart-express -n my-awesome-api -l ts -d -s --structuredSimple JavaScript project:
kickstart-express --name simple-app --language jsPartial arguments (will prompt for missing options):
kickstart-express --name my-app --dockerQuick TypeScript project with src folder:
kickstart-express -n quick-api -sAdd Features:
Interactive Mode:
# Add database support with prompts
cd my-existing-project
kickstart-express add database
# Add authentication with prompts
kickstart-express add authNon-Interactive Mode:
cd my-existing-project
# Add MongoDB with Mongoose
kickstart-express add db --db-type mongodb --orm mongoose
# Add PostgreSQL with Prisma
kickstart-express add db --db-type postgres --orm prisma
# Add JWT authentication
kickstart-express add auth --auth-type jwtComplete Workflow:
# 1. Create project
kickstart-express -n my-api -l ts -d -s --structured
# 2. Add database support
cd my-api
kickstart-express add db --db-type postgres --orm prisma
# 3. Add authentication
kickstart-express add auth --auth-type jwt📁 Project Templates
Simple Structure
my-app/
├── src/
│ └── index.ts
├── package.json
├── tsconfig.json (TS only)
├── .env
└── .gitignoreStructured Architecture
my-app/
├── src/
│ ├── controllers/
│ │ └── calculator.controller.ts
│ ├── routes/
│ │ └── calculator.route.ts
│ ├── services/
│ │ └── calculator.service.ts
│ ├── models/
│ │ └── calculation.model.ts
│ └── index.ts
├── package.json
├── tsconfig.json (TS only)
├── .env
└── .gitignoreWith Docker
my-app/
├── src/
├── Dockerfile
├── docker-compose.yml
├── package.json
└── ...🏃♂️ Quick Start Examples
Create New Projects
Interactive Mode
# Install the CLI
npm install -g kickstart-express
# Create a new project interactively
kickstart-express
# Follow the prompts:
# ✓ Project name: my-awesome-api
# ✓ Language: TypeScript
# ✓ Include Dockerfile: Yes
# ✓ Source folder: Yes
# ✓ Structured architecture: Yes
# Navigate to your project
cd my-awesome-api
# Install dependencies (if not already done)
pnpm install
# Start development server
pnpm devNon-Interactive Mode
# Install the CLI
npm install -g kickstart-express
# Create a new project with CLI arguments
kickstart-express --name my-awesome-api --language ts --docker --src --structured
# Navigate to your project
cd my-awesome-api
# Install dependencies (if not already done)
pnpm install
# Start development server
pnpm devAdd Features to Existing Projects
# Navigate to your existing kickstart-express project
cd my-existing-project
# Add database support
kickstart-express add database
# Add authentication
kickstart-express add authYour Express server will be running at http://localhost:3000!
📋 Available Scripts
All generated projects come with these npm scripts:
TypeScript Projects
pnpm dev # Start development server with hot reload
pnpm build # Build for production
pnpm start # Start production serverJavaScript Projects
pnpm dev # Start development server with nodemon
pnpm start # Start production serverDocker Projects
docker-compose up --build # Build and run with Docker🔧 Requirements
- Node.js >= 18.0.0
- pnpm (recommended) or npm
- Git (for project initialization)
🌟 What's Included
Project Scaffolding
- Express.js - Fast, unopinionated web framework
- CORS - Cross-origin resource sharing middleware
- dotenv - Environment variable management
Feature Addition (New in v2)
- Database Support - MongoDB/PostgreSQL with multiple ORMs
- Authentication - JWT or Clerk authentication systems
TypeScript Projects Include
- TypeScript - Static type checking
- tsx - TypeScript execution and watch mode
- @types/express - Express type definitions
JavaScript Projects Include
- nodemon - Automatic restart on file changes
Optional Docker Setup
- Multi-stage Dockerfile - Optimized for production
- docker-compose.yml - Ready for development and deployment
- pnpm integration for fast installs
🚀 Generated API Example
The structured template includes a sample calculator API:
// GET /api/calculator
{
"message": "Calculator API is working!"
}
// POST /api/calculator/add
{
"a": 5,
"b": 3
}
// Response: { "result": 8 }📝 Project Structure Explained
Controllers
Handle HTTP requests and responses, delegating business logic to services.
Routes
Define API endpoints and middleware, connecting URLs to controller methods.
Services
Contain business logic, data processing, and external API calls.
Models
Define data structures, interfaces, and type definitions.
📚 Documentation
For comprehensive documentation, visit our online docs at docs.kickstart.express:
v2 Documentation
- Getting Started - Installation and first steps
- CLI Reference - Complete command-line options for v2
- Adding Features - Guide to using the new
addcommand - Usage Examples - Real-world examples and use cases
- Project Templates - Understanding generated structures
- Migration Guide - Upgrading from v1 to v2
- API Reference - Programmatic usage
- Contributing - Development and contribution guide
- FAQ - Frequently asked questions
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for detailed information on:
- Setting up the development environment
- Code style guidelines
- Testing procedures
- Pull request process
Quick Development Setup
git clone https://github.com/bhaveshsinghal95182/kickstart-express.git
cd kickstart-express
npm installTesting the CLI
node index.js --name test-project --language ts --src💖 Support
If you find this tool helpful, please consider:
- ⭐ Giving it a star on GitHub
- ☕ Buying me a coffee to support development
- 🐛 Reporting issues you encounter
- 💡 Suggesting new features
📄 License
This project is licensed under the ISC License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with Inquirer.js for interactive CLI
- Uses Ora for elegant terminal spinners
- Inspired by modern Express.js best practices
Happy coding! 🎉
Made with ❤️ by bhaveshsinghal95182
