Skip to content

Conversation

@MrRomo
Copy link

@MrRomo MrRomo commented Oct 25, 2025

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)

…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)
@MrRomo
Copy link
Author

MrRomo commented Oct 25, 2025

It is inspired on NestJS Cli generator, but just for project repo

@marcoturi
Copy link
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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants