How pedrohenriqueveiga/desafio works
Main Components
a) External Layer:
• Client/Consumer Layer (showing REST endpoints)
• File Upload Interface (for data_1.txt/data_2.txt processing)
b) Application Core:
• REST Controllers Layer
• Use Cases/Interactor Layer
• Service Layer
• Repository Layer
• Database Layer (H2 in-memory)
Architectural Patterns to Highlight
The project follows Clean Architecture principles with clear separation of concerns:
• API Layer (Controllers, DTOs)
• Domain Layer (Entities, Repository interfaces)
• Implementation Layer (Concrete implementations)
• Infrastructure Layer (Exception handling, configurations)
Component Relationships
[External Clients] → [REST Controllers]
• ↓
[DTOs] ←----------→ [Use Cases/Interactors]
• ↓
[Service Layer] ←-→ [Gateway Interfaces]
• ↓
[Repository Implementation] → [Database]
Specific Elements
a) Controllers:
• QuoteController (POST /v1/quote/process, GET /v1/quote/search)
• AspectRestController (for logging/monitoring)
b) Core Components:
• CreateQuoteInteractor
• QuoteServiceGateway
• FileService
• QuoteRepositoryGateway
c) Data Flow:
• File Input Processing
• Quote Entity Mapping
• Data Aggregation
• Response Formation
Technical Details to Highlight
• Java 17 environment
• Spring Boot framework
• H2 Database
• Maven build system
Infrastructure Layer (Configurations, Exception Handling)
Annotations for:
• File processing patterns
• Data transformation rules
• Validation points
• Error handling paths
Remember to:
• Keep components aligned with the package structure
• Clear dependency directions
• Notes for critical business rules
This will provide a clear visualization of how the quote processing system works, from file input through to response generation, while maintaining the clean architecture principles evident in the codebase.