How martincastroalvarez/hexagonal-spring-boot works
This is a Spring Boot/React application for e-commerce and workforce administration. The main user journey runs from frontend pages and forms through API requests to HTTP controllers, application services, and persistence adapters, with DTO/domain/entity mapping at the boundaries. README documents the hexagonal layers and the broader user, product, schedule, meeting, and messaging capabilities. Some feature implementations and frontend API wiring were not sampled, so those relationships are omitted or marked unverified.
Main entry points: web HTTP controllers · Pages.tsx Management pages · out Repository ports · ProductService.java Product and transactions
Components 18
Web client
- Management pages
web/src/Pages.tsx - Forms and widgets
web/src/Forms.tsx - API client
web/src/Api.tsx - Client state
web/src/Store.tsx
HTTP adapters
- HTTP controllers
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web - Auth and errors
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/HexagonalController.java - Request and response DTOs
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/dto
Domain and application
- Product and transactions
app/src/main/java/com/martincastroalvarez/hex/hex/domain/services/ProductService.java - Schedule and time off
app/src/main/java/com/martincastroalvarez/hex/hex/domain/services/ScheduleService.java - Users and authentication
app/src/main/java/com/martincastroalvarez/hex/hex/domain/models/User.java - Meetings and messaging
app/src/main/java/com/martincastroalvarez/hex/hex/application - Repository ports
app/src/main/java/com/martincastroalvarez/hex/hex/domain/ports/out - Domain errors
app/src/main/java/com/martincastroalvarez/hex/hex/domain/exceptions/HexagonalException.java
Persistence adapters
- JPA repositories
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/db - Database entities
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/entities - Model mappers
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/mappers
Other components
- User
- Relational database
Connections 19
- User → Management pages: uses
README.md - Management pages → Forms and widgets: renders
web/src/Pages.tsx - Management pages → API client: requests data
web/src/Pages.tsx - Management pages → Client state: updates state
web/src/Pages.tsx - API client → HTTP controllers: sends HTTP
- HTTP controllers → Auth and errors: inherits behavior
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/ProductController.java - HTTP controllers → Request and response DTOs: maps responses
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/ProductController.java - HTTP controllers → Product and transactions: invokes
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/ProductController.java - HTTP controllers → Schedule and time off: invokes
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/ScheduleController.java - HTTP controllers → Meetings and messaging: invokes
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/MeetingController.java - HTTP controllers → Users and authentication: authenticates
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/web/HexagonalController.java - Product and transactions → Repository ports: uses repositories
- Schedule and time off → Repository ports: uses repositories
- Meetings and messaging → Repository ports: uses repositories
- Repository ports → JPA repositories: implemented by
README.md - JPA repositories → Model mappers: converts models
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/db/JpaPurchaseRepository.java - Model mappers → Database entities: maps entities
app/src/main/java/com/martincastroalvarez/hex/hex/adapters/mappers/ProductMapper.java - JPA repositories → Relational database: reads and writes
README.md - Product and transactions → Domain errors: raises domain errors
app/src/main/java/com/martincastroalvarez/hex/hex/domain/services/ProductService.java