jorzel/opentable
65.2
Adequate · 21 September 2026
776
lines of production code
Python
primary language
4
measurements over time
What this system is
This system is a restaurant table booking service built on a Ports and Adapters architecture, exposing HTTP endpoints for managing reservations and auditing. It coordinates booking requests through an application layer that enforces domain rules and manages database transactions via a Unit of Work pattern. The core logic handles table availability and state, emitting domain events that are processed by an audit service and persisted through flexible database adapters.
Features
Add BookingTable application service
A new BookingTableApplicationService has been introduced in the application layer to handle table booking requests. This service acts as a primary port, coordinating between the domain and entrypoints by accepting a BookTableCommand, validating the restaurant's existence, executing the booking via the unit of work, and publishing the resulting events.
src/application/services · high confidence
Added Restaurant and Table domain entities with booking logic
New domain entities for Restaurant and Table have been introduced in the domain layer. The Restaurant entity now manages a collection of Table entities and provides functionality to find and book an open table for a given number of persons, emitting a BookedTableEvent upon successful booking. The Table entity includes validation for capacity and state (open/closed), ensuring that bookings only occur on available tables that can accommodate the requested party size.
src/domain/entities · high confidence
Added event handling logic for domain events
A new \events.py\ module was added to \src/application/handlers/\ to define the \handle\_events\ function, which processes a list of serialized domain events by looking up and executing the corresponding handler for each event type.
src/application/handlers · high confidence
Added local and Nameko event publishing implementations
The application now includes two concrete implementations for publishing domain events: a local handler that processes events synchronously via a registry of handlers, and a Nameko-based publisher that dispatches events using the Nameko EventDispatcher. These new files in the infrastructure layer provide the underlying mechanisms for event distribution, supporting both immediate local processing and distributed message queue integration.
src/infrastructure/events · high confidence
Initial project setup with linting, testing, and architecture documentation
The repository is initialized with a complete development environment setup. This includes configuration files for code quality tools (\.flake8\, \mypy.ini\), a \pre-commit\ hook configuration that enforces formatting and linting via \black\, \isort\, \flake8\, and \mypy\. Testing is supported via \pytest\ and \test\_requirements.txt\. The \README.md\ is populated with an overview of the Ports and Adapters architecture, along with instructions for installing packages, running the Nameko application, and running tests. The project is licensed under the MIT license.
(repo-wide) · high confidence
Introduce domain event infrastructure and table booking event
Adds the foundational domain event system, including a base DomainEvent class and a DomainEventMixin for tracking events. Introduces a new BookedTableEvent to capture table booking details (table\_id, restaurant\_id, booked\_at). Additionally, defines an abstract EventPublisher interface to decouple event publishing from the domain layer.
src/domain/events · high confidence
Introduce domain models and interfaces for restaurant booking
Added new domain-layer files that define the core data structures and contracts for the booking feature. This includes value objects (RestaurantId, TableId), command classes (BookTableCommand), entity definitions with identifiers, and a repository interface (RestaurantRepository) that specifies how restaurants are stored and retrieved. Additionally, serializers are provided to convert Restaurant and Table entities into dictionary representations for output.
src/domain · high confidence
Introduced in-memory and SQLAlchemy database adapters
The codebase now includes two distinct database adapter implementations within the infrastructure layer: an in-memory repository and unit of work for testing or lightweight scenarios, and a SQLAlchemy-based ORM implementation for persistent storage. This change provides concrete data access mechanisms for the domain's repository interfaces, allowing the application to switch between a simple memory-based store and a full SQL database depending on the environment.
src/infrastructure/db · high confidence
Behavioural changes
Initial API service layer for booking and audit
The API layer is now explicitly separated into the \src/api\ directory, introducing the \nameko\ microservice implementation. This includes the \BookingService\ which exposes HTTP endpoints for table booking, restaurant listing, and health checks, as well as an \AuditService\ that listens for booking events to trigger audit logging. Configuration for the web server, database connections, and message queue is also provided.
src/api · high confidence
Introduction of Unit of Work pattern for transaction management
A new Unit of Work interface has been added to the application layer to manage database transactions. This abstract base class defines the contract for transaction control, including methods for committing and rolling back changes, as well as context management for scope control.
src/application · high confidence
Test coverage
Added test suite for table booking and audit services
Added unit and integration tests for the table booking flow, including fixtures for tables and restaurants, and tests verifying that booking a table correctly updates its state and publishes a \BookedTableEvent\. Also added tests for the \AuditService\ handling the \BookedTableEvent\ and for the \handle\_events\ utility. A \RequestFactory\ helper was added to the test utilities to simplify creating mock HTTP requests.
src/tests · 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
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 63 → 65 (+2.5)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 55 → 55 (+0.0)
- Readiness 57 → 67 (+10.2)
- Security 86 → 93 (+6.6)
- Domain Modelling 100 → 89 (-11.5)
Resolved (9)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (requirements.txt)
- Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
- High: security finding (details withheld)
- High: security finding (details withheld)
- No exposed public API
- Test reliability not included
- no production source files with tracked history to analyse
- single-maintainer — knowledge-concentration (bus factor) risk
New (10)
- Critical CVE: [GHSA redacted] (requirements.txt)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Medium: security finding (details withheld)
- Medium: security finding (details withheld)
- No dependency advisory monitoring
- Outdated: nameko
- Outdated: sqlalchemy
- Workflow token permissions not restricted
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jorzel/opentable 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 491268b223276ce4ebc5339ffa32606110f9d79e — 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.