Learn the Architecture in One Hour
GoDDD uses Hexagonal Architecture, where each domain module follows three-layer separation. Master these core concepts and you'll be productive with the framework.
APIHTTP Handlers — Route registration, validation, response wrapping
CoreBusiness Logic — Domain models, business rules, interface definitions
StorePersistence — Database CRUD, caching, data migration
Core Concepts
Domain Modules
Each business domain (users, orders, products, etc.) has its own independent API / Core / Store three-layer structure, decoupled and independently testable.
Dependency Injection
Wire performs compile-time dependency injection with zero runtime reflection overhead. Core depends on Store via interfaces, enabling mock testing.
Functional Options
Constructors use the Functional Options pattern for flexible optional configuration while keeping APIs clean and backward-compatible.
Unified Error Handling
Core returns business error codes, API layer auto-maps to HTTP status codes and standardized JSON responses, fully traceable across the entire chain.