project-layout
project-layout copied to clipboard
How to combine Hexagonal Architecture with this layout?
trafficstars
I am trying to make use of this layout with hexagonal architecture. Is there a subset of this layout for that purpose or anybody here knows of one from somewhere else?
For now, I am using the folders like this:
- Domain Logic & Entities:
internal/domain - Service Layer interface & implementations:
internal/app/service - Datasource interfaces (either database or outer services):
internal/app/repo - Datasource *implemenrtations:
- Database:
internal/transport/egress/db - Outer Services (no matter REST and gRPC):
internal/transport/egress/http
- Database:
- Server methods:
- Served REST API methods:
pkg/api/http - Served gRPC methods:
pkg/api/grpc
- Served REST API methods: