jukylin/esim
53.0
Adequate · 21 September 2026
10.4k
lines of production code
Go
primary language
4
measurements over time
What this system is
This release introduces a comprehensive microservices scaffolding and code generation ecosystem, featuring a new CLI tool that automates the creation of Go projects with Gin, Beego, and gRPC templates. It significantly expands the application's infrastructure layer with a centralized dependency injection container, a unified configuration package, and robust client implementations for HTTP, gRPC, MySQL, Redis, and MongoDB, all enhanced with observability features like OpenTracing and Prometheus metrics. Additionally, the release adds automated infrastructure scaffolding, structured logging, and various utility packages for code generation and file management.
Features
Add MongoDB client implementation with monitoring and metrics
The MongoDB integration now includes a new client implementation (mongodb.go) that supports connection pooling, configuration via options, and event monitoring. The change introduces a MgoEvent interface and a MonitorEvent struct that intercepts MongoDB command events (Start, Succeeded, Failed) to enable tracing, slow query logging, and Prometheus metrics collection. Tests verify the monitoring pipeline and spy event functionality.
mongodb · high confidence
Add OpenTelemetry/Tracing implementation and tests
Introduced a new tracing module in the opentracing package, providing functions to initialize a Jaeger-based tracer and create child spans from a context. The implementation includes unit tests for the tracer initialization and span creation logic, ensuring correct behavior for parent-child span relationships and environment configuration.
opentracing · high confidence
Add Prometheus metrics endpoint
The application now exposes a Prometheus metrics endpoint at /metrics. A new \prometheus\ package provides a \Prometheus\ struct that starts an HTTP server to serve metrics, with a corresponding test suite verifying the initialization and null-proxy behavior.
prometheus · high confidence
Add db2entity code generation tool
Introduce the db2entity tool, a new utility for generating entity, DAO, and repository code from database schemas. The tool supports configurable output paths for entities, data access objects, and repositories, and can optionally inject generated code into the infrastructure layer. A corresponding test suite validates the generation pipeline and error handling.
tool/db2entity · high confidence
Add domain-file code generation for entity, DAO, and repository layers
The \tool/db2entity/domain-file\ package now includes the complete implementation for generating domain-layer files. This adds support for creating Entity structs, DAO interfaces and implementations, and Repository interfaces and implementations from database schema metadata. The change introduces new files including \columns.go\ for database column parsing, \entity\_domain\_file.go\ and \dao\_domain\_file.go\ for generating the respective Go files, and corresponding templates (\entity\_template.go\, \dao\_template.go\, \repo\_template.go\) that define the code structure. Unit tests are added for each component to verify the generation logic.
tool/db2entity/domain-file · high confidence
Add example tester with unit test coverage
A new example tester was added to the codebase, including a basic implementation in \tool/tester/example/example.go\ and a corresponding unit test in \example\_test.go\ that verifies the example function returns true.
tool/tester/example · high confidence
Add file and directory utility functions and backup/recovery helpers
A new \file-dir\ package is introduced, providing utilities for file and directory management (creation, existence checks, empty directory checks, and path resolution) along with \EsimBackUpFile\ and \EsimRecoverFile\ functions that copy files to and from a backup directory under \$GOPATH/pkg/esim/backup/\. The change also adds a write abstraction with \IfaceWriter\ and concrete implementations (\NullWrite\, \EsimWrite\, \ErrWrite\), accompanied by corresponding unit tests.
pkg/file-dir · high confidence
Add infrastructure layer for example tool
The example tool now includes a new infrastructure package that provides an \Infra\ struct containing dependencies like \container.Esim\ and \redis.Client\. This change introduces a dependency injection setup using \wire\ and a singleton pattern for managing the infrastructure components.
tool/db2entity/example · medium confidence
Add protoc code generation tool and tests
Introduced a new \protoc\ tool that wraps the \protoc\ compiler to generate Go code from \.proto\ files, including a \Protocer\ struct that parses package names, resolves proto paths, and executes the \protoc\ command with gRPC plugins. The change also adds corresponding unit tests for the parsing and execution logic.
tool/protoc · high confidence
Add proxy factory for chaining multiple proxy layers
A new proxy package introduces a factory pattern that allows multiple proxy layers to be chained together. The \Factory\ manages the initialization and linking of proxy instances that implement the \Proxy\ interface, enabling a pipeline where each proxy can pass requests to the next in the chain. This provides a structured way to apply cross-cutting concerns like filtering or caching in a composable manner.
proxy · high confidence
Add scaffolding templates for generating new Go projects with Gin, Beego, and gRPC
The \tool/new\ package now includes a comprehensive set of Go template files that generate the structure for a new microservice project. This includes templates for the main application entry point, command-line interface (using Cobra), and infrastructure layer (using Wire for dependency injection). It provides support for HTTP servers using either the Gin or Beego frameworks, each with corresponding controllers, routers, and middleware configurations. Additionally, it generates gRPC server and client templates, domain entities, data access objects (DAO), and repository interfaces. The generated project structure also includes configuration files for monitoring, tracing, and database connections, along with a \.golangci.yml\ for linting and a \go.mod\ file.
tool/new · high confidence
Add template execution and struct generation utilities
Added new template execution and struct generation utilities in the templates package. This includes a Tpl interface with TextTpl and HTMLTpl implementations for executing Go templates, a StructInfo struct that generates Go struct definitions from field metadata, and a set of string manipulation functions (e.g., snake\_case to camelCase, case conversion) used by the templates. Unit tests were added to verify the new functionality.
pkg/templates · high confidence
Add tracer ID extraction and generation utilities
Added the \pkg/tracer-id\ package, which provides a \TracerID\ function for generating local process-unique identifiers and an \ExtractTracerID\ function that retrieves a trace ID from a context, supporting both OpenTracing (Jaeger) spans and a custom \ActiveEsimKey\ context value. The package includes corresponding unit tests to verify the extraction logic across nil contexts, custom context values, and Jaeger span contexts.
pkg/tracer-id · high confidence
Added Esim container for centralized configuration and dependency injection
A new Esim struct and its associated functional options (WithTracer, WithLogger, WithConf, WithPromer, WithEsimZap) have been added to the container package. This introduces a centralized container for managing application state, including logging, configuration, Prometheus metrics, and OpenTracing support, initialized via the NewEsim function.
container · medium confidence
Added HTTP request monitoring and tracing middleware
The middleware package now includes new capabilities for observability. It registers Prometheus metrics (a counter and histogram for request counts and duration) and provides Go- and Beego-specific middleware functions to expose these metrics. Additionally, it introduces OpenTracing-based request tracing and a recovery middleware that safely handles panics and logs errors without crashing the application.
middle-ware · medium confidence
Added gRPC client and server implementations with test coverage
Introduced new gRPC client and server components in the grpc package. The client implementation (grpc\_client.go) provides a configurable client with support for OpenTracing, Prometheus metrics, keep-alive settings, and a global stub for testing. The server implementation (grpc\_server.go) sets up a gRPC server with similar middleware support including panic recovery, tracing, and metrics. A new ClientConn manager (client\_conn.go) was added to collect and manage multiple client connections, and comprehensive unit tests were added for both client and server functionality.
grpc · high confidence
Added ifacer tool for generating Go interface stubs and mocks
Introduced the ifacer utility in the tool/ifacer directory, which parses Go interfaces and generates corresponding stub or mock implementations. The change includes the core ifacer logic (ifacer.go, ifacer\_template.go), unit tests (ifacer\_test.go), and example files (example/ifacer.go, example/mocks/Test.go, example/repo/repo.go) that demonstrate the tool's capability to handle complex signatures, including variadic arguments, channels, and nested interfaces.
tool/ifacer · high confidence
Automated infrastructure scaffolding for dependency injection
Added new files in the \infra\ package to support automated generation of the application's dependency injection setup. The \infraer.go\ file introduces the \Infraer\ struct, which uses AST manipulation to parse, modify, and write Go source code for the \Infra\ struct, its \Close\ and \HealthCheck\ methods, and the \wire.NewSet\ configuration. A template in \infra\_set\_template.go\ generates the \wire.NewSet\ block, while \interface.go\ defines the \Infra\ interface. Tests in \infraer\_test.go\ and \infra\_set\_template\_test.go\ verify the generation logic. This change enables the tooling to automatically update the infrastructure layer with new dependencies.
infra · high confidence
Introduce MySQL client with proxy chain and observability
Added a new MySQL client implementation that supports multiple database connections, configurable proxy chains (including a monitoring proxy for metrics, tracing, and slow SQL logging), and a dummy proxy for testing. The change also introduces Prometheus metrics for MySQL operations and includes integration tests for the client and proxy behavior.
mysql · high confidence
Introduce Redis client with monitoring, metrics, and proxy support
The Redis module now provides a full-featured client implementation, including a connection pool, a \ContextConn\ interface, and a proxy chain architecture. A \MonitorProxy\ wraps Redis commands to capture OpenTracing spans, Prometheus metrics (counters, histograms, and gauges), and logging. A \FacadeProxy\ and \SpyProxy\ are also introduced to support layered proxying and testing. The client supports configuration for pool size, timeouts, and authentication, and exposes helper functions for parsing Redis replies.
redis · high confidence
Introduce automated build and test runner tool
A new \tool/tester\ package has been added to the codebase. This tool monitors specified directories for file changes and automatically triggers Go tests, the \wire\ code generator, \mockery\ for interface mocks, and \golangci-lint\ for static analysis. The implementation includes a file watcher, a tester orchestrator, and corresponding unit tests.
tool/tester · high confidence
Introduce code generation tool for struct factories
Added a new Go package under tool/factory that provides a code generation tool for creating struct factories. The implementation includes factory logic (factory.go), field extension and configuration helpers (extend\_info.go), and a corresponding test suite (factory\_test.go) that validates the generation of constructor functions, option patterns, and field sorting.
tool/factory · high confidence
Introduce configurable HTTP client with proxy chain and observability
The \http\ package now provides a \Client\ that supports a chain of \http.RoundTripper\ proxies, allowing middleware-like behavior such as monitoring, slow-request detection, and stubbing. The client exposes \Get\, \Post\, \PostForm\, and \Head\ methods, and allows configuration of timeout, logger, and proxy chain via options. A \GlobalStub\ variable enables test doubles for HTTP calls. Observability is added via Prometheus metrics (\http\_total\, \http\_duration\_seconds\) and OpenTracing integration in the \MonitorProxy\, which can log slow requests and debug information based on configuration flags.
http · high confidence
Introduce esim CLI tool with code generation and testing subcommands
A new CLI tool is added to the repository, providing several subcommands for developers: 'db2entity' to generate entity, DAO, and repository code from database tables; 'factory' to generate struct constructors and options; 'ifacer' to create empty struct implementations for interfaces; 'new' to scaffold new projects; 'protoc' to compile protobuf files; and 'tester' to run tests and related tools like wire and mockery. The tool is built using the Cobra framework and integrates with Viper for configuration management.
tool/cmd · high confidence
Introduce new pkg utilities for AST parsing, command execution, and code generation
Added new files in the pkg package to support code generation and tooling: ast\_expr.go provides a parser for Go AST expressions; exec\_cmd.go introduces a CmdExec struct and interface for running external commands (wire, mockery, golangci-lint, gofmt, go test, go build); field.go and imports.go define structs and template-based stringifiers for Go struct fields and import blocks; func.go adds a helper to convert directory paths to import paths; time.go and var.go provide utilities for handling time and variable declarations; and corresponding test files (field\_test.go, func\_test.go, imports\_test.go, var\_test.go) validate the new functionality.
pkg · high confidence
Introduce structured logging and GORM integration
Added a new logging subsystem in the \log\ package, featuring a \Logger\ interface and a \nullLogger\ implementation. The core \logger.go\ provides a structured logging wrapper around \uber-go/zap\, supporting debug, info, warn, and error levels with context-aware tracing. Additionally, a \gorm\_logger.go\ implementation bridges GORM's logging interface to the new system, allowing database queries to be logged with trace IDs and timing information. Tests were added for all new components.
log · high confidence
Introduces Transports interface for server lifecycle management
A new Transports interface is added to the transports package, defining the Start and GracefulShutDown methods for managing the server's lifecycle. This change establishes a contract for server initialization and graceful shutdown, likely to support future implementations or refactoring within the transports module.
transports · high confidence
New config package with in-memory and null configuration backends
The application now includes a new \config\ package that provides a unified interface for configuration management. This introduces two new configuration backends: an in-memory store (\MemConfig\) for testing or temporary state, and a null implementation (\NullConfig\) that returns default/empty values. The package also includes a \ViperConf\ implementation that loads configuration from YAML files using the \spf13/viper\ library, supporting multiple config file merging. A test suite validates the behavior of all configuration types.
config · high confidence
Dependencies
Updated Go dependencies for Go 1.13 compatibility
The project's go.mod and go.sum files have been updated to specify Go version 1.13 and include a range of updated dependencies, including gin v1.6.3, gorm v1.20.0, and redigo v2.0.0, ensuring the project's dependencies are current and compatible with the specified Go version.
(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 53 → 53 (-0.4)
- Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 91 → 95 (+3.5)
- Architecture 100 → 93 (-7.3)
- Maturity 45 → 45 (+0.0)
- Readiness 37 → 42 (+4.6)
- Security 95 → 70 (-24.8)
- Domain Modelling 81 → 81 (+0.0)
Resolved (13)
- 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) (pkg/file-dir/file_dir.go)
- Duplicated block (14 lines × 2) (pkg/templates/interface.go)
- Duplicated block (15 lines × 2) (mysql/mysql.go)
- Duplicated block (16 lines × 2) (http/monitor_proxy.go)
- Duplicated block (17 lines × 2) (tool/factory/factory.go)
- Duplicated block (20 lines × 2) (mongodb/mongodb.go)
- Duplicated block (7 lines × 2) (infra/infraer.go)
- No exposed public API
- OSV Dependency Vulnerabilities not included (check did not complete)
- Test reliability not included
- dormant codebase — no living knowledge left to concentrate
New (79)
- ClassTooLong: EsimFactory (tool/factory/factory.go)
- Critical CVE: [GHSA redacted] (go.sum)
- 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/grpc-ecosystem/grpc-opentracing
- Dependency pinned to a stale untagged commit: github.com/martinusso/inflect
- Dependency pinned to a stale untagged commit: github.com/opentracing-contrib/go-stdlib
- Dependency pinned to a stale untagged commit: github.com/prometheus/client_model
- Dependency pinned to a stale untagged commit: github.com/serenize/snaker
- Dependency pinned to a stale untagged commit: github.com/vektra/mockery
- Dependency pinned to a stale untagged commit: golang.org/x/net
- Dependency pinned to a stale untagged commit: golang.org/x/tools
- Deprecated module: go.mongodb.org/mongo-driver
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
- Duplicated block (10 lines × 2) (grpc/grpc_client.go)
- Duplicated block (11 lines × 2) (redis/spy_proxy.go)
- Duplicated block (12 lines × 2) (pkg/file-dir/file_dir.go)
- Duplicated block (13 lines × 2) (http/slow_proxy.go)
- …and 59 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
jukylin/esim 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 7c71f9643f787b5e69f4bd004a718a0c0df2c701 — 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.