How guinetik/hexafun works
Project type and purpose
• From the README and file tree, HexaFun is not a web-app or microservice but a Java framework/library implementing a functional, declarative DSL for building Hexagonal-Architecture applications.
• It provides core DSL classes (HexaApp, UseCaseBuilder, UseCase, etc.), functional primitives (Result), testing support, and example applications (manual and todo).
File structure
• Top level
• pom.xml → Maven coordinates; JDK17+
• src/main/java/com/guinetik/hexafun
• Core packages (src/main/java/com/guinetik/hexafun):
• hexa → hexagonal contracts (InputPort, OutputPort, UseCase, ValidationPort, builder steps)
• fun → functional primitives (Result)
• root package → DSL entry point (HexaFun, HexaApp, HexaAppImpl)
• testing → test-DSL (HexaTest, UseCaseTest, MockAdapters)
• examples → sample apps (“manual” DSL example, “todo” example)
• Tests mirror these core packages.
README for additional insights
Driving Adapter → Input Port (UseCase) → Business Logic / Domain Model → Output Ports → Adapters
• The DSL allows you to define pipelines via .from().to().and() that compile into UseCase objects within a HexaApp.
Detail without overthinking
• Builder → registry → execution pipeline.
• Don’t worry about exhaustive Java-class listing; group related classes into logical components (e.g., “UseCase Builder” for all builder step classes).