Skip to content
CAI
Software that uses CAICheck a score

carlosazaustre/kata-users-ts

55.4

Adequate · 21 September 2026

1.3k

lines of production code

TypeScript

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a user management application that provides both a React-based web interface and a terminal-based CLI for creating and listing users. It enforces domain rules and validation through a structured core layer that supports both in-memory and MongoDB-backed persistence. The architecture separates use cases, domain models, and presentation layers, ensuring consistent error handling and data transformation across all client interfaces.

Features

Add terminal-based user management interface

A new terminal application in the packages/terminal-app directory provides a command-line interface for the user management system. Users can now interact with the system via a Readline-based terminal view that displays welcome and goodbye messages, prompts for user data (username, email, password, address, city, zip code), and displays the user list. The entry point wires up the UsersTerminalView with the core service locator to start the interactive session.

packages/terminal-app · high confidence

Add user management presentation layer

Introduces the UsersPresenter and UsersView interface to handle user interface interactions for listing and adding users. The presenter manages the main menu loop, processes user inputs, and displays results or errors through the view. A corresponding unit test file is added to verify presenter behavior.

packages/core/src/users/presentation · high confidence

Introduce shared configuration and error handling infrastructure

Added new shared modules for environment configuration and domain-specific error classes. The \config/environments.ts\ file now exposes a centralized configuration object for MongoDB connection details and database usage flags. Additionally, a hierarchy of error classes has been introduced to improve error handling: \ApplicationError\, \DomainError\, \InfrastructureError\, \PersistenceCorruptionError\, and \ValidationError\. These errors provide structured ways to handle application, domain, infrastructure, and validation issues, with \ValidationError\ specifically capturing field and detail information. The \MongoConnection\ implementation has also been added to manage MongoDB client lifecycle.

packages/core/src/shared · high confidence

Introduce user domain model with validation and value objects

The user domain now includes a User entity that enforces validation rules for username, email, password, and address. The system introduces value objects for Id, Email, Password, and Address, each with specific validation logic (e.g., email format, password strength, zip code format). A UserRepository interface is defined to support data access operations. Comprehensive unit tests are added for all value objects and the User entity, ensuring correct behavior for valid and invalid inputs.

packages/core/src/users/domain · high confidence

Introduce user management interface with modal form and list display

The React app now features a complete user management interface. Users can view a list of existing users and add new ones via a modal form that includes validation for required fields (username, email, password) and optional address details. The interface displays success or error messages, handles form submission through server actions, and provides a responsive layout with accessible components like the AddUserModal and UsersList.

packages/react-app · high confidence

Introduce user management use cases and repository implementations

Added the \AddNewUserUseCase\ and \ListUsersUseCase\ to handle user creation and listing, enforcing business rules such as unique email and domain constraints. The change introduces DTOs (\UserInputDTO\, \UserOutputDTO\) and a \UserDTOMapper\ for data transformation, alongside \UserApplicationError\ classes for validation feedback. Infrastructure support is provided by the \UserDatabaseRepository\ (MongoDB) and \UserInMemoryRepository\, which implement the \UserRepository\ interface to persist and retrieve \User\ entities using a \UserPersistenceMapper\ for database mapping.

packages/core/src/users/application · medium confidence

Introduced service locator for user management use cases

Added a service locator pattern in the core package to manage dependencies for user management features. The new \serviceLocator.ts\ file provides singleton access to \AddNewUserUseCase\ and \ListUsersUseCase\ via a \createSingleton\ helper, while also handling the selection between in-memory and MongoDB-based user repositories based on configuration. This centralizes the wiring of the user domain logic, making the use cases available for presentation layers.

packages/core/src · high confidence

Behavioural changes

Add pre-commit and pre-push hooks for automated linting, testing, and building

The project now enforces code quality and stability through Husky hooks. On each commit, staged files are automatically linted via lint-staged. On each push, the full linting suite, all tests, and the build process are executed automatically to catch issues before they are shared.

.husky · high confidence

Restructure user domain errors and validation handling

The user module's public API is now exposed through a new barrel file (packages/core/src/users/index.ts) that re-exports the UsersView, UsersPresenter, and related DTOs. This change reorganizes how the user domain's presentation layer and data transfer objects are accessed, simplifying the module's interface and improving validation error handling within the user domain.

packages/core/src/users · medium confidence

Test coverage

Added unit tests for user use cases

Added unit tests for the AddNewUserUseCase and ListUsersUseCase. The AddNewUserUseCase tests verify successful user creation, handling of duplicate email and domain conflicts, and successful creation with unique domains. The ListUsersUseCase tests verify returning a list of users and handling empty results.

packages/core/src/users/application/use-cases/\\tests\\_ · high confidence_

Dependencies

Project restructured into a monorepo with new tooling and database support

The project has been reorganized into a monorepo with workspaces for core logic, a React web app, and a terminal app. This change introduces MongoDB integration via the mongodb package, adds Biome for linting, and includes Vitest for testing. The root package.json now manages scripts for all packages, and dev dependencies like Husky and lint-staged are added for pre-commit hooks and staged file linting.

(dependencies) · medium confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 54 → 55 (+1.5)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 97 → 95 (-1.5)
  • Architecture 69 → 69 (+0.0)
  • Maturity 71 → 74 (+3.1)
  • Readiness 38 → 39 (+1.5)
  • Security 65 → 77 (+12.4)
  • Accessibility 64 → 64 (+1.0)

Resolved (23)

  • Coverage not included — suite not readable by the collector
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical vulnerability: [GHSA redacted] (package-lock.json)
  • Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High vulnerability: [GHSA redacted] (package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Low CVE: [GHSA redacted] (package-lock.json)
  • Medium CVE: [GHSA redacted] (package-lock.json)
  • …and 3 more

New (38)

  • Critical CVE: [CVE redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Floating npm dependency: @users-kata-ts/core
  • Floating npm dependency: @users-kata-ts/core
  • FunctionTooLong: AddUserModal.AddUserModal (packages/react-app/src/users/views/components/AddUserModal.tsx)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High CVE: [GHSA redacted] (package-lock.json)
  • High vulnerability: [GHSA redacted] (package-lock.json)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • …and 18 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

carlosazaustre/kata-users-ts 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 3feb2a5e692ee4285f08e30b00bf080b2abafcc3 — 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-b84573e22831.