Skip to content
CAI
Software that uses CAICheck a score

muharihar/d3ta-go

40.0

Weak · 21 September 2026

23.6k

lines of production code

Go

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add COVID-19 data retrieval with caching and multi-provider support

This change introduces the application layer for retrieving current COVID-19 data by country. The \CurrentSvc\ service implements a caching strategy that first checks a temporary cache (backed by the application's cacher) for existing data; if the data is not found, it fetches the latest statistics from configured data providers (such as \covid19goid\ and \who\) in parallel, caches the result for 10 minutes, and returns the aggregated response. The implementation includes domain schemas, DTOs, and infrastructure adapters that map external data to the internal model.

modules/covid19 · high confidence

Add email sending and RBAC enforcer services

The system now includes services for sending emails via SMTP and enforcing role-based access control (RBAC) using Casbin. The SMTP service supports sending single or multiple emails with specific MIME formats (HTML or text) and configurable sender details. The Casbin service initializes an enforcer with a GORM adapter to manage user, group, and role-based permissions. Tests are provided for both services.

system/service · high confidence

Add initialization and connection management for cache, database, and indexer subsystems

The system now supports initializing and managing connections for three distinct subsystems: cache (supporting Redis and GoMacaron engines), database (supporting MySQL, PostgreSQL, SQLite, and SQL Server via GORM), and indexer (supporting configurable engines). Each subsystem includes dedicated initialization functions (e.g., OpenAllCacheConnection, LoadAllDatabaseConnection, OpenAllIndexerConnection) that iterate over configuration to establish connections, and the database module includes a function to close all active database connections. Tests have been added to verify the successful initialization and basic operation of each subsystem.

system/initialize · high confidence

Add internal context and request handling for system operations

Introduced a new internal context package (system/context) that provides a Ctx type for managing system-level operations. This includes a CtxRequest struct to capture request details like user agent, host name, remote address, and method, with specific default values for system context. The implementation includes a RealIP method to retrieve the current IP address, supporting internal system identification and request context management.

system/context · high confidence

Add system utilities for file, network, and generation tasks

The system/utils package now includes new utility functions for checking file existence, generating unique identifiers (UUIDs), passwords, client/secret keys, registration activation codes, and semantic version strings. It also provides network utilities to retrieve the current host IP address and hostname, as well as hash functions for MD5 and SHA-256. Each utility is accompanied by corresponding unit tests.

system/utils · high confidence

Initial configuration scaffolding for the application

Added the initial configuration files for the application, including a sample YAML config (config-sample.yaml) that defines database connections, IAM settings, SMTP servers, caches, and indexers. Also added Casbin RBAC model configurations for both keymatch and REST-based access control.

conf · high confidence

Initial configuration schema for application, security, and infrastructure

The system introduces a comprehensive configuration structure to manage application settings, security policies, and infrastructure connections. This includes definitions for server and REST API options, identity management with JWT and Casbin integration, database and cache connection details, SMTP server settings, and directory locations. A new \NewConfig\ function is provided to load and unmarshal these settings from a YAML file, supporting hot-reloading via Viper. A test is also added to verify the configuration loading process.

system/config · high confidence

Initial database schema and seed data for IAM, GeoLocation, and Email modules

The database layer now includes the initial migration scripts and seed data for the Identity and Access Management (IAM), GeoLocation, and Email modules. This adds the necessary database structures and default records, including a default super-admin user and client application, Casbin RBAC policies, country data for geolocation, and default email templates for account activation and registration.

database · high confidence

Initial implementation of the authentication module with layered architecture

The \modules/auths\ directory now contains a complete, layered implementation for user authentication, including domain entities (e.g., \SysUser\, \TmpUserRegistration\), schema definitions for requests and responses (e.g., \LoginRequest\, \RegisterRequest\), and validation logic. The application layer provides an \AuthenticationSvc\ that orchestrates registration, activation, and login flows, integrating with an email service to send activation codes. The infrastructure layer implements the \IAuthenticationRepo\ interface to handle database operations via GORM, while tests have been added to verify the service and repository logic.

modules/auths · high confidence

Initial release of DDD Technical Architecture Patterns in Go

The repository now includes the core Go application structure, including a main entry point, a development configuration for the Air hot-reload tool, and an updated README with comprehensive setup and usage instructions. This initial commit establishes the project's foundation, featuring a REST API built with the Echo framework, DDD layered architecture modules for authentication, email, and geolocation, and support for multiple databases and caching providers.

(repo-wide) · high confidence

Initial release of d3ta-go with CLI, server, and data connectors

The application is introduced as a simple DDD Layered Architecture in Go, providing a CLI interface with commands for database migrations, server management, and version checking. It includes REST API endpoints for CAPTCHA generation and verification, error handling utilities, and connectors for fetching COVID-19 data from Indonesian and WHO sources.

(repo-wide) · high confidence

Initial release of the Geolocation module with full CRUD and search capabilities

The geolocation module is introduced, providing a complete set of operations for managing country data. This includes standard Create, Read, Update, and Delete (CRUD) operations for country records, as well as specialized functionality for searching and refreshing an integrated ElasticSearch indexer. The module also establishes the foundational service layer, domain models, and data transfer objects required to support these features.

modules/geolocation · high confidence

Initial release of the REST API interface layer

The interface layer is introduced, providing the HTTP/REST endpoints for the application. This includes authentication endpoints (register, login, activate), a health check, and OpenAPI/Swagger documentation. It also exposes features for managing email templates, retrieving and indexing country data, and fetching COVID-19 statistics. The implementation includes a JWT verification middleware, a base feature structure for error handling and session management, and comprehensive test coverage for all exposed endpoints.

interface · high confidence

Introduce ElasticSearch indexer with multi-version support

The system now includes a new ElasticSearch indexer implementation that supports ElasticSearch versions 6, 7, and 8. This adds the capability to index and search documents in an ElasticSearch cluster, with the specific version and configuration options (addresses, username, password, cloud ID, API key) handled through a unified engine interface. The implementation provides full CRUD operations (create, read, update, delete) for indices and documents, along with search capabilities, enabling the application to leverage ElasticSearch for data indexing and retrieval.

system/indexer · high confidence

Introduce a pluggable caching system with Redis and GoMacaron adapters

A new caching subsystem has been added to the system, providing a unified interface for storing and retrieving data. The implementation includes a core \Cacher\ wrapper that manages key prefixes and delegates operations to specific engine adapters. Two backend adapters are provided: one for Redis (using \go-redis\) and one for GoMacaron cache (supporting Redis, Memcache, MySQL, PostgreSQL, and other backends via the \go-macaron/cache\ library). The system also includes configuration parsers to translate application settings into the required options for each adapter. Tests are included to verify the functionality of both adapters.

system/cacher · high confidence

Introduce email domain models and schemas for templates and sending

The email module's domain layer now includes the foundational data structures for email templates and email sending. This includes the \Email\, \EmailTemplate\, and \EmailTemplateVersion\ entity models, along with their corresponding request and response schemas. The \SendEmailRequest\ schema introduces a \ProcessingType\ field that allows users to specify whether an email should be sent synchronously or asynchronously.

modules/email/la/domain · high confidence

Introduce email sending and email template management capabilities

The email module's application layer now provides the core services for sending emails and managing email templates. Users can send emails with support for synchronous or asynchronous processing, CC/BCC recipients, and template data injection. Additionally, the system allows for the creation, update, listing, and activation/deactivation of email templates, with all operations protected by role-based access control (RBAC) via Casbin. The implementation includes application services, data transfer objects (DTOs), and infrastructure repositories that handle SMTP sending and database persistence.

modules/email/la/application · high confidence

Introduce identity management with JWT and Casbin integration

Added new files in the system/identity package to handle authentication and authorization. This includes JWT token generation, parsing, and refresh logic, as well as an Identity struct that integrates with Casbin for access control. The implementation supports both user and system identities, with specific constants and claim structures for anonymous and system-level access.

system/identity · medium confidence

Introduce the central Handler component for managing application resources

A new Handler struct has been added to the system, serving as a central registry for database connections (GORM), Casbin enforcers, cache instances, and indexers. This component allows the application to store and retrieve these critical resources by name, providing a unified way to access and manage these dependencies throughout the system.

system/handler · high confidence

Behavioural changes

Updated Swagger UI styles

The visual appearance of the Swagger UI has been updated with new CSS rules, likely reflecting a version upgrade or theme adjustment for the API documentation interface.

www · medium confidence

Dependencies

Initial Go module and dependency setup

The project introduces a Go module definition (go.mod) and its corresponding checksum file (go.sum), establishing the project as 'github.com/muharihar/d3ta-go' with Go 1.14. This change adds a comprehensive set of dependencies for the application's core features, including the Echo web framework, JWT authentication, validation libraries, and database drivers (MySQL, PostgreSQL, SQLite, SQL Server) via GORM. It also includes libraries for caching (Redis, file, memory), Elasticsearch clients (v6, v7, v8), and various utility packages like UUID generation and logging.

(dependencies) · medium 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 37 → 40 (+3.5)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 95 → 96 (+1.5)
  • Architecture 100 → 73 (-26.6)
  • Maturity 49 → 49 (+0.0)
  • Readiness 12 → 21 (+9.0)
  • Security 96 → 65 (-31.0)
  • Domain Modelling 41 → 53 (+12.5)

Resolved (33)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • Duplicated block (10 lines × 2) (modules/auths/la/application/service/base.go)
  • Duplicated block (10 lines × 2) (modules/geolocation/crud/domain/service/country_svc.go)
  • Duplicated block (10 lines × 3) (system/indexer/adapter/elasticsearch/config.go)
  • Duplicated block (11 lines × 2) (connector/covid19/covid19goid/covid19.go)
  • Duplicated block (11 lines × 2) (connector/covid19/covid19goid/covid19.go)
  • Duplicated block (12 lines × 2) (interface/restapi/feature/auths.go)
  • Duplicated block (12 lines × 2) (modules/email/la/infrastructure/repository/email_template_repo.go)
  • Duplicated block (13 lines × 3) (database/migrations/MS0302_seed_data_email.go)
  • Duplicated block (13 lines × 3) (modules/email/la/infrastructure/repository/email_template_repo.go)
  • Duplicated block (14 lines × 2) (interface/restapi/feature/auths.go)
  • Duplicated block (14 lines × 7) (interface/restapi/feature/email.go)
  • Duplicated block (15 lines × 3) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (16 lines × 15) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (16 lines × 2) (modules/geolocation/crud/domain/service/country_svc.go)
  • Duplicated block (16 lines × 2) (system/config/config.go)
  • Duplicated block (16 lines × 3) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (16 lines × 3) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (5 lines × 2) (modules/auths/la/infrastructure/repository/auth_repo.go)
  • …and 13 more

New (99)

  • Critical CVE: [GHSA redacted] (go.sum)
  • Critical CVE: [GHSA redacted] (go.mod)
  • Critical CVE: [GHSA redacted] (go.sum)
  • Dependency pinned to a stale untagged commit: github.com/dchest/captcha
  • Dependency pinned to a stale untagged commit: github.com/elastic/go-elasticsearch/v8
  • Dependency pinned to a stale untagged commit: github.com/go-macaron/cache
  • Dependency pinned to a stale untagged commit: github.com/golang/glog
  • Duplicated block (10 lines × 2) (connector/covid19/covid19goid/covid19.go)
  • Duplicated block (10 lines × 2) (modules/covid19/la/infrastructure/adapter/covid19/covid19goid/covid19goid.go)
  • Duplicated block (10 lines × 2) (modules/email/la/infrastructure/repository/email_template_repo.go)
  • Duplicated block (10 lines × 3) (modules/email/la/infrastructure/repository/email_template_repo.go)
  • Duplicated block (10 lines × 3) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (10 lines × 4) (database/migrations/MS0302_seed_data_email.go)
  • Duplicated block (10 lines × 7) (interface/restapi/feature/email.go)
  • Duplicated block (11 lines × 2) (interface/restapi/feature/auths.go)
  • Duplicated block (13 lines × 2) (connector/covid19/covid19goid/covid19.go)
  • Duplicated block (13 lines × 2) (modules/auths/la/application/service/base.go)
  • Duplicated block (13 lines × 3) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (15 lines × 15) (system/indexer/adapter/elasticsearch/indexer_es6.go)
  • Duplicated block (15 lines × 2) (modules/geolocation/crud/domain/service/country_svc.go)
  • …and 79 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

muharihar/d3ta-go 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 27ad6844f2c5cf38d1753fa0d346d612e7de5eb9 — 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.