Skip to content
CAI
Software that uses CAICheck a score

VahidFarahmandian/Jinget

47.4

Weak · 20 September 2026

13.3k

lines of production code

C#

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Jinget is a .NET 10 library suite designed to accelerate the development of ASP.NET Core applications by providing infrastructure for CQRS, API scaffolding, and distributed tracing. It automates boilerplate generation for read models, Entity Framework mappings, and CRUD endpoints through source generators, while offering utilities for dynamic code execution, SQL generation, and fluent dependency injection scanning. The system also includes robust middleware for global exception handling and structured logging to Elasticsearch, along with handlers for consuming external REST and SOAP services.

How it got here

2021–2023 — Jinget rebranding and core expansion

27 changes.

The project was restructured and rebranded as Jinget, establishing a multi-project solution with comprehensive governance. Significant development focused on expanding Jinget.Core with dynamic code execution, SQL generation, and extensive extension methods, while introducing new infrastructure for external service handling and advanced Elasticsearch-based logging.

2024–2026 — Infrastructure and automation expansion

20 changes.

This period focused on expanding the infrastructure layer with new capabilities for dependency injection scanning, structured logging to Elasticsearch, and global exception handling with distributed tracing. It also introduced a source generator package to automate boilerplate code for read models, EF mappings, and Web APIs, accompanied by extensive test coverage for these new components.

Features

Added ElasticSearch logging provider

Users can now configure the application to send log messages to an ElasticSearch instance via the new \ElasticSearchLoggerProvider\. This provider registers through \ILoggingBuilder.AddElasticSearch()\, accepts configuration via \ElasticSearchLoggerOptions\, and batches log entries by date and hour before sending them to the configured ElasticSearch service. It automatically maps log severity based on the \isSuccess\ field in the log body and handles JSON parsing errors gracefully.

03-Infrastructure/Jinget.Logger/Providers/ElasticSearchProvider · high confidence

Added TraceFinalStatus enum for logging trace outcomes

A new TraceFinalStatus enumeration has been introduced in the Jinget.Logger module to represent the final state of a trace operation. This enum defines four distinct statuses—AwaitingResponse, Success, Warning, and Failed—allowing the logging infrastructure to clearly categorize the outcome of traced requests.

03-Infrastructure/Jinget.Logger/Enum · high confidence

Elasticsearch logging handler and repository implementation

The Jinget.Logger module now includes a dedicated command handler and repository layer for interacting with Elasticsearch. This change introduces the \ElasticSearchLoggingCommandHandler\ and \ElasticSearchLoggingRepository\ classes, which provide methods for indexing single or bulk log entries, retrieving the latest log, and searching logs with pagination and filtering options (by query string, username, or origin). The repository handles index creation and mapping configuration for log fields such as TraceIdentifier, SpanIdentifier, and PartitionKey, enabling structured storage and retrieval of distributed tracing data in Elasticsearch.

03-Infrastructure/Jinget.Logger/Handlers · high confidence

HTTP request and response logging middleware added

A new middleware component has been introduced to capture and log HTTP request and response details, including headers and body content. The implementation supports configurable blacklisting and whitelisting of headers, handles multipart/form-data and oversized payloads by trimming or truncating them, and respects a maximum body size limit. Preflight (OPTIONS) requests are skipped to avoid unnecessary logging overhead.

03-Infrastructure/Jinget.Logger/Middlewares · high confidence

Introduce Jinget External Service Handlers for REST and SOAP

This change adds the Jinget.Handlers.ExternalServiceHandlers package, providing a unified way to consume REST APIs and SOAP web services. Users can register the handler via DI using \AddJingetExternalServiceHandler\, which configures a named HttpClient with optional SSL bypass. The library offers \JingetServiceHandler\<T\>\ for typed REST responses and supports SOAP by allowing users to define envelope classes and send raw XML via \PostAsync\. A non-generic \ServiceHandler\ is also available for scenarios requiring raw response handling without automatic deserialization.

02-Handlers/Jinget.Handlers.ExternalServiceHandlers · high confidence

Introduces Jinget.Core.DiScanner for fluent DI assembly scanning

