How pablisson/go-gateway works
Project type and purpose
• This is a Go-based backend service (an HTTP API “gateway”) with a clear layered architecture. It exposes endpoints, applies business logic, and persists data via a repository layer.
File structure
• cmd/app/main.go: application entrypoint that boots the HTTP server
• internal/web/server/server.go: configures and starts the HTTP server (router, middleware)
• internal/web/handlers: HTTP handlers (account_handler.go) that map routes to service methods
• internal/service: business-logic layer (account_service.go)
• internal/repository: data persistence adapters (account_repository.go)
• internal/domain: core domain definitions and repository interfaces (account.go, repository.go, errors.go)
• internal/dto: data‐transfer objects used at the HTTP boundary
• .env.example: environment variables (e.g., DB connection)
• go.mod / go.sum: module dependencies
README
• The README simply names the project (“go-gateway”)—we infer from the code that it’s a REST API gateway for account management.