GSabadini/go-clean-architecture
54.6
Adequate · 20 September 2026
2.6k
lines of production code
Go
primary language
4
measurements over time
What this system is
This system is a Go-based banking service that manages accounts and monetary transfers using a clean architecture. It provides HTTP APIs for creating accounts, executing transfers, and querying balances, backed by dual database support for both PostgreSQL and MongoDB. The application enforces domain logic for balance checks and currency handling while offering configurable logging and router implementations.
Features
Added database initialization scripts for MongoDB and PostgreSQL
New initialization scripts have been added to set up the 'bank' database schema for development environments. The MongoDB script (\_scripts/mongodb/init.js) creates a 'dev' user with root privileges, initializes the 'bank' database, and defines 'accounts' and 'transfers' collections with a unique index on the CPF field. The PostgreSQL script (\_scripts/postgres/init.sql) grants privileges to the 'dev' user and creates corresponding 'accounts' and 'transfers' tables with specified columns and constraints.
_\scripts · high confidence
Initial domain model for accounts, transfers, and money
The domain layer now defines the core entities for the banking application, including Account, Transfer, and Money. The Account entity encapsulates balance management with Deposit and Withdraw methods that enforce sufficient balance checks, while the Transfer entity models transactions between accounts. A dedicated Money type is introduced to handle currency values internally as integers (cents), and UUID generation utilities are provided for entity identification.
domain · high confidence
Initial project scaffolding with multi-database support and Docker tooling
The repository is initialized with a Go application implementing a clean architecture for banking operations (account management and transfers). The project now supports both PostgreSQL and MongoDB, configured via environment variables in .env.example. A multi-stage Dockerfile and docker-compose.yml are provided to run the application alongside its database dependencies, along with a Makefile for managing builds, tests, and container lifecycle.
(repo-wide) · high confidence
Introduce Gin HTTP server implementation with graceful shutdown
The router infrastructure now includes a new Gin-based HTTP server implementation (infrastructure/router/gin.go) alongside the existing Gorilla Mux version. This new server supports graceful shutdown via signal handling and exposes the same API endpoints (/v1/transfers, /v1/accounts, /v1/health) as the Gorilla Mux server, allowing users to switch to the Gin framework for potentially better performance or different middleware capabilities.
infrastructure/router · high confidence
Introduces configurable logging with Zap and Logrus backends
The infrastructure/log package now provides a factory-based approach to logger instantiation, allowing the application to switch between Zap and Logrus implementations via the NewLoggerFactory function. This change adds concrete adapters for both Zap (using production configuration) and Logrus (with JSON formatting), along with a LoggerMock for testing purposes, enabling users to configure their preferred logging backend at startup.
infrastructure/log · high confidence
New API actions, presenters, and repository adapters for account and transfer operations
The adapter layer now includes HTTP action handlers for creating accounts, creating transfers, finding account balances, and listing all accounts and transfers, along with corresponding presenter components that map domain entities to use-case outputs. Repository implementations for both PostgreSQL (SQL) and MongoDB (NoSQL) are added to persist accounts and transfers, supporting operations like creation, balance updates, and retrieval. A middleware logger is introduced to capture request and response details, and standardized response and error handling structures are provided for consistent API communication.
adapter · high confidence
New use-case implementations for account and transfer operations
The usecase package now includes complete implementations and unit tests for five core business capabilities: creating a new account, executing a money transfer (with database transaction support), finding a specific account's balance, listing all accounts, and listing all transfers. Each use case defines its own input/output structures, presenter interfaces, and interactor logic, wired to the domain repositories.
usecase · high confidence
Support for PostgreSQL and MongoDB database backends
The application now supports connecting to both SQL (PostgreSQL) and NoSQL (MongoDB) databases. This change introduces configuration handling for both database types via environment variables, factory methods to instantiate the appropriate database handlers, and specific handler implementations that provide data access capabilities including transactions for PostgreSQL and session-based transactions for MongoDB.
infrastructure/database · high confidence
Dependencies
Initial Go module setup with web, database, and logging dependencies
The project initializes its Go module (go.mod) with Go 1.21 and introduces a set of core dependencies: the Gin web framework and Gorilla Mux for HTTP routing, the MongoDB Go driver and lib/pq for database connectivity, Logrus and Zap for logging, and go-playground/validator for input validation. Indirect dependencies include standard library extensions for compression, JSON handling, and cryptography.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 56 → 55 (-1.0)
- Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (+0.3)
- Architecture 100 → 74 (-25.9)
- Maturity 55 → 55 (+0.0)
- Readiness 33 → 36 (+2.8)
- Security 85 → 90 (+5.3)
- Domain Modelling 100 → 100 (+0.0)
Resolved (11)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- Duplicated block (13 lines × 2) (infrastructure/router/gin.go)
- Duplicated block (14 lines × 2) (adapter/api/action/find_all_account.go)
- Duplicated block (6 lines × 2) (adapter/presenter/create_transfer.go)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Test reliability not included
- dormant codebase — no living knowledge left to concentrate
New (33)
- Critical CVE: [GHSA redacted] (go.mod)
- Dependency pinned to a stale untagged commit: gopkg.in/mgo.v2
- Deprecated module: go.mongodb.org/mongo-driver
- Duplicated block (12 lines × 2) (adapter/api/action/find_all_account.go)
- Duplicated block (23 lines × 2) (infrastructure/router/gin.go)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: [GHSA redacted] (go.mod)
- Medium CVE: GO-2024-3105 (go.mod)
- Medium CVE: GO-2026-5024 (go.mod)
- Medium CVE: GO-2026-5970 (go.mod)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-COMPOSE-0002 (docker-compose.yml)
- Medium IaC: WD-DOCKER-0003 (Dockerfile)
- Medium IaC: WD-DOCKER-0004 (Dockerfile)
- …and 13 more
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
GSabadini/go-clean-architecture was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d88092281c40d8e0305bc1c8ce9019909e41fada — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-28e75b8e3254.