zhongjinggz/geekdemo
51.5
Adequate · 22 September 2026
3.3k
lines of production code
Java
primary language
7
measurements over time
What this system is
This system is an organizational and employee management service built on Spring Boot, focusing on the administration of organizations, tenants, and employee records. It provides capabilities to create, update, and cancel organizations and employees, including managing skills and work experience. The architecture emphasizes a clean separation of concerns with a refactored persistence layer using JDBC and a domain model that supports versioning and audit trails.
How it got here
2023 — Domain model and persistence refactoring
28 changes.
The codebase underwent a comprehensive refactoring of the domain and persistence layers, introducing standard base classes, value objects, and validators while removing unused or empty placeholder classes. This period also involved modernizing the project's dependencies and updating the database schema to support new employee management features.
2025 — JDBC persistence layer refactoring
5 changes.
This period focused on refactoring the persistence layer to use a generic JDBC-based mapper and repository structure. The changes introduced a new generic \Mapper\ class and specific implementations for employee, organization, and type entities, improving modularity and separation of concerns. A generic collection synchronization utility was also added to the application framework.
Features
Database schema updated to support employee skills and work experience
The database schema has been significantly expanded to support new employee-related features. Primary keys and foreign key references have been migrated from \int\ to \bigint\ for better scalability. The \emp\ table now includes a \version\ field and \status\_code\ for tracking, while new tables \skill\, \skill\_type\, and \work\_experience\ have been added to store employee skills and professional history. Additionally, an \emp\_num\_counter\ table was introduced to manage employee number generation by year. These changes enable the system to track and manage employee skills and work experience data.
unjuanable/src/main/sql · high confidence
Introduce generic collection synchronization utility
Added CollectionUpdator, an abstract class that synchronizes a current collection with a requested set of items, handling additions, updates, and removals via template methods.
unjuanable/src/main/java/demo/unjuanable/common/framework/application · medium confidence
New generic persistence adapter for domain entities
A new generic \Mapper\ class has been added to the common framework's persistence adapter layer. This class provides a base implementation for database operations (save, remove, select) using Spring's \JdbcTemplate\, handling the lifecycle of \Persistent\ domain objects and their subsidiaries.
unjuanable/src/main/java/demo/unjuanable/common/framework/adapter · high confidence
Behavioural changes
Centralized exception classes moved to common framework
The custom exception classes BusinessException and DirtyDataException have been moved from the domain layer to the common framework layer, consolidating shared error handling logic. A new SystemException class has been added to the same package, providing a standard runtime exception for system-level errors. These changes affect how the application handles and structures its error states, making exception handling more consistent across the codebase.
unjuanable/src/main/java/demo/unjuanable/common/framework/exception · medium confidence
Introduce EmpNumCounter domain model and repository interface
Added the EmpNumCounter class, which extends AbstractPersistent to provide common persistence functionality, and the EmpNumCounterRepository interface, which defines methods for saving and retrieving employee number counters by year using Optional for query results.
unjuanable/src/main/java/demo/unjuanable/domain/orgmng/empnumcounter · medium confidence
Introduces domain base classes and interfaces for entity lifecycle and auditing
The common framework domain package now includes new base classes and interfaces to standardize entity behavior. A new \AbstractPersistent\ class implements the \Persistent\ interface, providing a \ChangingStatus\ enum to track whether an entity is NEW, UNCHANGED, UPDATED, or DELETED. The \AuditableEntity\ class has been refactored to extend \AbstractPersistent\ and implement \Auditable\, adding lifecycle status tracking to audit information. Additionally, new interfaces \Versionable\ and \WithCode\ are introduced to support versioning and code-based identification for domain entities.
unjuanable/src/main/java/demo/unjuanable/common/framework/domain · high confidence
JDBC implementation for OrgType persistence
The system now includes a concrete JDBC repository for the OrgType entity, enabling database operations for organization types. This implementation provides methods to find an organization type by its code and status, and to check for the existence of a specific code and status combination, supporting the underlying domain logic for managing organization types.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/orgmng/orgtype · high confidence
OrgType refactored as an Aggregate Root with typed status
The OrgType domain class has been refactored to extend the AggregateRoot base class, introducing versioning and change tracking capabilities. The status field has been changed from a self-referencing OrgType to a dedicated OrgTypeStatus enum, which now includes a factory method for code-based lookup and exposes a description. Additionally, the tenant field has been renamed to tenantId for clarity.
unjuanable/src/main/java/demo/unjuanable/domain/orgmng/orgtype · high confidence
Refactor Org domain model with renamed fields and new Loader pattern
The Org domain model has been refactored to improve clarity and consistency. Key changes include renaming fields to explicitly indicate they are IDs (e.g., \tenant\ to \tenantId\, \superior\ to \superiorId\, \orgType\ to \orgTypeCode\, \leader\ to \leaderId\). A new \Loader\ inner class has been added to \Org\ to facilitate object loading, likely from a database, replacing previous construction patterns. The \OrgBuilder\ and \OrgHandler\ have been updated to use these new field names and the new validator classes (e.g., \CommonTenantValidator\ instead of \CommonValidator\). Additionally, \OrgStatus.ofCode\ now throws a \BusinessException\ if the code is invalid, rather than returning an \Optional\.
unjuanable/src/main/java/demo/unjuanable/domain/orgmng/org · high confidence
Refactor Tenant domain model and repository interface
The Tenant class now extends AggregateRoot, gaining versioning and audit capabilities, while the TenantStatus enum's TERMINATED code is updated from 'EF' to 'TERMINATED' to distinguish it from the EFFECTIVE state. A new TenantRepository interface is introduced to define the data access contract for tenant operations.
unjuanable/src/main/java/demo/unjuanable/domain/tenantmng · medium confidence
Refactor and introduce domain validation components
The system introduces new domain components for validation and time periods. A new CommonOrgValidator component is added to validate organization status, while the existing CommonValidator is renamed to CommonTenantValidator and refactored to use TenantRepositoryJdbc instead of the generic TenantRepository interface. Additionally, a new Period value object is introduced to manage date ranges, supporting overlap and merge operations.
unjuanable/src/main/java/demo/unjuanable/domain/common · medium confidence
Refactor common utility classes to use Apache Commons Lang
The project has replaced custom implementations in the common utility package with Apache Commons Lang3. Specifically, the \StringUtil\ class was removed and its \isBlank\ functionality is now handled by Apache Commons. Additionally, \ReflectUtil\ was updated to use \FieldUtils\ from Apache Commons Lang3 for setting field values, and a new \SqlUtil\ class was introduced to handle SQL result set conversions. These changes standardize the codebase by leveraging a well-known library for common string and reflection operations.
unjuanable/src/main/java/demo/unjuanable/common/util · high confidence
Refactor organization management DTOs and service methods
The organization management module has been refactored to improve code structure and naming consistency. Request and response classes (CreateOrgRequest, UpdateOrgBasicRequest, OrgResponse) have been moved into a new 'dto' package. Within these classes, field names and their corresponding getter/setter methods have been updated to explicitly include 'Id' or 'Code' suffixes (e.g., 'tenant' becomes 'tenantId', 'orgType' becomes 'orgTypeCode') to better reflect the data being transferred. In the OrgService, the 'addOrg' and 'updateOrgBasic' methods now use these updated request fields and construct OrgResponse objects directly via a new constructor that maps domain entities to the response DTO, replacing the previous 'buildOrgDto' helper method. Additionally, the 'cancelOrg' method signature has been adjusted to accept 'tenant' as the first parameter, and a new 'findOrgById' method has been added to the service.
unjuanable/src/main/java/demo/unjuanable/application/orgmng/orgservice · high confidence
Refactor organization management validators and exception handling
The organization management validators (CancelOrgValidator, OrgLeaderValidator, OrgNameValidator, OrgTypeValidator, and SuperiorValidator) have been refactored. Method names were shortened (e.g., 'orgNameShouldNotEmpty' to 'shouldNotEmpty'). The 'BusinessException' and 'DirtyDataException' imports were updated to use the 'demo.unjuanable.common.framework.exception' package. Additionally, the 'OrgNameValidator' and 'OrgTypeValidator' now use 'org.apache.commons.lang3.StringUtils' for string validation instead of a custom 'StringUtil'. The 'SuperiorValidator' was updated to use 'OrgTypeRepositoryJdbc' from the 'orgmng.orgtype' package and access the organization type code via 'getOrgTypeCode()' instead of 'getOrgType()'.
unjuanable/src/main/java/demo/unjuanable/domain/orgmng/org/validator · medium confidence
Refactored Tenant persistence implementation to use a generic Mapper base class
The Jdbc implementation for the Tenant repository has been refactored. The new TenantRepositoryJdbc class now extends a generic Mapper base class, replacing the previous standalone implementation. This change consolidates common persistence logic and simplifies the repository's codebase.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/tenantmng · high confidence
Refactored employee management with new builder and handler components
The employee domain model has been refactored to support adding, updating, and deleting work experiences and skills. This change introduces an \EmpBuilder\ for constructing employee records and an \EmpHandler\ to manage updates to employee details, skills, and work experiences. The \Emp\ aggregate now includes collections for \Skill\, \WorkExperience\, and \EmpPost\ entities, with corresponding repository methods updated to support saving and finding employees. Additionally, the \EmpStatus\ enum now includes logic for transitioning between statuses.
unjuanable/src/main/java/demo/unjuanable/domain/orgmng/emp · high confidence
Refactored employee management with new service and DTOs
The employee management logic in the \orgmng\ module has been refactored to improve structure and maintainability. A new \EmpService\ now orchestrates the creation and updating of employee records, delegating specific update operations (skills, work experience, and posts) to dedicated updaters (\SkillUpdator\, \WorkExperienceUpdator\, \EmpPostUpdator\). This change introduces new Data Transfer Objects (\CreateEmpRequest\, \UpdateEmpRequest\, \EmpResponse\) and separates concerns by moving persistence logic into specialized components, making the system easier to extend and test.
unjuanable/src/main/java/demo/unjuanable/application/orgmng/empservice · medium confidence
Refactored employee number counter persistence with new JDBC implementation
The employee number counter persistence layer has been refactored to use a new JDBC-based implementation (EmpNumCounterRepositoryJdbc) that extends a generic Mapper base class. This change introduces a new repository implementation that handles insertion, year-based lookup (returning an Optional), and incrementing the counter, simplifying the code structure and aligning with the new persistence package organization.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/orgmng/empnumcounter · high confidence
Refactored persistence layer for employee and organization management
The persistence layer for the organization management (orgmng) domain has been refactored to improve modularity and separation of concerns. New JDBC repository and mapper classes have been introduced to handle data access for employee-related entities, including EmpPost, Skill, and WorkExperience, each with dedicated mappers (EmpPostMapper, SkillMapper, WorkExperienceMapper). The main EmpRepositoryJdbc has been updated to coordinate these sub-mappers for comprehensive employee data retrieval and persistence. Additionally, the OrgRepositoryJdbc has been implemented to handle organization entity persistence, including methods for finding organizations by ID, status, and name. This structural change organizes the codebase by functional modules within the orgmng package, making the data access layer more maintainable and aligned with domain boundaries.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/orgmng/emp · medium confidence
Removal of Swagger/OpenAPI annotations and comments
The application no longer includes Swagger UI integration or OpenAPI annotations. Specifically, the \@EnableOpenApi\ annotation and related Springfox imports have been removed from the main application class, along with associated configuration comments. This indicates a shift away from the previous API documentation setup.
unjuanable/src/main/java/demo/unjuanable · high confidence
Removal of empty domain and repository classes
Several empty placeholder classes have been removed from the codebase, including domain models (EffortRecord, Post, User, UserStatus) and their corresponding repository interfaces (EffortRecordRepository, ClientRepository, ContractRepository, ProjectRepository, PostRepository). This cleanup eliminates unused or stubbed-out persistence and domain layer components that contained no functional implementation.
(repo-wide) · high confidence
Removal of empty domain classes in project management
The empty placeholder classes Client, ClientMng, Contract, ContractMng, Project, ProjectMember, and ProjectMng have been removed from the projectmng domain package. These files contained no implementation logic, and their removal simplifies the codebase by eliminating unused or stubbed-out domain entities.
unjuanable/src/main/java/demo/unjuanable/domain/projectmng · high confidence
Removed Jdbc-based repository implementations for Org, Emp, and OrgType
The Jdbc-based repository implementations for Org, Emp, and OrgType have been removed from the persistence layer. This change eliminates the direct JDBC data access classes (OrgRepositoryJdbc, EmpRepositoryJdbc, OrgTypeRepositoryJdbc) that previously handled database interactions for these domain models, likely as part of a broader refactoring to a different data access strategy.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/orgmng · high confidence
Removed unused UserRepository persistence adapter
The UserRepository class, which previously provided methods to count and check the existence of users by ID and status, has been removed from the persistence layer. This cleanup eliminates dead code that was not actively used in the application.
unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/usermng · high confidence
User identity passed as explicit request parameter
The organization management endpoints now accept the user ID as an explicit query parameter named 'userid' (e.g., /api/organizations?userid=123). This replaces the previous behavior where the controller internally retrieved the user identity via a private 'acquireUserId' method, making the user context a visible part of the API contract.
unjuanable/src/main/java/demo/unjuanable/adapter/driving · high confidence
Test coverage
Added and refined integration tests for persistence repositories; Added integration tests for employee management; Added tests for employee management domain; Added unit tests for CommonOrgValidator and Period; Added unit tests for OrgNameValidator and updated OrgStatus validation; Integration tests for OrgService added; Removed obsolete StringUtilTest.
Dependencies
Upgrade to Spring Boot 3.4.1 and modernize dependencies
The project has been upgraded to Spring Boot 3.4.1, which includes a Java 21 runtime and addresses a security vulnerability in Logback by upgrading to version 1.5.15. The build configuration now uses Maven Surefire and Failsafe plugins to run unit and integration tests with proper Java agent arguments for Mockito. Additionally, the project swaps the Springfox library for SpringDoc OpenAPI, replaces the MySQL connector with the official mysql-connector-j, and adds Apache Commons Lang3.
(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 48 → 51 (+3.7)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 99 (-1.1)
- Architecture 100 → 90 (-10.1)
- Maturity 32 → 40 (+7.2)
- Readiness 24 → 35 (+10.6)
- Security 100 → 100 (+0.0)
- Domain Modelling 100 → 84 (-16.0)
Resolved (8)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- No exposed public API
- Scanner failed to run — not a clean result
- Test reliability not included
- The README names a specific geektime course and lists branch states (main, iteration-1, iteration-2-till-lesson21, iteration-2-lesson21-builder-style) but gives no description of what the code does or how to run it. (README.md)
- change coupling unreadable for .java — no production change history could be paired for this repository's own source
- single-maintainer — knowledge-concentration (bus factor) risk
New (14)
- 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)
- Documentation: no usage examples (README.md)
- Duplicated block (15 lines × 2) (unjuanable/src/main/java/demo/unjuanable/domain/orgmng/emp/Gender.java)
- Duplicated block (16 lines × 2) (unjuanable/src/main/java/demo/unjuanable/adapter/driven/persistence/orgmng/emp/SkillMapper.java)
- Duplicated block (19 lines × 2) (unjuanable/src/main/java/demo/unjuanable/domain/orgmng/org/OrgStatus.java)
- No ADRs found
- No assertions (empty test): contextLoads (unjuanable/src/test/java/demo/unjuanable/UnjuanableApplicationTest.java)
- No assertions: nameShouldNotDuplicatedInSameSuperior_shouldNotThrowException_whenNotDuplicated (unjuanable/src/test/java/demo/unjuanable/domain/orgmng/org/validator/OrgNameValidatorTest.java)
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
- TodoComment (unjuanable/src/main/java/demo/unjuanable/adapter/driving/restful/orgmng/OrgController.java)
- TodoComment (unjuanable/src/main/java/demo/unjuanable/domain/orgmng/emp/EmpHandler.java)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
zhongjinggz/geekdemo 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 22 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 5c9e398ddf0af789564aecdd245c283fe8fa61f0 — 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-90d5d2fe38ee.