npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

create-express-clean

v1.0.6

Published

Generate Express.js project with Clean Architecture

Readme

Express Clean Architecture Generator

NPM Version Downloads License: MIT

🚀 A powerful CLI tool for generating Express.js projects with Clean Architecture principles baked in.

FeaturesInstallationQuick StartDocumentationContributing


🌟 Overview

Express Clean Architecture Generator is a CLI tool designed to streamline the process of creating robust Express.js applications. It implements Uncle Bob's Clean Architecture principles, providing a solid foundation for building scalable and maintainable Node.js applications.

✨ Features

Architecture & Structure

  • 🏗️ Clean Architecture Implementation
    • Domain-driven design approach
    • Clear separation of concerns
    • Modular and maintainable structure

Database Integration

  • 🐘 PostgreSQL Support

    • Built-in connection setup
    • Repository pattern implementation
    • Migration structure
  • 🍃 MongoDB Support

    • Mongoose integration
    • Schema templates
    • Repository abstractions

Developer Experience

  • 🛠️ Pre-configured Tools

    • ESLint for code linting
    • Prettier for code formatting
    • Jest for testing
    • Nodemon for development
  • 📝 Documentation

    • Comprehensive inline comments
    • API documentation setup
    • Swagger integration ready

🚀 Quick Start

Installation

npx create-express-clean

Interactive Setup

📂 Project name: your-project-name

──────────────────────────────────────────────────
🔧 Select your database engine:
──────────────────────────────────────────────────
1. 🐘 PostgreSQL - Robust relational database
2. 🍃 MongoDB   - Flexible NoSQL database
3. ❌ None      - No database setup
──────────────────────────────────────────────────

📁 Project Structure

src/
├── app.js                # Application setup
├── server.js             # Server entry point
│
├── application/          # Application business rules
│   ├── services/        # Application services
│   └── use-cases/       # Use case implementations
│
├── domain/              # Enterprise business rules
│   ├── entities/        # Business entities
│   ├── repositories/    # Repository interfaces
│   ├── services/        # Domain services
│   └── value-objects/   # Value objects
│
├── infrastructure/      # Frameworks & drivers
│   ├── logger/         # Logging implementation
│   └── security/       # Security configurations
│
└── interfaces/         # Interface adapters
    ├── controllers/    # Request handlers
    ├── middlewares/    # Express middlewares
    ├── routes/         # Route definitions
    └── validators/     # Input validation

🛠️ Getting Started

1. Create Your Project

npx create-express-clean

2. Navigate to Project Directory

cd your-project-name

3. Configure Environment Variables

cp .env.example .env

4. Start Development Server

npm run dev

⚙️ Configuration

PostgreSQL Configuration

DB_HOST=localhost
DB_PORT=5432
DB_NAME=your_database
DB_USER=your_username
DB_PASSWORD=your_password

MongoDB Configuration

MONGODB_URI=mongodb://localhost:27017/your_database

📜 Available Scripts

| Command | Description | |---------|-------------| | npm run dev | Start development server with hot-reload | | npm start | Start production server | | npm test | Run tests | | npm run lint | Run ESLint | | npm run format | Format code with Prettier |

📚 Documentation

Architecture Overview

Our implementation follows the Clean Architecture principles:

  1. Domain Layer: Contains business logic and rules
  2. Application Layer: Orchestrates the flow of data
  3. Infrastructure Layer: Implements technical capabilities
  4. Interfaces Layer: Handles external communications

Database Setup

PostgreSQL Integration

// Example repository implementation
class UserRepository implements IUserRepository {
  async findById(id: string): Promise<User> {
    // Implementation
  }
}

MongoDB Integration

// Example mongoose schema
const userSchema = new Schema({
  name: { type: String, required: true },
  email: { type: String, unique: true }
});

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Created with ❤️ by Afauzi

Show your support

Give a ⭐️ if this project helped you!


Built with Clean Architecture principlesMade for modern Node.js developmentOpen for community contributions