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 🙏

© 2025 – Pkg Stats / Ryan Hefner

hexagonizer

v1.1.7

Published

CLI para generar proyectos y entidades hexagonales en Node.js

Readme

🧱 Hexagonizer

Hexagonizer es una herramienta de línea de comandos (CLI) para generar proyectos Node.js con arquitectura hexagonal limpia, organizados en capas como dominio, infraestructura, interfaces HTTP, casos de uso y pruebas automatizadas.

🚧 Work in Progress (WIP) – El proyecto está en desarrollo activo. Algunas funciones están completas y otras en construcción.


📦 Instalación

npm install -g hexagonizer

Esto instalará el comando global:

hexagonizer

🚀 ¿Qué hace Hexagonizer?

  • ⚙️ Inicializa un proyecto base con:

    • Estructura hexagonal lista para trabajar
    • Servidor Express preconfigurado
    • Middlewares comunes (auth, checkRole, rateLimiter, etc.)
    • Rutas y controladores conectados automáticamente
    • Frontend simple (index.html) de bienvenida
  • 🧱 Genera entidades completas, listas para usar:

    • Clase de dominio con campos base (id, active, createdAt, etc.)
    • Repositorio In-Memory
    • Casos de uso (create, update, get, delete, deactivate)
    • Validaciones dinámicas según los atributos
    • Pruebas unitarias completas
    • Configuración de filtros, orden y búsqueda (queryConfig)
    • Rutas + middlewares integrados al servidor
  • 🔁 Soporte para entidades desde JSON schema personalizado (en desarrollo)


🧪 Cómo usar

1. Iniciar un nuevo proyecto

hexagonizer

Luego seleccioná la opción "Init project" y seguí las instrucciones del asistente interactivo.


2. Generar una entidad genérica

hexagonizer

Elegí "Generate entity" y escribí el nombre (por ejemplo user).

Esto creará:

📁 src/
  └── domain/user/User.js
  └── application/user/
  └── infrastructure/user/
  └── interfaces/http/user/
📁 tests/application/user/

Todo enlazado automáticamente con el servidor y middlewares.


3. (WIP) Generar entidad desde JSON

hexagonizer

Luego elegí la opción "Generate entity from JSON schema" y proporciona el archivo.

⚠️ Aún está en desarrollo. Genera algunos archivos, pero puede requerir ajustes manuales.


📁 Estructura generada

hexagon-project/
├── src/
│   ├── domain/
│   ├── application/
│   ├── infrastructure/
│   ├── interfaces/
│   │   └── http/
│   │       ├── middlewares/
│   │       └── <entity>/
│   ├── config/
│   └── index.js
├── tests/
│   └── application/<entity>/
└── package.json

🔍 Estado actual

| Funcionalidad | Estado | | ---------------------------------- | --------------- | | CLI interactivo | ✅ Completo | | Init de proyecto base | ✅ Completo | | Generar entidad genérica | ✅ Completo | | Validaciones dinámicas | ✅ Completo | | Middlewares de consulta (q, etc) | ✅ Completo | | Tests automáticos por entidad | ✅ Completo | | Generación desde JSON schema | 🚧 Parcial | | Modularización vía scripts | ✅ Completo | | Instalación global via npm | ✅ Desde v1.1.0 |


📣 Contribuciones

Este proyecto está en constante evolución. Si querés ayudar, proponer ideas o reportar errores, ¡sos bienvenido!


🧾 Licencia

MIT © 2025 — Franco Toledo