Skip to content

Yannx79/MiniHexagonal

Repository files navigation

MiniHexagonal

A minimal Java Spring Boot project that implements the Hexagonal Architecture pattern (a.k.a. Clean Architecture or Ports & Adapters).
It showcases a basic CRUD for Product with layers clearly separated into Domain, Application, and Infrastructure.

Architecture Layers

  • domain: Business model (Product) and core rules
  • application:
    • port/in: Use case interfaces (e.g. CreateProductUseCase)
    • port/out: Interfaces for persistence and external access
    • service: Implements the use cases
  • infrastructure:
    • web: REST controller, DTOs, mappers
    • persistence: JPA entities, repositories, adapters
    • config: Spring beans and wiring

API Endpoints

Method Endpoint Description Body Required
POST /products Create a new product Yes
GET /products List all products No
GET /products/{id} Get product by ID No
PUT /products/{id} Update product by ID Yes
DELETE /products/{id} Delete product by ID No

To explore and test the API, Swagger UI is available at:

OpenAPI Documentation

About

MiniHexagonal is a minimalistic Spring Boot application implementing the Hexagonal Architecture (Ports and Adapters) pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages