node-project-gen 0.0.4

โšก Blazing fast, architecture-aware Node.js backend generator. Scaffold production-ready projects in under 1 second.
node-project-gen-0.0.4 is not a library.

Node Project Gen โšก

Lightning-fast Node.js backend scaffolding CLI built in Rust.

Node Project Gen allows you to generate production-ready, scalable, and secure Node.js backends in seconds. It bridges the gap between simple boilerplate and complex enterprise frameworks by providing opinionated architectural patterns and modern best practices out of the box.

License Rust Node.js


๐Ÿš€ Speed Demo

Acrocoder scaffolds a complete project with authentication, database integration, logging, validation, and Docker support in less than 1 second.

โœจ Features

  • Blazing Fast: Compiled Rust binary for near-instant execution.
  • Multiple Architectures: Clean Architecture, MVC, Modular, Hexagonal, and Microservices.
  • Framework Support: Express, Fastify, and NestJS.
  • Database Ready: PostgreSQL, MongoDB, MySQL, and SQLite (Prisma, Mongoose, Sequelize, TypeORM).
  • Batteries Included Auth: JWT, Sessions, OAuth (Google/GitHub), and Firebase.
  • Production Grade:
    • ๐Ÿ›ก๏ธ Security: Helmet, HPP, Rate-limiting.
    • ๐Ÿ“ Logging: Winston or Pino.
    • โœ… Validation: Zod or Joi.
    • ๐Ÿงช Testing: Jest or Vitest.
    • ๐Ÿณ DevOps: Docker, Docker Compose, and GitHub Actions CI/CD.
    • ๐Ÿ“– API Docs: Swagger (OpenAPI 3.0) integration.

๐Ÿ“ฆ Installation

Via Cargo

cargo install node-project-gen

Via NPM

npx node-project-gen create my-api


๐Ÿ›  Usage

Create a New Project

The create command is the main entry point for scaffolding.

# Basic project

acrocoder create my-api


# Custom project with specific stack

acrocoder create my-api \

  --arch clean \

  --framework express \

  --db postgres \

  --auth jwt \

  --test vitest

Options:

  • --arch: clean, mvc, modular, hexagonal, microservice
  • --framework: express, fastify, nest
  • --db: postgres, mongodb, mysql, sqlite
  • --auth: jwt, session, oauth, firebase
  • --test: jest, vitest
  • --validation: zod, joi
  • --logger: winston, pino
  • --skip-install: Skip automatic npm install
  • --git: Initialize git repository (default: true)

Generate Modules

Generate new resources or components in an existing project.

# Generate a full CRUD module

acrocoder generate module users --crud


# Generate middleware

acrocoder generate middleware auth

Add Features

Easily add complex configurations to an existing project.

acrocoder add docker

acrocoder add swagger

acrocoder add cicd

acrocoder add websocket


๐Ÿ“‚ Architecture Overview

Acrocoder supports multiple patterns. For example, the Clean Architecture layout:

src/
โ”œโ”€โ”€ domain/            # Entities & Business Rules
โ”œโ”€โ”€ application/       # Use Cases & Services
โ”œโ”€โ”€ infrastructure/    # DB, Repositories, External Services
โ”œโ”€โ”€ presentation/      # Controllers, Routes, Validators
โ””โ”€โ”€ core/              # Shared interfaces & global errors

While the Modular layout organizes by domain:

src/
โ”œโ”€โ”€ modules/
โ”‚   โ”œโ”€โ”€ auth/          # Controllers, Services, Routes for Auth
โ”‚   โ”œโ”€โ”€ user/          # Controllers, Services, Routes for User
โ”‚   โ””โ”€โ”€ health/        # Health check module
โ”œโ”€โ”€ shared/            # Shared utils & middleware
โ””โ”€โ”€ core/              # Core configs

๐Ÿ›  Built With

  • Clap - Command Line Argument Parser
  • Serde - Serialization/Deserialization
  • Colored (via ANSI) - ANSI Escape Codes for UI
  • Tokio (Logic-only) - Optional Async features

๐Ÿ“„ License

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


๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Generated with โค๏ธ by Acrocoder