Adds the Jinget.Core.DiScanner library, providing a fluent API to scan assemblies and automatically register types in the Microsoft.Extensions.DependencyInjection service collection. The implementation supports selecting types from various sources (calling, executing, entry, or application dependencies), filtering by base type, attributes, and namespaces, and configuring registration strategies such as 'AsSelf', 'AsImplementedInterfaces', and 'AsMatchingInterface' with configurable lifetimes (Singleton, Scoped, Transient).

01-Core/Jinget.Core.DiScanner · high confidence

Introduction of batching logger with configurable filtering and blacklisting

The Jinget.Logger infrastructure now includes a new BatchingLogger provider that aggregates log messages into batches for efficient processing. This change introduces configurable options for controlling log volume and content, including blacklists for specific strings and URLs to prevent sensitive data from being logged, as well as allowed log categories and levels for fine-grained filtering. Users benefit from improved performance through batched writes and better control over what is captured in their logs via the new BatchingLoggerOptions.

03-Infrastructure/Jinget.Logger/Providers · high confidence

New Jinget.ExceptionHandler middleware for global error handling and logging

The Jinget.ExceptionHandler library is now available, providing a configurable middleware pipeline for ASP.NET Core applications. Users can register the handler via \ConfigureJingetExceptionHandler\ to enable global exception handling and optional 4xx HTTP response interception, which integrates with ASP.NET Core's ProblemDetails. The middleware also adds custom logging extensions for capturing request context, headers, and partition keys, ensuring consistent error reporting and traceability.

03-Infrastructure/Jinget.ExceptionHandler/Extensions · high confidence

New Jinget.SourceGenerator package for read models, EF mappings, and Web APIs

The Jinget.SourceGenerator package introduces three incremental source generators that automate boilerplate generation for CQRS and API layers. The ReadModelGenerator creates immutable read-only models from entity classes marked with \[GenerateReadModel\], supporting custom property appending, access modifier preservation, and base type/interface control. The ReadModelMappingConfigurationGenerator produces Entity Framework Core mapping configurations for these read models, automatically handling ignored properties and replacing model references. The WebAPIGenerator scaffolds standard CRUD endpoints (POST, PUT, DELETE, GET) with optional authorization claims and tenant awareness, wired to specified CQRS command and query handlers.

01-Miscellaneous/SourceGenerator/Jinget.SourceGenerator · high confidence

New JingetServiceHandler with typed response models and cancellation support

The External Service Handlers now include a new \JingetServiceHandler\ class that supports typed response models (e.g., \JingetServiceHandler\<TResponseModel\>\) alongside a raw string handler. This handler introduces \CancellationToken\ support for all HTTP operations (GET, POST, file uploads, and raw send), allowing users to cancel requests. It also provides an event-driven architecture (\JingetServiceHandlerEvents\) that notifies listeners when a service call is made, a raw response is received, an exception occurs, or a response is successfully deserialized. The base handler automatically deserializes JSON and XML responses, with strict property matching disabled by default.

02-Handlers/Jinget.Handlers.ExternalServiceHandlers/DefaultServiceHandler · high confidence

New core attributes, contracts, and dynamic code execution capabilities

Jinget.Core introduces a suite of new attributes to support advanced application patterns, including \AuthenticationRequired\ for API security, \ReadOnlyModelAttribute\ for CQRS workflows, \TenantAware\ for multi-tenancy, and \SwaggerExclude\ for API documentation control. The library adds foundational contracts such as \IAggregateRoot\, \IEntity\, and \ITenantAware\ to standardize domain models. Additionally, a new \JingetDynamicCode\ class enables the runtime compilation and execution of C\# source code, while \ExpressionToSql\ components provide a fluent API for generating SQL queries from LINQ expressions.

01-Core/Jinget.Core · high confidence

New exception handling entity models and distributed tracing support

The Jinget.ExceptionHandler library introduces new entity classes to support its global exception handling and logging capabilities. BaseEntity provides a generic, key-based foundation for entities, while BaseSettingModel allows users to configure whether the global exception handler is active, whether 4xx responses are handled, and the maximum size for logging request and response bodies. LogModel serves as the core data structure for logging, capturing detailed request and response information, and now supports distributed tracing by automatically populating TraceIdentifier, SpanIdentifier, and ParentSpanIdentifier from the current Activity context.

03-Infrastructure/Jinget.ExceptionHandler/Entities · high confidence

New logging configuration and middleware extension methods

