feat(generator): add Hepha CLI tool for automated feature module generation#721
Open
MrRomo wants to merge 1 commit intomarcoturi:mainfrom
Open
feat(generator): add Hepha CLI tool for automated feature module generation#721MrRomo wants to merge 1 commit intomarcoturi:mainfrom
MrRomo wants to merge 1 commit intomarcoturi:mainfrom
Conversation
…ration Introduce Hepha, a powerful code generator CLI tool that automates the creation of feature modules following the project's architectural patterns (DDD, Clean Architecture, CQRS, Vertical Slice Architecture). Features: - Generate complete feature modules with commands, queries, DTOs, domains, and repositories - Support for short command aliases (-c, -q, -d, -m, -r, -a) for faster usage - Smart file detection to prevent overwriting existing code - Incremental generation (add components to existing modules) - Full TypeScript type safety with proper exception handling - Automatic integration with Fastify routes and command/query bus Components generated: - Commands: State-changing operations with handlers, routes, and schemas - Queries: Data-retrieval operations with pagination support - DTOs: Request/response validation using TypeBox - Domain: Business logic, entities, and domain-specific errors - Repository: Database access layer with type-safe operations - Mapper: Transformations between domain, persistence, and response layers Documentation: - Added comprehensive HEPHA.md guide with examples and workflows - Updated README.md with Hepha section and quick start - Included Greek mythology reference (Hephaestus, god of craftsmen)
Author
|
It is inspired on NestJS Cli generator, but just for project repo |
Owner
|
Thanks @MrRomo for taking the time to propose this MR. I appreciate the idea and I agree that having scaffolding tools in place can be very useful. That said, I’m not fully convinced that introducing a custom manual script is the best long-term approach, as it would add another piece of tooling to maintain. I’d suggest we first evaluate whether existing, well-supported tools can already cover this use case. I’ll leave this MR open for now to gather additional feedback from the community and better understand the level of interest before deciding on next steps. Thanks again for bringing this forward! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce Hepha, a powerful code generator CLI tool that automates the creation of feature modules following the project's architectural patterns (DDD, Clean Architecture, CQRS, Vertical Slice Architecture).
Features:
Components generated:
Documentation: