@liquidcars/atlas-geometry-architecture-hexagonal
v0.1.0
Published
Hexagonal Architecture (Ports and Adapters) geometry pack for LiquidCars Atlas
Maintainers
Readme
@liquidcars/atlas-geometry-architecture-hexagonal
An Atlas geometry pack for Hexagonal Architecture, also known as the Ports and Adapters pattern.
The visual vocabulary emphasizes the pattern's fundamental inside/outside boundary. Driving and driven ports and adapters use different colors and arrow directions, while the application core remains independent of concrete technology.
Install
npm install @liquidcars/atlas @liquidcars/atlas-geometry-architecture-hexagonalImporting the package registers every geometry:
import "@liquidcars/atlas";
import "@liquidcars/atlas-geometry-architecture-hexagonal";Geometry IDs
| Collection | Geometry IDs |
| --- | --- |
| Core | architecture.hexagonal.application, architecture.hexagonal.domain, architecture.hexagonal.use-case |
| Ports | architecture.hexagonal.port, architecture.hexagonal.driving-port, architecture.hexagonal.driven-port |
| Adapters | architecture.hexagonal.adapter, architecture.hexagonal.driving-adapter, architecture.hexagonal.driven-adapter |
| Actors & Systems | architecture.hexagonal.actor, architecture.hexagonal.external-system, architecture.hexagonal.repository, architecture.hexagonal.message-broker |
| Testing | architecture.hexagonal.test-adapter, architecture.hexagonal.mock-adapter |
The generic port and adapter geometries expose a direction parameter whose driving and driven values visibly change both the accent color and arrow orientation. All geometries support Atlas aspect modifiers such as compact, wide, tall, deep and flat through their canonical 3D dimensions.
Example
version: 1
entities:
- id: customer
name: Customer
geometry: architecture.hexagonal.actor
- id: http
name: HTTP API
geometry: architecture.hexagonal.driving-adapter
- id: application
name: Orders
geometry: architecture.hexagonal.application
- id: persistence
name: Persistence adapter
geometry: architecture.hexagonal.driven-adapter
- id: orders-db
name: Orders database
geometry: architecture.hexagonal.repository
relations:
- from: customer
to: http
- from: http
to: application
- from: application
to: persistence
- from: persistence
to: orders-dbMetadata and provenance
The pack declares its author, MIT license, collections, search metadata and conceptual source through the Atlas geometry-pack metadata contract. The shapes are original procedural Atlas geometries and include no third-party artwork.
Terminology follows Alistair Cockburn's original 2005 article, Hexagonal Architecture. The hexagon represents the inside/outside distinction and provides room for multiple ports; the number six has no architectural significance.
License
MIT © LiquidCars S.L.