The Jinget Logger library now provides extension methods to simplify logging setup. \IHostBuilderExtensions\ allows configuring logging to ElasticSearch or files with support for blacklisting specific strings and URLs, as well as filtering by log categories. \IServiceCollectionExtensions\ adds a method to register required prerequisites like \IHttpContextAccessor\ and conditionally configure the global exception handler. \IApplicationBuilderExtensions\ introduces a middleware pipeline method that automatically includes the exception handler (if enabled in settings) and the request/response logging middleware.

03-Infrastructure/Jinget.Logger/Extensions · high confidence

New source generator attributes for read model customization

Added a suite of attributes to the \Jinget.SourceGenerator.Common\ library to control how read models are generated. These include \GenerateReadModelAttribute\ to trigger generation, \CustomGetterSetterAttribute\ and \PreserveOriginalGetterSetterAttribute\ to define or preserve access logic, \AppendAttributeToPropertyAttribute\ and \AppendAttributeToReadModelAttribute\ to inject additional attributes onto generated code, \AppendPropertyToReadModelAttribute\ to add custom properties, and configuration attributes like \IgnoreMappingAttribute\, \IgnoreReadModelConversionAttribute\, and \GenerateReadModelMappingConfigurationAttribute\ to fine-tune EF Core mapping and conversion behavior.

01-Miscellaneous/SourceGenerator/Jinget.SourceGenerator.Common/Attributes · high confidence

Behavioural changes

Jinget.Logger refactored with file logging support and category-based filtering

The Jinget.Logger infrastructure has been refactored to introduce a new FileLoggerProvider, allowing users to write logs to local text files with configurable size limits and file retention policies. The logging model now includes a Category property, enabling users to configure minimum log levels per category (e.g., setting Information for specific services while keeping others at Warning). Additionally, the library now supports partitioning Elasticsearch indices based on a partition key (such as a client ID header), creating separate indices for different logical partitions. The implementation also replaces the RequestId header with HttpContext.TraceIdentifier for request tracking and uses DateTime.UtcNow for timestamps.

03-Infrastructure/Jinget.Logger · high confidence

New LogSearchViewModel for structured log search results

A new LogSearchViewModel record has been introduced to structure the data returned by log search operations. This view model aggregates key request metadata including the TraceIdentifier, RequestUrl, HTTP Method, SubSystem, and timing details (StartTime, EndTime, and calculated TraceDurationMilliseconds). It also includes operational metrics such as HopCount and TotalContentLength, along with the final Trace status and the associated list of LogModel entries, providing a comprehensive snapshot of a traced request for the user interface.

03-Infrastructure/Jinget.Logger/ViewModels · high confidence

Refactored Jinget.Logger configuration with new Elasticsearch and File logging settings

The Jinget.Logger configuration has been restructured to introduce dedicated setting models and extension methods for Elasticsearch and file-based logging. For Elasticsearch, users can now configure connection details including basic authentication (username/password), SSL usage, and certificate validation bypass via the new ElasticSearchSettingModel, along with options to create indices per partition and control refresh behavior. File logging configuration is now handled through FileSettingModel, allowing control over file name prefixes, log directories, retention limits, and file size limits. These changes streamline the setup process for these logging backends within the Jinget.Logger infrastructure.

03-Infrastructure/Jinget.Logger/Configuration · high confidence

Refactored external service handler with new HTTP client factory and form-urlencoded support

The external service handler has been restructured to use a new \JingetHttpClientFactory\ and \ServiceHandlerBase\ for managing HTTP client configuration, including base URI, timeout, and SSL error handling. This change introduces support for sending form-urlencoded content in POST requests, resolves JSON patch request bugs, and adds cancellation token support to service handler operations.

02-Handlers/Jinget.Handlers.ExternalServiceHandlers/ServiceHandler · medium confidence

Repository restructured and rebranded as Jinget with new governance files

The project has been renamed from 'jinget-extensions' to 'Jinget' and reorganized into a multi-project solution (Jinget.sln) containing core libraries, handlers, infrastructure, and source generators. This change introduces standard repository governance files, including a Code of Conduct, Contributing guidelines, and a Security policy, while updating the README to reflect the new scope and package structure.

(repo-wide) · high confidence

Source generator adds support for custom getter/setter attributes and nested generic statements

