Skip to content
CAI
Software that uses CAICheck a score

onyxdevs/react-hotel-reservation-system

49.3

Weak · 21 September 2026

2.9k

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 hotel booking application that manages reservation workflows, including date selection, room viewing, and payment processing. It features a simplified form state management that removes unnecessary change tracking, alongside robust error handling and validation logic. The application utilizes a local mock API layer for development and testing, with dependencies configured for a Node.js environment.

Behavioural changes

Refines form validation and cleans up code

Validation logic is tightened across multiple reservation steps (HotelDate, PreviewPayment, RoomView) by replacing empty-value checks with explicit length validators, ensuring fields are not just present but also meet length requirements. Additionally, the Finish step's state updates now omit the unused 'hasChanged' property, and the App container has a debug console.log removed.

src/containers · high confidence

Simplifies form state management and updates component interfaces

The form state management hook (useForm) and several form-related components (Select, TextField, ImageCheckbox) have been updated to remove the 'hasChanged' tracking from the form state. This involves removing the 'hasChanged' property from the TypeFormState interface and the reducer's return object, as well as updating the onChange prop types in the affected components to use a new TypeInputOnChange type. Additionally, the Header component's stepChangeHandler call was simplified by removing the 'hasChanged' property from the passed object. These changes streamline the form state by removing unnecessary change tracking.

src/components · high confidence

Updated type definitions for input and reservation models

The TypeInput type now includes a new TypeInputOnChange type to handle change events with id, value, and validity parameters. In the TypeNewReservation type, the id field has been changed from a string to a number, and the id field has been moved to the top of the type definition.

src/Types · medium confidence

Fixes

Improved error handling in store sagas

The cart and hotels store sagas now use a shared error handling utility (handleCatchedError) to process errors, rather than passing raw error messages directly to failed action creators. Additionally, the cart actions now ensure the reservation ID is converted to a string before being stored in localStorage, and the cart reducer ensures the reservation ID is treated as a number (defaulting to 0 if empty).

src/stores · medium confidence

Mock API layer for hotel and booking services

The application now uses a local mock API implementation in src/apis.ts to serve hotel, coupon, and booking data from static JSON files, replacing the previous external HTTP requests with in-memory returns for all API endpoints.

src · medium confidence

Refactor error handling and update IMask imports

The codebase now uses a dedicated \handleCatchedError\ utility to properly handle caught exceptions, distinguishing between Error objects, strings, numbers, and booleans, which improves error management. Additionally, the IMask library is imported from its ESM modules to enable tree-shaking, and the validation logic in \utils.ts\ has been simplified to remove redundant false-check filtering. The SCSS imports have been updated to match the renamed abstract files.

src/lib · medium confidence

Dependencies

Updated dependencies and build configuration

Added the 'path' and 'express' packages to the project's dev dependencies. The 'path' package (version 0.12.7) and its dependencies ('inherits' and 'util') were added to the lock file. Additionally, the 'package.json' was updated to specify a Node.js engine version (^14.17.0), include a homepage URL, and add a 'heroku-postbuild' script to rebuild 'node-sass' during deployment.

(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

Score

  • CAI 49 → 49 (+0.7)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 82 → 87 (+4.3)
  • Architecture 86 → 90 (+3.3)
  • Maturity 56 → 59 (+2.8)
  • Readiness 31 → 31 (+0.0)
  • Security 75 → 80 (+5.0)
  • Accessibility 59 → 59 (+0.0)

Resolved (58)

  • Coverage not included — suite not readable by the collector
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical vulnerability: [GHSA redacted] (package-lock.json)
  • …and 38 more

New (107)

  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical CVE: [GHSA redacted] (package-lock.json)
  • Critical vulnerability: [GHSA redacted] (package-lock.json)
  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (the committed lockfile is in a format this engine cannot resolve)
  • …and 87 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

onyxdevs/react-hotel-reservation-system 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 eeecaa8c7993146cfa88e280f025e10e4cdc31f3 — 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.