stack-profile:clean-architecture-stack
Clean Architecture (Go, Chi, PostgreSQL, Docker, Testify) overview
A Go application organized according to Clean Architecture principles, with concentric layers enforcing a strict dependency rule: entities at the core, use cases orchestrating business logic, and adapters at the outer ring handling HTTP (Chi router), database (pgx for PostgreSQL), and external service integration. Each layer communicates through interfaces, enabling the domain to be tested in complete isolation. Testify provides assertion helpers and mocking for comprehensive test suites. Docker containers ship the statically-linked Go binary. The tradeoff is more packages and interfaces than idiomatic Go typically uses, but the separation ensures that business rules remain stable even as frameworks and databases change.
Attributes
Outgoing edges
- domain:software-engineering·DomainSoftware Engineering
- domain:backend·DomainBackend
- language:go·LanguageGo
- library:chi·LibraryChi
- library:pgx·Librarypgx
- library:sqlx-go·Librarysqlx (Go)
- library:zap·LibraryZap
- tool:docker·ToolDocker
- tool:docker-compose·ToolDocker Compose
- language:sql·LanguageSQL
- workflow:architecture-decision·WorkflowArchitecture Decision
- workflow:code-review·Workflow
- skill-area:domain-driven-design·SkillAreaDomain-Driven Design
- skill-area:backend-api-design·SkillAreaBackend API Design
- skill-area:backend-data-persistence·SkillAreaBackend Data Persistence
- skill-area:unit-testing·SkillAreaUnit Testing
- skill-area:containerization·SkillArea
- role:backend-engineer·RoleBackend Engineer
- role:architect·RoleArchitect