The source generator now recognizes the new CustomGetterSetterAttribute, allowing users to preserve original getter and setter logic for specific properties instead of having them auto-generated. Additionally, the generator has been updated to correctly handle nested generic statements within readonly mapping configurations, ensuring that complex generic type arguments are processed and converted to their readonly equivalents without errors.

01-Miscellaneous/SourceGenerator/Jinget.SourceGenerator.Common/Extensions · high confidence

Structured exception handling with distributed tracing and environment-aware details

The exception handling middleware now returns standardized ProblemDetails responses that include request context and distributed tracing information (traceId, spanId, requestId, nodeId). In non-production environments, the full exception stack trace is exposed in the response detail, while production responses omit sensitive stack data. HttpRequestException handling additionally includes the request URL in the response extensions.

03-Infrastructure/Jinget.ExceptionHandler/Handlers · high confidence

Test coverage

Added Jinget.WebAPI.Tests test harness with Elasticsearch logging and sample endpoints; Added test base data models for Jinget.Core; Added test fixtures for base types and model generation; Added tests for ResponseResult and JingetValueObject types; Added unit tests for AES, Hashing, and SQL Injection security utilities; Added unit tests for BindingHierarchyUtility; Added unit tests for DI Scanner assembly scanning; Added unit tests for Dapper DynamicParameters extensions; Added unit tests for DefaultServiceHandler; Added unit tests for ExpressionToSql query generation; Added unit tests for HTTP header and MIME type utilities; Added unit tests for HttpContext and HttpRequest extension methods; Added unit tests for IDictionary and IQueryable extension methods; Added unit tests for IPUtility; Added unit tests for JSON serialization utilities and naming policies; Added unit tests for OrderBy and Paging SQL generation; Added unit tests for UriExtensions query string handling; Added unit tests for ZipUtility compression and decompression; Added unit tests for core extension methods; Added unit tests for core utility classes; Added unit tests for database connection and command extensions; Added unit tests for dynamic code execution and exception handling; Added unit tests for enum extension methods and utility functions; Added unit tests for expression utility and scoring generator; Added unit tests for source generators.

Dependencies

Upgrade to .NET 10 and update core dependencies

