Practical implementation of Hexagonal Architecture (Ports and Adapters) in Go. A learning resource for building scalable, maintainable systems with clean architecture principles.
Features
- Core business logic isolated from frameworks
- Multiple adapters: REST API (Gin), PostgreSQL, SQLite
- BDD testing with Godog
- Clear separation of concerns
Technical Stack
Go
Clean Architecture
Gin
PostgreSQL
Structure
/internal
/adapter
/handler (REST, gRPC)
/repository (PostgreSQL, SQLite)
/core
/entity
/port
/service