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 🙏

© 2024 – Pkg Stats / Ryan Hefner

nest-hexagon-cli

v3.1.0

Published

nestjs tools for hexagonal architecture

Downloads

14

Readme

NestJS Hexagonal Architecture Generator

npm version License

A command-line interface (CLI) tool that generates modules in hexagonal architecture for NestJS, making it easy to follow the principles of clean architecture and separation of concerns.

Features

  • Scaffold modules using the hexagonal architecture pattern
  • Generate service, controller, repository, and DTO files
  • Automatically wire up dependencies using NestJS decorators
  • Promote a modular and maintainable code structure
  • Enhance separation of concerns and testability
  • Enable better code organization and scalability

Installation

npm install -g nest-hexagon-cli

Usage

To generate a module using the hexagonal architecture pattern, simply run the following command:

nest-hexagon generate module <module-name>

This will create a new module in the current directory with the specified name, along with the necessary files and folder structure.

Examples

Generate a new module named users:

nest-hexagon generate module users

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request.

Roadmap

Here are some ideas and potential features for future development:

  • Support for generating other components such as guards, interceptors, and pipes
  • Integration with popular testing frameworks to generate test files
  • Support for customizing the generated code templates
  • Ability to generate modules with additional configuration options
  • Improved error handling and user-friendly error messages

Feel free to contribute by implementing any of these features or suggesting your own!

Acknowledgements

This project is inspired by the principles of hexagonal architecture and the clean architecture movement. Special thanks to the NestJS community for their amazing work and support.

Contact

For any questions or inquiries, please contact [email protected].


We hope this CLI tool helps you build modular and maintainable applications with NestJS and the hexagonal architecture pattern. Happy coding!

Note: This is a sample readme file. You can modify it as per your requirements and add more details specific to your npm library.

Ideas for Improvement

Here are a few ideas to enhance your NestJS hexagonal architecture generator:

  1. Interactive CLI: Create an interactive command-line interface that guides users through the module generation process, allowing them to choose options and configure different components.
  2. Code Templates: Implement a system that allows users to define custom code templates for different files, enabling them to tailor the generated code to their specific needs.
  3. Integration with TypeORM: Extend the generator to integrate with TypeORM, enabling the generation of database-related files such as entities, migrations, and query builders.
  4. Configuration Options: Add support for configuration files where users can define default options for the generator, making it easier to maintain consistency across projects.
  5. Testing Support: Incorporate testing frameworks such as Jest or Mocha to generate test files alongside the module scaffolding, promoting a test-driven development (TDD) approach.
  6. Documentation Generation: Include a feature to generate API documentation using tools like Swagger or Compodoc, automating the process of documenting the generated modules.