The Jinget library suite has been upgraded to target .NET 10.0 across core, infrastructure, and handler projects, with corresponding updates to test projects. Key dependency updates include Microsoft.Extensions.DependencyInjection.Abstractions and Microsoft.Extensions.DependencyModel to version 10.0.12, Microsoft.Data.SqlClient to 7.0.3, and Microsoft.EntityFrameworkCore to 10.0.12. The project also introduces a new Jinget.Core.DiScanner component for automatic dependency injection registration and updates the Jinget.SourceGenerator to use Microsoft.CodeAnalysis packages version 5.9.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 53 → 47 (-6.1)
  • Rubric changed (rubric-2026.08.18 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 72 → 70 (-1.7)
  • Architecture 96 → 96 (+0.1)
  • Maturity 55 → 52 (-2.8)
  • Readiness 43 → 41 (-2.0)
  • Security 64 → 42 (-21.9)

Resolved (115)

  • BarePragmaDisable (01-Core/Jinget.Core.DiScanner/TypeSourceSelector.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/ExpressionToSql/Internal/Table.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/ExtensionMethods/Reflection/AssemblyExtensions.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/IOptionTypes/ConnectionString/BaseDBConnectionString.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/IOptionTypes/Log/BlackListHeader.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/IOptionTypes/Log/WhiteListHeader.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Security/Hashing/Model/HashModel.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Types/AESModel.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Types/FilterCriteria.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Types/HealthCheckModel.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Types/JwtModel.cs)
  • BarePragmaDisable (01-Core/Jinget.Core/Utilities/Expressions/ExpressionUtility.cs)
  • BareSuppressMessage (Tests/Jinget.Handlers.ExternalServiceHandlers.Tests/GlobalSuppressions.cs)
  • Bounded contexts not declared
  • CRAP 240: ObjectExtensions.ToDictionary (01-Core/Jinget.Core/ExtensionMethods/ObjectExtensions.cs)
  • CRAP 240: TypeExtensions.Call (01-Core/Jinget.Core/ExtensionMethods/Reflection/TypeExtensions.cs)
  • CRAP 306: ExpressionUtility.Transform (01-Core/Jinget.Core/Utilities/Expressions/ExpressionUtility.cs)
  • CRAP 306: ObjectExtensions.ToType (01-Core/Jinget.Core/ExtensionMethods/ObjectExtensions.cs)
  • CRAP 380: IPUtility.IsIPInRange (01-Core/Jinget.Core/Utilities/IP/IPUtility.cs)
  • CRAP 420: ExpressionUtility.TryParseExpression (01-Core/Jinget.Core/Utilities/Expressions/ExpressionUtility.cs)
  • …and 95 more

New (59)

  • BlanketAnalyzerSeverityNone (.editorconfig)
  • CRAP 132: TypeNameHelper.ProcessGenericType (01-Core/Jinget.Core.DiScanner/Internal/TypeNameHelper.cs)
  • CRAP 40: BooleanExpressionExtensions.CreateBinaryExpression (01-Core/Jinget.Core/ExtensionMethods/Expressions/BooleanExpressionExtensions.cs)
  • CRAP 40: ValueExtractor.ExtractFromExpression (01-Core/Jinget.Core/ExtensionMethods/Expressions/BooleanExpressionExtensions.cs)
  • CRAP 56: ReplaceRegistrationStrategy.Apply (01-Core/Jinget.Core.DiScanner/RegistrationStrategy.cs)
  • CRAP 63: ValueExtractor.ExtractValueFromExpression (01-Core/Jinget.Core/ExtensionMethods/Expressions/BooleanExpressionExtensions.cs)
  • CRAP 72: NonPublicSetterConverter.Read (01-Core/Jinget.Core/Utilities/Json/NonPublicSetterResolver.cs)
  • CRAP 72: TypeNameHelper.ProcessType (01-Core/Jinget.Core.DiScanner/Internal/TypeNameHelper.cs)
  • CRAP 92: ValueExtractor.ExtractDirectValue (01-Core/Jinget.Core/ExtensionMethods/Expressions/BooleanExpressionExtensions.cs)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (10–11 lines × 2) (01-Miscellaneous/SourceGenerator/Jinget.SourceGenerator/Generators/WebAPIGenerator.cs)
  • Duplicated block (12 lines × 2) (01-Core/Jinget.Core/Utilities/BindingBuilder.cs)
  • Duplicated block (12 lines × 4) (01-Core/Jinget.Core/Utilities/BindingBuilder.cs)
  • Duplicated block (13 lines × 2) (01-Core/Jinget.Core/Utilities/BindingBuilder.cs)
  • Duplicated block (18 lines × 2) (01-Core/Jinget.Core/Utilities/Json/IgnorePropertiesResolver.cs)
  • Duplicated block (21 lines × 2) (01-Miscellaneous/SourceGenerator/Jinget.SourceGenerator.Common/Attributes/AppendAttributeToPropertyAttribute.cs)
  • Duplicated block (5 lines × 2) (01-Core/Jinget.Core/ExpressionToSql/Internal/Where.cs)
  • Duplicated block (8 lines × 2) (01-Core/Jinget.Core/Utilities/Compression/ZipUtility.cs)
  • EmptyCatchBlock (01-Core/Jinget.Core/ExtensionMethods/Expressions/BooleanExpressionExtensions.cs)
  • …and 39 more

Changes since last survey

  • 15 commits — 15 feature/other, 0 fixes

By area

  • 03-Infrastructure/Jinget.Logger — 8 commits
  • .github/workflows — 3 commits
  • (repo) — 1 commit
  • 03-Infrastructure/Jinget.ExceptionHandler — 1 commit
  • Tests/Jinget.Core.Tests — 1 commit
  • Tests/Jinget.WebAPI.Tests — 1 commit

Notable commits

  • change: Merge branch 'main' of https://github.com/VahidFarahmandian/Jinget
  • change: Update build-ci.yml
  • change: Update release-ci.yml
  • change: Update release-preview-ci.yml
  • change: elastic mapping issue resolved
  • change: exyra codes removed
  • change: files renamed
  • change: ignoring blacklist in logger resolved
  • change: logging category added
  • change: logging now supports distributed tracing logging
  • change: packages referencing refactored
  • change: read logs from elastic code refined
  • change: sample test updated
  • change: search data in elasticsearch optimized
  • change: upgraded to .NET 10

Architecture

  • Unchanged — 2 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

VahidFarahmandian/Jinget 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 54cb324bd55fb6b9da5dd627dbb79c08c300adca — 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.