How sipman/butterfly-framework works
Main Components
A. Framework Core (Butterfly Library)
• Request/Response Handlers
• Router System
• Application Container
• Annotation System
• Static File Handler
B. Clean Architecture Layers (from Example)
• Presentation Layer (Endpoints & Presenters)
• Application Layer (Use Cases)
• Domain Layer
• Infrastructure Layer (Repositories)
Connection and Flow Representation
• Blue: Framework Core Components
• Green: Interface Adapters
• Yellow: Use Cases
• Red: Domain Layer
• Purple: Infrastructure Layer
Specific Implementation Details
Concrete examples from the project:
• Task-related endpoints (CreateNewTask, GetTaskById, ListActiveTasks)
• Task domain entity
• Task repository
• Associated use cases and their components
Create distinct sections for:
a) Framework Infrastructure
• How the Application class orchestrates everything
• Demonstrate routing mechanism
b) Clean Architecture Implementation
• Flow from endpoints through use cases to repositories
• Separation of concerns
Additional Elements
• Notes about the annotation system (@Body, @Param, @TransferObject)
• How static file serving is integrated
Key Relationships to Highlight
• How endpoints connect to use cases
• How presenters format the response
• How repositories implement persistence interfaces
• How the domain model (Task) is used across layers
The request/response flow through the system
Remember to maintain a balance between showing the framework's infrastructure and the Clean Architecture implementation, as both are crucial aspects of the system.