Skip to content
CAI
Software that uses CAICheck a score

EkoEdyP/RESTfulAPI-Clean-Architecture

45.8

Weak · 21 September 2026

524

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a Go-based REST API service designed to manage category resources using a clean architecture pattern. It exposes standard CRUD endpoints via the Echo web framework, handling input validation and structured error responses. The backend persists data in a PostgreSQL database through a dedicated repository layer, with business logic encapsulated in a use case layer.

Features

Added PostgreSQL implementation for Category repository

The application now includes a concrete PostgreSQL data access layer for managing categories. This new file implements the CategoryRepository interface, providing methods to save, update, delete, and retrieve categories (by ID or all) using raw SQL queries within database transactions. This change establishes the backend storage mechanism for category data, enabling the application to persist and query category information against a PostgreSQL database.

category/repository · high confidence

HTTP delivery layer for Category resource

The HTTP delivery layer for the Category resource has been implemented, exposing standard REST endpoints (GET, POST, PUT, DELETE) for managing categories. This new \category\_delivery.go\ file registers routes such as \/category\ and \/category/:categoryId\ and maps them to handler methods that process requests, invoke the underlying use case logic, and return standardized JSON responses. It also configures a global error handler to ensure consistent error reporting across these endpoints.

category/delivery · high confidence

Initial application entry point with PostgreSQL and Echo framework integration

The application now includes a main entry point (app/main.go) that initializes the server using the Echo framework and connects to a PostgreSQL database. It loads configuration from config.json via Viper, establishes a database connection with sslmode disabled, and wires up the category feature's repository, use case, and HTTP delivery layer. The server starts on the address specified in the configuration.

app · high confidence

Initial project scaffolding and configuration for Category REST API

This change introduces the foundational configuration and documentation files for the Category REST API project. It includes an OpenAPI specification (API-Spec.json) defining the Category endpoints, a Dockerfile for building the Go application, and a docker-compose.yaml file to orchestrate the API service with a PostgreSQL 15.3 database. Additionally, it adds a .gitignore file, a config.json for server and database settings, a test.http file for manual API testing, and a README.md outlining the implementation steps.

(repo-wide) · high confidence

Introduce CategoryUseCase for category management operations

Added the CategoryUseCase implementation in the category/usecase package, providing the business logic layer for category CRUD operations. This component handles input validation via go-playground/validator, manages database transactions using sql.DB, and delegates data persistence to the CategoryRepository, exposing Create, Update, Delete, FindById, and FindAll methods to the application layer.

category/usecase · high confidence

Introduce category domain models and request/response structures

Added new files defining the Category domain entity, its repository and use-case interfaces, and the delivery interface within the domain package. Introduced request and response structs for category creation, update, and general API responses, including validation tags and JSON serialization fields. These models support the underlying category management functionality by providing the data contracts for input validation and output formatting.

models · high confidence

Introduces structured error handling for API responses

The application now includes a centralized error handling mechanism in the exception package. This adds a NotFoundError type and an ErrorHandling function that intercepts errors during request processing, automatically mapping validation failures to 400 Bad Request, missing resources to 404 Not Found, and other issues to 500 Internal Server Error, all returning standardized JSON responses.

exception · high confidence

New helper package for error handling, JSON I/O, and transaction management

A new helper package has been introduced to standardize common operations across the application. It includes a PanicIfError utility for immediate error propagation, and JSON helper functions (ReadFromRequestBody, WriteToResponseBody) to simplify Echo context binding and response writing. Additionally, it provides model mapping functions for Category responses and a CommitOrRollback function to safely manage database transaction commits and rollbacks.

helper · high confidence

Dependencies

Initialize Go module with core dependencies

The project initializes its Go module (EchoEdyP/RESTfulAPI-Clean-Architecture) with Go 1.20 and adds four primary dependencies: the Echo web framework (v4.10.2), the lib/pq PostgreSQL driver (v1.10.9), the go-playground validator (v10.14.1), and Viper for configuration management (v1.16.0).

(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

Score

  • CAI 43 → 46 (+2.8)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (+0.0)
  • Architecture 69 → 69 (+0.0)
  • Maturity 45 → 45 (+0.0)
  • Readiness 21 → 27 (+5.5)
  • Security 93 → 92 (-1.3)
  • Domain Modelling 75 → 79 (+3.8)

Resolved (8)

  • Critical CVE: [GHSA redacted] (go.mod)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (go.mod)
  • Medium CVE: GO-2024-2598 (go.mod)
  • Medium CVE: GO-2026-5024 (go.mod)
  • Medium CVE: GO-2026-5970 (go.mod)
  • No exposed public API
  • single-maintainer — knowledge-concentration (bus factor) risk

New (18)

  • Critical CVE: [GHSA redacted] (go.mod)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no project overview (README.md)
  • High CVE: [GHSA redacted] (go.mod)
  • High CVE: [GHSA redacted] (go.mod)
  • High IaC: WD-DOCKER-0013 (Dockerfile)
  • Medium CVE: GO-2024-2598 (go.mod)
  • Medium CVE: GO-2026-5024 (go.mod)
  • Medium CVE: GO-2026-5970 (go.mod)
  • Medium IaC: WD-COMPOSE-0002 (docker-compose.yaml)
  • Medium IaC: WD-COMPOSE-0002 (docker-compose.yaml)
  • Medium IaC: WD-DOCKER-0003 (Dockerfile)
  • Medium IaC: WD-DOCKER-0003 (Dockerfile)
  • No ADRs found
  • Outdated: github.com/go-playground/validator/v10
  • Outdated: github.com/labstack/echo/v4
  • Outdated: github.com/lib/pq
  • Outdated: github.com/spf13/viper

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

EkoEdyP/RESTfulAPI-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 21 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 b4861b8504dc37db4a828001920dd04ed0f36821 — 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.