An adapter connects business logic to the outside world in a hexagonal architecture. Inbound adapters handle external requests and invoke business logic; outbound adapters let business logic access external systems. section 3.3.2
Adapters work through ports defined by the business logic:
- An inbound adapter invokes an inbound port, such as a service interface, when handling a request. section 3.3.2
- An outbound adapter implements an outbound port and makes requests to an external system, such as a database or remote service. section 3.3.2
FTGO application
FTGO uses REST API and web UI adapters to handle incoming requests. Outbound adapters connect business logic to MySQL and services such as Stripe and Twilio. section 2.1.1
Figure 3.16 An example of a hexagonal architecture, which consists of the business logic and one or more adapters that communicate with external systems. The business logic has one or more ports. Inbound adapters, which handles requests from external systems, invoke an inbound port. An outbound adapter implements an outbound port and invokes an external system.
Shows business logic at the center, with ports connecting it to inbound and outbound adapters. section 3.3.2
The business logic depends on ports, not on adapters; adapters depend on the business logic. This keeps external interfaces around the core rather than making the core depend on them. section 3.3.2
















