Hexagonal service (ports and adapters)

c4v1

/01 Architecture overview

A service whose domain core depends only on ports; adapters for HTTP, messaging and persistence plug in at the edges.

Curated · enterprise · CC-BY-4.0 · Published by Lattix · 9 elements · 9 relationships · 1 views

Read full architecture description

The business logic sits at the centre and talks to the outside world only through ports it defines. Adapters translate between those ports and real technologies, so the core can be tested on its own and technologies can change without touching it. When to use: services with meaningful business rules, a long expected life, several ways in (API, events, batch) or a database that may change. Trade-offs: a testable, technology-independent core at the cost of more interfaces and mapping code. Keep it light for thin CRUD services.

/02 Architecture views

View 1 of 1
Componentsc4
100%

Semantic inspector

Select a diagram block or edge, or use the accessible lists below. Inspection does not modify the architecture.

Package-wide semantic coverage

Diagram presence is not evidence of architectural correctness or compliance. Counts describe only the loaded, authorized package snapshot.

Depicted elements
9 / 9
Depicted relationships
9 / 9
Relationships with missing endpoints
0
Unresolved view references
0
Architecture reference evidence

Four independent observations from this authorized package snapshot. This is not a quality score, engineering validation, security assessment, or compliance determination. Missing information cannot be assumed correct.

  • Structural consistency

    Criterion observed

    0 observed defects

    Integrity findings: 0; duplicate viewpoint keys: 0

    Detected duplicate identities, missing relationship endpoints, unresolved diagram bindings, and duplicate viewpoint keys. No findings does not prove the model is correct.

  • Diagram coverage

    Criterion observed

    18/18 depicted records

    Elements: 9/9; relationships: 9/9

    Recorded semantic elements and relationships appearing in at least one diagram. Presence alone is not validation.

  • Recorded relationship traceability

    Criterion observed

    9/9 documented connections

    Relationships with missing endpoints: 0

    Relationships with both endpoints recorded and all three identities depicted somewhere in the package. Diagram locations need not be the same viewpoint; paths are not inferred.

  • Description evidence

    Observed gaps

    9/18 described records

    Elements: 9/9; relationships: 0/9

    Records containing a nonempty descriptive summary or description attribute. Labels and IDs are not sufficient; presence does not verify technical accuracy.

Evidence rule set: hub-reference-evidence.v1. Counts are per recorded item, including duplicate records; absence of detected findings does not attest correctness.

Model integrity and coverage findings (0 integrity, 0 coverage)

Integrity findings identify inconsistent recorded references or identities. Coverage findings identify valid recorded items absent from diagrams. Neither category measures security posture, correctness of intent, or regulatory compliance.

Showing 0 of 0 findings

No findings in this category.

Diagram elements (9)
Diagram relationships (9)

Select an element or relationship to inspect its attributes, connections, and diagram appearances.

Read diagram as structured elements and relationships

Elements (9)

  • Application coreApplication Component

    Use cases that orchestrate the domain model.

  • Domain modelApplication Component

    Entities, value objects and business rules, with no technology dependencies.

  • Inbound portInterface/Endpoint

    What the core offers: its use cases.

  • Outbound portInterface/Endpoint

    What the core needs: persistence and messaging, as interfaces it owns.

  • HTTP adapterApplication Component

    Turns requests into use-case calls.

  • Messaging adapterApplication Component

    Consumes and publishes messages.

  • Persistence adapterApplication Component

    Implements the outbound port against the database.

  • Service databaseData Store

    The service's own data.

  • CallerBusiness Actor

    Another system or a user interface.

Relationships (9)

  • Calleruses →HTTP adapter
  • HTTP adapteruses →Inbound port
  • Messaging adapteruses →Inbound port
  • Application corerealizes →Inbound port
  • Application coreuses →Domain model
  • Application coreuses →Outbound port
  • Persistence adapterrealizes →Outbound port
  • Messaging adapterrealizes →Outbound port
  • Persistence adapteraccesses →Service database

/03 Complete model inventory

Explore every element by type. Diagram navigation above shows one viewpoint at a time.

Application Component (5)
  • Application core
  • Domain model
  • HTTP adapter
  • Messaging adapter
  • Persistence adapter
Interface/Endpoint (2)
  • Inbound port
  • Outbound port
Data Store (1)
  • Service database
Business Actor (1)
  • Caller