Skip to content
CAI
Software that uses CAICheck a score

LordMoMA/Hexagonal-Architecture

57.7

Adequate · 21 September 2026

1.3k

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 web application built on a hexagonal architecture, exposing an HTTP API for managing users, messages, and payments. It handles user authentication, message CRUD operations, and integrates with Stripe for payment processing and webhook management. The system also includes a React-based frontend for checkout interactions and utilizes Redis for caching and PostgreSQL for data persistence.

Features

Add Redis-based caching adapter

A new Redis cache implementation has been introduced in the internal/adapters/cache package. This adds support for storing and retrieving cached data using a Redis client, providing Get, Set, and Delete operations that serialize values as JSON.

internal/adapters/cache · high confidence

Add Stripe checkout demo UI

A new React-based web interface has been added to the internal/web directory, featuring a product display component that renders a 'Checkout' button linked to a '/v2/create-checkout-session' endpoint. The UI includes CSS styling for the product card and button, and JavaScript logic in App.js to handle success and cancellation redirects from the Stripe checkout flow, displaying corresponding status messages to the user.

internal/web · high confidence

Added TCP round-trip time measurement utility

Added a new \MeasureRT\ function in \internal/monitoring/tcp.go\ that establishes a TCP connection to a specified address, sends a sample data packet, reads a response, and calculates the round-trip time. This provides a new capability for monitoring TCP connectivity and latency.

internal/monitoring · high confidence

Added structured logging and initial database schema

The application now includes a new internal logger that configures structured JSON logging for release environments and colored, human-readable output for development, with a custom formatter for file and line number tracking. Additionally, the initial database migration has been added, creating a 'users' table with UUID primary keys, email, password, and membership fields, and setting the table owner to 'test'.

internal/logger, internal/migrations · high confidence

Added test database management script and project documentation

The repository now includes a testDB.sh script that manages a PostgreSQL container for testing, allowing developers to easily start, run unit/integration tests, and clean up the test database. Additionally, a comprehensive README.md has been added, detailing the hexagonal architecture, project structure, and integration with services like Stripe and Redis, alongside a .gitignore file to exclude environment and build artifacts.

(repo-wide) · high confidence

Initial release of the Hexagonal Architecture application

The application now provides a complete HTTP API for managing messages, users, and payments. The main entry point initializes database connections (PostgreSQL), Redis caching, and logging, then registers routes for message CRUD operations, user authentication and membership updates, and payment checkout sessions. The server starts on port 4242.

cmd · high confidence

Introduced core service implementations for messaging, payments, and user management

Added new service layer implementations for handling messages, payments, and user operations. The diff introduces \MessengerService\ with CRUD operations for messages, \PaymentService\ for creating checkout sessions, and \UserService\ for user lifecycle management including login and membership status updates. These services act as the core business logic layer, delegating to their respective repository ports. The previous empty \services.go\ file was removed.

internal/core/services · high confidence

Introduced new HTTP handlers for user, message, payment, and webhook endpoints

The application now exposes new API endpoints for user management (create, read, update, delete), message handling (create, read, update, delete), and payment processing via Stripe. A centralized error handling mechanism has been added to standardize error responses. Additionally, a webhook handler has been implemented to process Stripe events and update user membership status.

internal/adapters/handler · high confidence

New core domain and port interfaces for messaging, users, payments, and caching

The application's core layer now exposes explicit interfaces for message, user, and payment operations, alongside a new cache repository interface. Users will see structured access to message creation, reading, updating, and deletion, as well as user management (create, read, update, delete, login, and membership status updates). Payment operations are exposed via a checkout session creation interface. Additionally, a new cache repository interface supports setting, getting, and deleting cached data with expiration times.

internal/core/ports · high confidence

Behavioural changes

Added application and reverse-proxy configuration files

The application now includes a new internal configuration module (config.go) that defines settings for API keys, JWT secrets, and Stripe integration. Additionally, an Nginx configuration file has been added to set up reverse proxy rules, routing /v1/ endpoints to the main application on port 5000 and /v2/create-checkout-session to a payments service on port 4242.

internal/config · high confidence

Added domain models for messaging, user accounts, and payments

The application's core domain layer now includes new data structures to support messaging, user management, and payment processing. Specifically, the codebase introduces a Message model for handling user communications, a User model that tracks email, password, and membership status, and a Payment model that captures buyer information and order details. These additions enable the system to store and manage user profiles, process transactions, and handle message data within the hexagonal architecture's domain layer.

github.com/LordMoMA/Hexagonal-Architecture · high confidence

Refactored repository layer with new configuration and user management

The repository adapter has been restructured to support a hexagonal architecture. A new configuration loader (apiCfg.go) reads environment variables for JWT, API, and Stripe keys. The database layer (db.go) now explicitly manages both PostgreSQL and Redis cache dependencies. User authentication and management have been implemented (user.go) with password hashing, JWT token generation, and cache invalidation. Message and payment repository methods have been added to handle CRUD operations and Stripe integration. The previous separate postgres.go and redis.go files have been removed, consolidating the database and cache logic into the new structure.

internal/adapters/repository · high confidence

Test coverage

Added comprehensive test coverage for user management operations

New test files were added to the internal/tests directory, introducing unit and integration tests for user-related functionality. The changes include a benchmark test for creating users, an integration test suite that validates the full lifecycle of a user (create, read, update, delete) against a real database, and unit tests covering user creation, retrieval, updates, and deletion scenarios.

internal/tests · high confidence

Dependencies

Updated Go and JavaScript dependencies

Updated Go dependencies to include gin v1.9.0, JWT v5.0.0, and Stripe v74.17.0, alongside various indirect dependencies. Added a new client-side web application in the internal/web directory, introducing React 16.9.0 and Stripe JS libraries for the checkout interface.

(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 52 → 58 (+5.5)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 99 → 99 (-0.3)
  • Architecture 69 → 66 (-3.3)
  • Maturity 53 → 52 (-0.5)
  • Readiness 68 → 73 (+4.6)
  • Security 48 → 62 (+14.2)
  • Domain Modelling 48 → 57 (+8.8)

Resolved (62)

  • Coverage not included — suite not readable by the collector
  • Critical CVE: [GHSA redacted] (go.mod)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical vulnerability: [GHSA redacted] (internal/web/package-lock.json)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (13 lines × 2) (internal/adapters/handler/message_handler.go)
  • Duplicated block (13 lines × 2) (internal/adapters/handler/message_handler.go)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • …and 42 more

New (109)

  • Critical CVE: [GHSA redacted] (go.mod)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical CVE: [GHSA redacted] (internal/web/package-lock.json)
  • Critical vulnerability: [GHSA redacted] (internal/web/package-lock.json)
  • Documentation: no contributor guidance (README.md)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10 lines × 2) (internal/adapters/handler/message_handler.go)
  • Duplicated block (11–12 lines × 5) (internal/adapters/handler/message_handler.go)
  • Duplicated block (19–20 lines × 2) (internal/adapters/handler/message_handler.go)
  • Duplicated block (8 lines × 2) (internal/core/ports/ports.go)
  • Duplicated block (9 lines × 2) (internal/adapters/handler/message_handler.go)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • High CVE: [GHSA redacted] (internal/web/package-lock.json)
  • …and 89 more

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

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

Survey your own repository

LordMoMA/Hexagonal-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 ec4958111e8a2ff638fc9c14f33102ec2b9890d1 — 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-fa71c66cabd8.