zeng-alt/zero-ddd
31.6
Weak · 21 September 2026
41.2k
lines of production code
Java
primary language
4
measurements over time
What this system is
This is a multi-tenant enterprise application framework built on Spring Boot and DDD principles, designed to provide out-of-the-box infrastructure for authentication, authorization, and data management. It implements Role-Based (RBAC) and Attribute-Based (ABAC) access control, multi-tenancy with dynamic database/schema routing, and event-driven architecture using RabbitMQ and Temporal. The system offers a comprehensive suite of reusable components for security, caching, internationalization, and API exposure via REST and GraphQL.
How it got here
2024 — ZeroDDD framework and multi-tenancy infrastructure
45 changes.
This period focused on establishing the core ZeroDDD framework, introducing a comprehensive security and authentication system with JWT and captcha support, and implementing a robust multi-tenancy architecture with dynamic data source routing. The work also included building out the main business module with domain models, CQRS infrastructure, and GraphQL/REST APIs for user and role management.
2025 — RBAC/ABAC security and multi-tenancy infrastructure
14 changes.
This period focused on establishing the core security and multi-tenancy infrastructure, introducing RBAC and ABAC domain models, repositories, and client synchronization. It also added a two-level caching system with Redis and Caffeine, alongside mixed-mode multi-tenancy support for database routing. Additionally, the codebase integrated Camunda identity services and externalized domain events to Temporal workflows.
Features
Add ABAC serve endpoint and router for template management
A new Spring Boot Actuator endpoint (id 'abac.serve') and a corresponding RouterFunction are introduced to expose ABAC template management capabilities. The AbacServeEndpoint provides a read operation to retrieve ABAC context information by key, while the AbacTemplateConfig registers the AbacTemplateManager bean and defines GET/POST routes under the configured ABAC prefix to allow fetching and updating ABAC templates via HTTP requests.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-abac-serve-component · high confidence
Add CAPTCHA generation endpoint
A new REST endpoint at /auth/v1/captcha has been added to generate CAPTCHA images. This allows clients to request a new CAPTCHA image and receive a unique key for subsequent verification.
zero-ddd-auth/src/main/java/com/zjj/auth/controller · medium confidence
Add Camunda identity integration with custom RBAC/ABAC user and group queries
The zero-ddd-camunda module now includes a new \ZeroDddCamundaApplication\ entry point and a set of infrastructure classes that integrate Camunda's identity service with a custom RBAC/ABAC system. This includes \CamundaConfig\ to register a custom \ProcessEnginePlugin\ that uses a \CustomIdentityProviderSessionFactory\ backed by \RbacIdentityService\, and implements \GroupQuery\ and \UserQuery\ interfaces to map Camunda's identity model to internal \MainGroup\ and \MainUser\ entities via \GroupRepository\ and \UserRepository\. Configuration for the Camunda process engine, Redisson, and multi-tenancy is also added.
zero-ddd-camunda · medium confidence
Add JWT authentication and token renewal filters
The component now provides automatic JWT-based authentication and token renewal for both standard Servlet and reactive WebFlux applications. New filter classes (JwtAuthenticationTokenFilter, JwtRenewFilter, and their reactive counterparts) are registered via Spring Boot auto-configuration, enabling seamless JWT header parsing, cache validation, and automatic session renewal 15 minutes before expiration.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-jwt-component · high confidence
Add MVC interfaces for user, role, and permission management
The main service now exposes new REST endpoints for managing users, roles, and permissions. This includes controllers for permission queries and role authorization, along with the necessary request DTOs (e.g., StockInRoleFrom, AuthorizePermissionFrom) and value objects (e.g., UserDetailVO, MenuResourceVO) to support these operations.
zero-business/zero-main-business/zero-main-interfaces-business · high confidence
Add RBAC and ABAC domain models and handlers for user, role, and resource management
The zero-ddd-tenant module introduces a comprehensive domain model for role-based and attribute-based access control. This includes domain entities for users, roles, permissions, and HTTP resources, each with corresponding command handlers and factories. The implementation supports assigning roles to users, managing role permissions, and handling HTTP resource configurations, enabling fine-grained access control within the application.
zero-ddd-tenant · high confidence
Add SMS-based login authentication
The component introduces a new SMS authentication flow, allowing users to log in using a mobile number and a verification code. This includes the \SmsAuthenticationFilter\ to capture the mobile and code from the request, a \SmsAuthenticationProvider\ to validate the code against a cache, and a \SmsDetailsService\ interface for user lookup. The \SmsAutoConfiguration\ wires these components together, enabling the feature via the \security.sms.enabled\ property.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-sms-component · high confidence
Add Spring Boot auto-configuration and resource files for Excel processing
The component now registers itself with Spring Boot's auto-configuration mechanism, enabling automatic setup for Excel read/write operations. This includes defining \ExcelImportAutoConfiguration\ and \ExcelAutoConfiguration\ to wire up the Excel processing capabilities. Additionally, resource files for configuration (application.yml, excel.properties) and internationalization (excel\_en\_US.properties, excel\_zh\_CN.properties) are added to support Excel template generation and global configuration.
zero-ddd-component/zero-ddd-excel-component/src/main/resources · high confidence
Add Spring MVC integration for Excel import with validation and internationalization
The component now supports importing Excel files directly in Spring MVC controllers via the new @ExcelImport annotation. This feature allows developers to inject uploaded MultipartFile data as typed objects or reactive Flowables, with support for merging multiple files, dynamic column handling, and built-in validation and internationalization of headers and error messages.
zero-ddd-component/zero-ddd-excel-component/src/main/java · high confidence
Add automatic captcha authentication for login requests
The security captcha component now provides automatic configuration for captcha-based authentication. This introduces a new \CaptchaAutoConfiguration\ that registers a \CaptchaAuthenticationFilter\ to intercept POST requests to \/login/\\\ endpoints. The filter validates the captcha code against a \CaptchaService\ (defaulting to Redis storage) before allowing the authentication process to proceed. Users can enable or disable this feature via the \security.captcha.enabled\ property and configure the filter paths, parameter names, and expiration times through \security.captcha\ properties.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-captcha-component · high confidence
Add bean utility helpers for object copying and Spring context access
The zero-ddd-bean-component module introduces two new utility classes, ApplicationContextHelper and BeanHelper, to simplify common Java and Spring operations. ApplicationContextHelper provides static methods to retrieve beans by type or name, access the ApplicationContext, and register or unregister singleton beans in the Spring container. BeanHelper extends Spring's BeanUtils to offer enhanced object copying capabilities, including support for Java Records, ignoring null values, and copying lists of objects. These utilities are automatically registered via Spring Boot's auto-configuration mechanism.
zero-ddd-component/zero-ddd-bean-component · high confidence
Add core API response and type conversion components
The core component now includes a suite of new classes to standardize API responses and handle type conversions. This includes a global exception handler (\GlobalServletExceptionAdvice\) for 404 errors, a base controller (\BaseController\) for object conversion, and various response wrappers for pagination (\PageEntity\, \PageQuery\, \PageResponse\), tree structures (\TreeEntity\, \TreeResponse\, \TreeTableResponse\), and cursor-based pagination (\TurnPageEntity\, \TurnPageResponse\). Additionally, a new type conversion system is introduced, featuring a \JsonConversionStrategy\ factory and specific strategies for types like \BigDecimal\, \Boolean\, \Double\, \Integer\, \LocalDateTime\, and \LocalDate\, allowing for flexible JSON-to-object conversion.
zero-ddd-component/zero-ddd-core-component · high confidence
Add internationalization (i18n) support for error messages and validation
The component now provides a complete i18n infrastructure for the application. This includes a \BaseI18nException\ class that allows throwing exceptions with translatable messages, a \MessageSourceHelper\ to resolve message keys to localized strings, and a \LocaleConfiguration\ that configures a \MessageSourceAccessor\ and integrates with JSR-38 (Bean Validation) to support internationalized validation error messages. Additionally, a \ResponseAdviceProvider\ is registered to automatically localize the \message\ field in API responses. These changes enable the application to serve error and validation messages in the user's preferred language.
zero-ddd-component/zero-ddd-i18n-component · high confidence
Add mixed-mode multi-tenancy with automatic database and schema management
The tenant component now supports a mixed multi-tenancy mode that automatically creates databases and schemas, and dynamically routes data sources based on tenant context. This introduces new configuration classes (TenantMixedAutoConfiguration, TenantMixedDataSourceRoutingDatasource) that handle tenant-specific connection pooling, schema switching, and database initialization, enabling the system to manage multiple tenants across different databases and schemas.
zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-mix-component · high confidence
Added AuthConfig configuration class with commented-out UserDetailsService bean
A new AuthConfig class was added to the auth module, providing a Spring @Configuration class that currently contains no active beans. The file includes a commented-out implementation of a UserDetailsService that would have delegated authentication to a RemoteUserClient. This change introduces the configuration structure for multi-tenant and authentication features, though the actual service logic remains disabled in the codebase.
zero-ddd-auth/src/main/java/com/zjj/auth/config · medium confidence
Added GraphQL schema definitions for Query and Mutation
A new GraphQL schema file (test.graphqls) was added, defining a Query type with a 'run' field and a Mutation type with a 'saveRun' field. This introduces the basic structure for querying and mutating data within the GraphQL API.
zero-business/zero-main-business/zero-main-run/src/main/resources/graphql · high confidence
Added automatic tenant-aware security filters for servlet and reactive web applications
The security-tenant-component now provides built-in support for multi-tenancy in both standard servlet and reactive web environments. For servlet-based applications, \SecurityTenantAutoConfiguration\ registers \TenantHeaderFilter\ and \TenantWitchDataSourceFilter\ to extract tenant information from headers and switch data sources accordingly. For reactive applications, \SecurityReactiveTenantAutoConfiguration\ provides equivalent \ReactiveTenantHeaderFilter\ and \ReactiveTenantWitchDataSourceFilter\ implementations. These filters automatically resolve the tenant from the configured header (defaulting to \X-TENant-ID\), validate access against the \TenantService\, and update the \TenantContextHolder\ to ensure subsequent operations use the correct database/schema context. The auto-configuration is enabled via Spring Boot's \AutoConfiguration.imports\ file.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-tenant-component · high confidence
Added command objects for role and user management
New command classes have been introduced to support role and user operations. Specifically, StockInRoleCmd and StockInUserCmd are added to handle role and user data respectively, while AssignRoleCmd is introduced to manage the assignment of roles to users. These changes expand the domain's capability to process commands related to multi-tenant and authentication features.
. · medium confidence
Added domain models and handlers for user and role management
Introduced new domain entities and associated infrastructure for managing users and roles. This includes the UserAgg and RoleAgg aggregate roots, along with their respective factories, handlers, repositories, and query models. The user domain adds support for creating, updating, and assigning roles to users, while the role domain provides the foundational structure for role-based access control.
zero-business/zero-main-business/zero-main-domain-business/src/main/scala · high confidence
Added gateway filter configuration for request caching
Introduced a new Spring configuration class, GateWayFilterConfiguration, which sets up the gateway filter chain. This includes the registration of a CacheRequestFilter bean, enabling request body caching within the gateway layer.
zero-ddd-gateway/src/main/java/com/zjj/gateway/config · high confidence
Added gateway filters for request caching and user authentication
The gateway now includes new filter components to handle request body caching and user authentication. CacheRequestFilter intercepts non-GET/DELETE requests to cache the request body, preventing stream consumption issues. AfterUserAuthFilter processes the reactive security context to extract user information and injects it into the request headers for downstream services.
zero-ddd-gateway/src/main/java/com/zjj/gateway/filter · high confidence
Added remote tenant service API and Feign client
The tenant module now exposes a remote API for managing tenants, including a REST controller (RemoteTenantApi), a Feign client (RemoteTenantClient) for inter-service communication, and a fallback factory (RemoteTenantFallbackFactory) that returns empty results on failure. This enables other services to fetch tenant information via HTTP calls.
zero-ddd-exchange/zero-ddd-exchange-tenant · high confidence
Added remote user service with Feign client and fallback handling
Users can now retrieve user information via a new remote user service. This change introduces a Feign-based client (RemoteUserClient) that calls the /remote/user endpoint, automatically injecting tenant and JWT headers via a new Feign interceptor. A fallback factory is also added to handle service failures gracefully by returning an empty result instead of throwing an exception.
zero-ddd-exchange/zero-ddd-exchange-common, zero-ddd-exchange/zero-ddd-exchange-main · high confidence
Adds CQRS command and event handling infrastructure
The domain component now provides a complete CQRS (Command Query Responsibility Segregation) implementation. It introduces a \CommandBus\ and \CommandDispatcher\ to route commands to handlers annotated with \@CommandHandler\, which are automatically discovered and registered by a \CommandHandlerMethodProcessor\. The system also supports domain events via \ApplicationEventPublisher\ and provides base classes like \BaseEntity\ for JPA auditing and \Aggregate\ for DDD patterns. Additionally, it includes transactional event handling via \CommandTransactionalApplicationListenerMethodAdapter\ and utility classes for copying between domain and persistence models.
zero-ddd-component/zero-ddd-domain-component · high confidence
Adds core security, caching, and utility components
The autoconfigure component introduces a suite of new infrastructure classes to support authentication, caching, and general utilities. Security features include a \SecurityUser\ implementation of Spring's \UserDetails\ with tenant and role support, an \AbstractLoginConfigurer\ for authentication filters, and an \AuthenticationHelper\ for rendering error responses. Access control is supported via \RoleGrantedAuthority\ and \AbacCacheManage\ for ABAC rule caching. Caching is introduced through \L2Cache\ interfaces and \CacheType\ enums. Additionally, a \Response\ class standardizes API success/failure payloads, while \JsonUtils\ and \UtilException\ provide JSON handling and error utilities.
zero-ddd-component/zero-ddd-autoconfigure-component · high confidence
Enable Temporal-based domain event externalization
The application now supports externalizing domain events to Temporal workflows via a new Spring Boot auto-configuration. This adds a \DelegatingEventExternalizer\ bean that routes events to Temporal, allowing users to leverage Temporal for event processing when the \spring.modulith.events.externalization.enabled\ property is set to true.
zero-ddd-component/zero-ddd-event-component/zero-ddd-event-temporal-component · high confidence
Initial configuration and schema definitions for zero-ddd-auth
The zero-ddd-auth module is initialized with essential configuration files. An application.yml sets up PostgreSQL and Redis connectivity, enables captcha and username-based login, and configures multi-tenancy and security endpoints. A GraphQL schema (user.graphqls) defines the Users type and input for user-related operations. Additionally, empty localization files (messages.properties, messages\_en\_US.properties, messages\_zh\_CN.properties) and a Redisson configuration (redisson.yml) are added to support internationalization and caching infrastructure.
zero-ddd-auth/src/main/resources · medium confidence
Initial database schema and RBAC/ABAC authorization data
The application now includes a new Liquibase migration that initializes the database schema and seed data for multi-tenant support and role-based access control (RBAC). This change introduces tables for managing system dictionaries, permission rules, and event publications, while also defining the necessary data structures for ABAC (Attribute-Based Access Control) and tenant isolation.
zero-business/zero-main-business/zero-main-run/src/main/resources/db · high confidence
Initial documentation for RBAC and ABAC security components
Added initial documentation for the RBAC and ABAC security components. The ABAC component includes a note detailing the integration of RBAC with ABAC, pre-step configurations for method-level authorization, and SPEL expression parameters for context, user subject, target, return object, and authentication. The RBAC component includes a README explaining the parser and resource processor flow, and an empty placeholder file.
zero-ddd-component/zero-ddd-security-component · high confidence
Initial gateway configuration and resource setup
The zero-ddd-gateway module is initialized with core configuration files. An application.yml defines the server port (8090), Spring Cloud Gateway routes for tenant, main, auth, and Camunda services, and security filter exclusions for endpoints like /auth/login and /main/graphiql. A redisson.yml configures Redis/Redisson connection settings. Additionally, data.sql provides initial country and user records, while empty messages.properties files and a favicon.ico are added to the resources directory.
zero-ddd-gateway/src/main/resources · high confidence
Initialize ZeroDddAuthApplication with multi-tenancy and security features
The application entry point is initialized with the @EnableMultiTenancy annotation configured for MIXED mode, enabling the mixed multi-tenancy architecture. Additionally, the application enables tenant JWT caching, Feign client scanning, and web security, establishing the core configuration for the authentication service.
zero-ddd-auth/src/main/java/com/zjj/auth · high confidence
Initializes the ZeroDDD Gateway application entry point
Adds the main application class for the ZeroDDD Gateway, enabling the Spring Boot application to start. This includes configuring reactive web flux security and a custom logo display on startup.
zero-ddd-gateway/src/main/java/com/zjj/gateway · high confidence
Introduce RBAC client auto-configuration for route and GraphQL template synchronization
The RBAC client component now includes a new auto-configuration that registers beans for synchronizing HTTP route templates and GraphQL schema templates to a Redis-based message bus. The \RouteTemplateSupper\ extracts registered HTTP endpoints and publishes them, while \GraphqlTemplateSupper\ extracts GraphQL query, mutation, and subscription definitions. These are exposed via a Spring Boot Actuator endpoint (\/actuator/rbac\) to trigger the synchronization, enabling downstream services to receive updated routing and schema information dynamically.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-rbac-client-component · high confidence
Introduce ZeroMainApplication as the primary Spring Boot entry point
Added ZeroMainApplication.java, the main Spring Boot application class for the zero-main-run module. This class configures multi-tenancy (TenantMode.MIXED), RBAC/ABAC security, GraphQL resource scanning, and JPA repositories, serving as the central bootstrap for the main business service.
zero-business/zero-main-business/zero-main-run/src/main/java/com/zjj/main · high confidence
Introduce application-layer interfaces for menu, policy, and user services
New service interfaces are added to the application layer to support menu resource management, ABAC policy rule retrieval, and user profile lookups. Specifically, \MenuResourceService\ exposes methods to retrieve menu trees and validate paths; \PolicyRuleService\ provides a method to find ABAC policy rules by code; and \UserService\ defines operations to find user profiles and user entities by username or ID. These interfaces establish the application-layer contracts for these capabilities.
zero-business/zero-main-business/zero-main-application-business · high confidence
Introduce auto-generated GraphQL schema for entities with condition, fuzzy, and mutation support
The GraphQL component now automatically generates GraphQL types and resolvers for entities. This includes support for condition-based queries, fuzzy search, pagination, sorting, and mutations (save, delete). The framework uses annotations like @QueryEntity and @MutationEntity to configure which queries and mutations are exposed. A new exception handling mechanism is also introduced to standardize GraphQL error responses.
zero-ddd-component/zero-ddd-graphql-component · high confidence
Introduce automatic multi-tenant configuration for Hibernate
The tenant component now provides Spring Boot auto-configuration for multi-tenancy. A new \TenantColumnAutoConfiguration\ registers a \TenantIdentifierResolver\ bean that resolves the current tenant ID from a \TenantContextHolder\, defaulting to 'master' if none is present. This wires the resolver into Hibernate's \AvailableSettings.MULTI\_TENANT\_IDENTIFIER\_RESOLVER\ via a \HibernatePropertiesCustomizer\, enabling automatic multi-tenant support without manual setup.
zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-column-component · medium confidence
Introduce main application configuration and default user data
The main service now includes a new \application.yml\ that configures the Spring Boot application with PostgreSQL, Redis (via Redisson), and GraphQL endpoints, while also exposing RBAC and shutdown management endpoints. Additionally, default admin and root users are seeded via \data.txt\, and internationalized error messages for user existence checks are provided in English and Chinese.
zero-business/zero-main-business/zero-main-run/src/main/resources · medium confidence
Introduce multi-tenancy support with pluggable AOP-based tenant switching
Added a multi-tenancy framework that allows applications to switch database, schema, or column-based tenant contexts via the new @SwitchTenant annotation and associated AOP interceptors. The component registers a global exception handler for TenantDataSourceException and provides configuration via @EnableMultiTenancy, which dynamically imports the appropriate tenant mode (DATABASE, SCHEMA, MIXED, or COLUMN) along with related auto-configurations and Liquibase support.
zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-datasource-component · high confidence
Introduce multi-tenant database routing and schema initialization
Added a new tenant database component that provides dynamic, per-tenant database routing and schema initialization. The system now maintains a Caffeine-backed cache of Hikari connection pools, automatically creating and managing data sources for each tenant. This includes auto-configuration for the routing datasource, a tenant initialization service, and internationalized error messages for missing data sources.
zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-database-component · high confidence
Introduced a new two-level cache (L2) with Redis and Caffeine integration
Added a new L2 cache component that integrates Caffeine (L1) and Redis (L2) for distributed caching. The change introduces configuration classes (\EnableL2Cache\, \L2CacheConfiguration\) and properties (\L2CacheProperties\, \CacheProperties\) to manage cache expiration, eviction, and synchronization topics. It also includes a \CacheGetContext\ for efficient batch fetching from Redis and a \RedissonCaffeineCache\ implementation that bridges the two layers. Additionally, the memory component now registers Caffeine-based caches for RBAC/ABAC security resources via \CaffeineCacheConfiguration\ and \MemoryAutoConfiguration\.
zero-ddd-component/zero-ddd-storage-component/zero-ddd-l2-cache-component · high confidence
Introduces RBAC-based authorization for HTTP and GraphQL resources
The RBAC component now provides a complete authorization framework for both servlet-based HTTP requests and reactive WebFlux endpoints. It introduces auto-configuration classes that wire up resource locators, handlers, and managers for both synchronous and asynchronous request processing. The system supports role-based access control by matching incoming requests against defined resources and validating user permissions, with specific handling for GraphQL operations and HTTP route templates. Additionally, it includes a trie-based router for efficient path matching and supports white-listing for GraphQL endpoints.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-rbac-component · high confidence
Introduces automated tenant database/schema provisioning and multi-tenant connection management
The tenant management component now supports automated creation and initialization of tenant databases or schemas upon tenant creation. This is achieved through new auto-configuration classes (\TenantManagementAutoConfiguration\, \MasterDataSourceConfiguration\) that wire up a \TenantManagementService\ to orchestrate tenant creation, including running Liquibase migrations. A new \TenantSchemaMultiTenantConnectionProvider\ implements Hibernate's \MultiTenantConnectionProvider\ to route database connections to the correct tenant schema. Additionally, a custom \SpringLiquibase\ wrapper and \EnableMasterJpaRepositories\ annotation are introduced to facilitate the initial database setup and repository scanning for the master data source.
zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-management-component · high confidence
Introduces core security auto-configuration and handlers for authentication and authorization
The security core component now provides a comprehensive set of Spring Boot auto-configurations that wire up the authentication and authorization infrastructure. This includes \SecurityAutoConfiguration\ for managing password encoders, in-memory user details, and white-list services; \WebSecurityAutoConfiguration\ for servlet-based security filter chains and composite authorization managers; and \ReactiveSecurityAutoConfiguration\ for reactive web applications. The update also adds default handlers for login success/failure, access denial, and authentication entry points, alongside configuration properties for username-based login and logout paths, enabling out-of-the-box security behavior for both traditional and reactive web stacks.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-core-component · high confidence
Introduces custom JSON serialization for large numbers and Java 8 date/time types
Adds a new Spring Boot auto-configuration (JsonConfiguration) that registers custom Jackson modules and converters. This ensures that large numeric values (Long, BigInteger, BigDecimal) are serialized as strings to avoid JavaScript precision loss, and Java 8 date/time types (LocalDate, LocalDateTime, LocalTime) are formatted using specific patterns (e.g., 'yyyy-MM-dd HH:mm:ss'). The configuration is registered via Spring's auto-configuration mechanism.
zero-ddd-component/zero-ddd-json-component · high confidence
Introduces example application with multi-tenancy, RabbitMQ, and custom HTTP response handling
The zero-example module is added as a demonstration application featuring multi-tenancy (database mode), RabbitMQ integration for event publishing and listening, and a custom HTTP entity processor for standardized error and success responses. The application connects to PostgreSQL for data persistence and Redis for caching, while also supporting externalized events via Spring Modulith.
zero-business/zero-example · high confidence
Introduces new ABAC and RBAC authorization annotations and configuration
The \zero-ddd-security-abac-component\ now provides a complete set of annotations for Attribute-Based Access Control (ABAC) and Role-Based Access Control (RBAC). Developers can use \@AbacPreAuthorize\ and \@AbacPostAuthorize\ for method-level security, along with specific shortcuts like \@AdminAuth\, \@SuperAdminAuth\, and \@MasterAdminAuth\ for administrative access control. The component also introduces \@EnableAbac\ and \@EnableReactiveAbac\ to activate the security configuration, alongside utility classes like \ExpressionUtils\ and exception handling via \AbacExceptionAdvice\.
zero-ddd-component/zero-ddd-security-component/zero-ddd-security-abac-component · high confidence
New JPA repositories and RBAC/ABAC caching infrastructure
The infrastructure layer now includes a comprehensive set of JPA repositories (e.g., RoleDao, PermissionDao, UserDao) and a RolePolicy component that initializes RBAC and ABAC caches on startup. This enables the system to manage user, role, and permission data and enforce access control rules via the newly introduced caching mechanism.
zero-business/zero-main-business/zero-main-infrastructure-business · high confidence
New domain models and events for user, role, and policy rule management
The domain layer now includes new entities, repositories, and domain events for managing users, roles, and policy rules. Specifically, the system introduces \ParameterId\, \ParameterRepository\, and \InitParameterEvent\ for parameter management; \PermissionId\ for permissions; \HttpResourceId\, \HttpResourceRepository\, and related events for HTTP resources; \RoleId\, \RoleRepository\, and a suite of authorization commands and events (e.g., \FunctionAuthorizeCmd\, \ServiceAuthorizeEvent\) for RBAC; \PolicyRule\, \PolicyRuleRepository\, and \StockInPolicyRuleCmd\ for ABAC rules; and \UserId\, \UserRepository\, and user-related events (e.g., \StockInUserEvent\, \UpdateUserPasswordEvent\). These changes establish the foundational domain objects and event-driven communication for user and access control features.
zero-business/zero-main-business/zero-main-domain-business/src/main/java · high confidence
Refactored Redis cache component with new configuration and repository implementations
The cache component has been refactored to introduce a new \RedisAutoConfiguration\ that wires up \Redisson\ clients and cache managers, alongside new Jackson serialization modules (\Jdk8DateModule\, \NullValueBuilderCustomizer\) for improved date and null-value handling. Additionally, concrete implementations for Redis string, hash, list, and topic repositories have been added, enabling direct interaction with Redis data structures and pub/sub channels.
zero-ddd-component/zero-ddd-storage-component/zero-ddd-cache-component/src/main · high confidence
Behavioural changes
Add main application endpoint prefix configuration
A new Spring component, MainEndpointPrefix, has been added to the application configuration. This class implements the EndpointPrefix interface to define the URL prefix '/main' for the main application's endpoints, supporting the broader RBAC and gateway service extensions.
zero-business/zero-main-business/zero-main-run/src/main/java/com/zjj/main/config · high confidence
Added database trace log for JDBC client info exceptions
A new trace database file (zero-ddd-jpa-component.trace.db) has been added to the data directory. This file contains repeated JDBC exceptions indicating that the client info name 'ApplicationName' is not supported by the H2 database driver, which may affect connection metadata logging.
data · medium confidence
Customized gateway error handling with HTTP status mapping
The gateway now uses a custom exception handler (GateWayExceptionAdvice) to translate internal errors into specific HTTP status codes. Users will see a 404 for not-found errors, 403 for access denied, 401 for authentication failures, and the appropriate status for other response exceptions, rather than a generic 500 error.
zero-ddd-gateway/src/main/java/com/zjj/gateway/advice · medium confidence
Database schema updated for ABAC and RBAC authorization
The database schema was updated to support Attribute-Based Access Control (ABAC) for administrators and super administrators, alongside Role-Based Access Control (RBAC) validation. This change introduces new database sequences and tables to manage policy rules, permissions, roles, and user expressions, enabling more granular and flexible authorization checks within the authentication service.
zero-ddd-auth/src/main/resources/db · medium confidence
Introduced user and session persistence interfaces
Added new Spring Data repository interfaces for the authentication service: UserRepository for querying users by username and listing all users, and UserSessionRepository for saving user sessions. These interfaces define the data access layer for user and session entities within the zero-ddd-auth module.
zero-ddd-auth/src/main/java/com/zjj/auth/repository · medium confidence
Removal of Maven Wrapper configuration
The Maven wrapper configuration file (maven-wrapper.properties) has been deleted from the project. This removes the automatic download and management of a specific Maven version (3.9.7) via the Maven Wrapper, meaning developers and CI systems will now rely on the system-installed Maven or other build configurations.
.mvn · high confidence
Test coverage
Added tests for Excel dynamic column, validation, and i18n features; Added tests for cache component repositories.
Dependencies
Maven project structure and dependencies initialized
The \zero-business\ and \zero-ddd\ modules have been added to the Maven build, establishing the project's multi-module architecture. This includes the \zero-main-business\ module (with domain, application, interfaces, and infrastructure sub-modules) and the \zero-ddd-component\ library modules. Key dependencies added include Spring Boot starters (Web, JPA, AMQP), internal DDD components (security, tenant, cache), and external libraries such as MapStruct Plus, Hutool, and Temporal. The \zero-main-infrastructure-business\ module also introduces a switch from Tomcat to Undertow and replaces the QueryDSL library with \openfeign-querydsl\.
(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 35 → 32 (-3.1)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 89 → 93 (+4.3)
- Architecture 100 → 88 (-11.7)
- Maturity 31 → 29 (-2.1)
- Readiness 15 → 23 (+7.6)
- Security 52 → 25 (-26.7)
- Domain Modelling 84 → 60 (-23.3)
Resolved (64)
- Coverage not included — suite not readable by the collector
- CustomHttpEntityMethodProcessor.getVaryRequestHeadersToAdd (cognitive 19) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- CustomHttpEntityMethodProcessor.handleReturnValue (cognitive 39) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- CustomHttpEntityMethodProcessor.handleReturnValue (cyclomatic 24) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-core-component/src/main/java/com/zjj/core/component/api/HttpEntityReturnMethodProcessor.java)
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-excel-component/src/main/java/com/zjj/excel/component/builder/DefaultExcelTemplate.java)
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-security-component/zero-ddd-security-abac-component/src/main/java/com/zjj/security/abac/component/supper/AbacPostAuthorizeExpressionAttributeRegistry.java)
- Duplicated block (10 lines × 4) (zero-ddd-component/zero-ddd-excel-component/src/main/java/com/zjj/excel/component/builder/DefaultExcelTemplate.java)
- Duplicated block (10 lines × 4) (zero-ddd-component/zero-ddd-security-component/zero-ddd-security-rbac-component/src/main/java/com/zjj/security/rbac/component/locator/GraphqlResourceLocator.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-bean-component/src/main/java/com/zjj/bean/componenet/BeanHelper.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-domain-component/src/main/java/com/zjj/domain/component/DomainBeanHelper.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/fuzzy/QuerydslFuzzyBinding.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/supper/definition/EntityFuzzyQueryDefinitionConfigurer.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-mix-component/src/main/java/com/zjj/tenant/mix/component/TenantMixedDataSourceRoutingDatasource.java)
- Duplicated block (11 lines × 4) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- Duplicated block (12 lines × 2) (zero-ddd-component/zero-ddd-core-component/src/main/java/com/zjj/core/component/api/HttpEntityReturnMethodProcessor.java)
- …and 44 more
New (142)
- Dependency hygiene PARTLY measured — Maven/Gradle declarations read, no dependency graph resolved
- Documentation: no installation or build instructions (README.md)
- Documentation: no project overview (README.md)
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/org/springframework/data/querydsl/binding/EntityBuilder.java)
- Duplicated block (10 lines × 2) (zero-ddd-component/zero-ddd-security-component/zero-ddd-security-jwt-component/src/main/java/com/zjj/security/jwt/component/supper/DefaultJwtReactiveRenewFilter.java)
- Duplicated block (11 lines × 2) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-domain-component/src/main/java/com/zjj/domain/component/Aggregate.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/org/springframework/data/querydsl/binding/QuerydslPredicateBuilder.java)
- Duplicated block (11 lines × 2) (zero-ddd-component/zero-ddd-security-component/zero-ddd-security-tenant-component/src/main/java/com/zjj/security/tenant/component/configuration/ReactiveTenantJwtCacheSelector.java)
- Duplicated block (11 lines × 3) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/ConditionBuilder.java)
- Duplicated block (11 lines × 6) (zero-ddd-component/zero-ddd-excel-component/src/main/java/com/zjj/excel/component/builder/DefaultExcelTemplate.java)
- Duplicated block (12 lines × 2) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- Duplicated block (12 lines × 2) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- Duplicated block (12 lines × 2) (zero-ddd-component/zero-ddd-bean-component/src/main/java/com/zjj/bean/componenet/BeanHelper.java)
- Duplicated block (12 lines × 2) (zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-management-component/src/main/java/com/zjj/tenant/management/component/config/MasterDataSourceConfiguration.java)
- Duplicated block (12–13 lines × 2) (zero-ddd-component/zero-ddd-tenant-component/zero-ddd-tenant-database-component/src/main/java/com/zjj/tenant/database/component/TenantDataSourceRoutingDatasource.java)
- Duplicated block (13 lines × 2) (zero-business/zero-example/src/main/java/com/zjj/example/controller/CustomHttpEntityMethodProcessor.java)
- Duplicated block (13 lines × 2) (zero-ddd-component/zero-ddd-domain-component/src/main/java/com/zjj/domain/component/DomainBeanHelper.java)
- Duplicated block (13 lines × 2) (zero-ddd-component/zero-ddd-graphql-component/src/main/java/com/zjj/graphql/component/query/condition/QuerydslConditionDataFetcher.java)
- …and 122 more
Architecture
- Containers 0 added · 0 removed · contexts 33 added · 1 removed · edges 67 added · 0 removed
Added bounded contexts (33)
- repository
- zero-ddd-auth
- zero-ddd-autoconfigure-component
- zero-ddd-cache-component
- zero-ddd-camunda
- zero-ddd-core-component
- zero-ddd-domain-component
- zero-ddd-excel-component
- zero-ddd-exchange-common
- zero-ddd-gateway
- zero-ddd-graphql-component
- zero-ddd-json-component
- zero-ddd-l2-cache-component
- zero-ddd-memory-component
- zero-ddd-security-abac-component
- zero-ddd-security-abac-serve-component
- zero-ddd-security-captcha-component
- zero-ddd-security-core-component
- zero-ddd-security-fast-auth-component
- zero-ddd-security-jwt-component
- …and 13 more
Removed bounded contexts (1)
- .
Added dependency edges (67)
- zero-ddd-auth → zero-ddd-autoconfigure-component
- zero-ddd-auth → zero-ddd-domain-component
- zero-ddd-auth → zero-ddd-security-captcha-component
- zero-ddd-auth → zero-ddd-tenant-management-component
- zero-ddd-cache-component → zero-ddd-autoconfigure-component
- zero-ddd-cache-component → zero-ddd-core-component
- zero-ddd-core-component → zero-ddd-autoconfigure-component
- zero-ddd-domain-component → zero-ddd-autoconfigure-component
- zero-ddd-domain-component → zero-ddd-core-component
- zero-ddd-excel-component → zero-ddd-core-component
- zero-ddd-exchange-common → zero-ddd-autoconfigure-component
- zero-ddd-gateway → zero-ddd-autoconfigure-component
- zero-ddd-graphql-component → zero-ddd-autoconfigure-component
- zero-ddd-graphql-component → zero-ddd-core-component
- zero-ddd-graphql-component → zero-ddd-domain-component
- zero-ddd-json-component → zero-ddd-autoconfigure-component
- zero-ddd-l2-cache-component → zero-ddd-autoconfigure-component
- zero-ddd-l2-cache-component → zero-ddd-cache-component
- zero-ddd-l2-cache-component → zero-ddd-memory-component
- zero-ddd-memory-component → zero-ddd-autoconfigure-component
- …and 47 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
zeng-alt/zero-ddd 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 9ef891a1b609108b99ba21e0e0e9aa8576448909 — 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.