The presentation layer is an application’s front desk: it displays information, captures input, and passes user actions along for processing. It might render a web page, accept a form submission, or return an API response. It knows how to show things, not the underlying business rules. section 4.2.3
In a common four-layer design, presentation sits above application, domain, and infrastructure. The application layer coordinates use cases; the domain holds business rules; infrastructure handles external concerns such as databases and email. Keeping those jobs separate helps prevent a controller from becoming a catch-all for application logic. section 4.2.3 section 4.7.4
Saving an order
A user submits an order through the interface. Presentation sends a “Save Order” command and its input data to the application layer, which coordinates the work. Results can travel back up for presentation to display. Commands move downward; lower layers do not initiate commands back up. section 4.6.1 section 4.2.3
Where a controller sits depends on how the layers are drawn. One arrangement treats HTTP and web concerns as presentation responsibilities; another places request-handling controllers in an application-layer folder while keeping the client UI in presentation. Make the boundary explicit, then enforce the intended dependencies with automated architectural tests. section 4.7.4 section 4.4.1
/my-project/src/
/api/ # Application Layer (part 1)
controllers.js
routes.js # Handles HTTP, validation, calls service
/app/ # Presentation layer
app.js # Main UI (React/Angular/Vue, etc) code
Index.html
/domain/ # Domain Layer
order.js
widget.js # Widget class with business logic
/lib/ # Infrastructure Layer (part 2)
emailClient.js # Other external services
/repositories/ # Infrastructure Layer (part 1)
widgetRepository.js # Database code
/services/ # Application Layer (part 2)
orderService.js # Orchestrates the “create order” use case
widgetService.jsThis project layout shows one way to separate a client-side UI from controllers, services, domain logic, and infrastructure. section 4.4.1
Don’t confuse this application layer with the OSI presentation layer: the latter formats and translates data for communication, rather than providing an application’s user interface. section 4.8.2 section 4.2.3

