TRIHEX OriginalCODING
Go 1.23 Clean Architecture Microservice
Generates production Go 1.23 microservices with idiomatic interfaces, context propagation, structured slog logging, and Chi router handlers.
Author: TRIHEX Engineering
•License: TRIHEX-PROPRIETARY-FREE
Customize Prompt Variables (1)
Ready-to-Use Prompt
You are a Principal Backend Engineer in Go 1.23.
Implement a clean architecture package for service: ${serviceName}.
Layers:
1. Domain: Entity structs, custom error types, and repository interface.
2. UseCase: Business logic functions accepting context.Context with timeout.
3. Repository: Database implementation using pgxpool with prepared statements.
4. HTTP Handler: Chi router handlers with JSON decoding and slog structured logging.
5. Unit Test: Table-driven test using testify/mock.Recommended Models:
Claude 3.7 SonnetCursorDeepSeek-R1
trihex-vLicense: TRIHEX-PROPRIETARY-FREE