Skip to content
CAI
Software that uses CAICheck a score

envato/event_sourcery_todo_app

62.2

Adequate · 21 September 2026

644

lines of production code

Ruby

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This is a Ruby-based event-sourced application for managing the full lifecycle of todo items, including adding, amending, completing, and abandoning tasks. It exposes a RESTful web API and CLI interface to interact with the system, while maintaining separate read-optimized projections for outstanding, scheduled, and completed todos. The architecture leverages EventSourcery with a Postgres event store, ensuring that all state changes are captured as immutable domain events and processed by reactors to trigger side effects like email notifications.

Features

Add scheduled todos projection

A new projection named 'scheduled\_todos' has been added to track todos with a due date. This includes a database table storing title, description, due date, and stakeholder email, along with event handlers that create, update, or delete records in response to todo lifecycle events. A query handler is also provided to retrieve all scheduled todos.

_app/projections/scheduled\todos · high confidence

Added todo completion notification reactor

A new Reactor named TodoCompletedNotifier has been added to the application. It listens for TodoCompleted events and triggers a side effect: sending an email to the stakeholder. The implementation uses a simple lambda for the email action, which currently prints the email content to the console for visibility. The reactor also emits a StakeholderNotifiedOfTodoCompletion event to record that the notification was sent.

app/reactors · high confidence

Initial project structure and configuration

The repository is initialized with essential configuration files including a Ruby 3.2.8 version specification, an RSpec configuration, and a Heroku deployment manifest (app.json) that defines web and processor process types. The project includes a Procfile for running the web server and event stream processors, a Rakefile with tasks for database management and running specs, and standard legal files (LICENSE, CODE\_OFConDUCT). The README provides comprehensive documentation on the application's architecture, including events, aggregates, projections, and reactors, along with instructions for setup and usage.

(repo-wide) · high confidence

Introduce Todo aggregate with full lifecycle support

The application now includes a Todo aggregate that manages the full lifecycle of a todo item. Users can add a new todo, amend its details, mark it as complete, or abandon it. The aggregate enforces state transitions, preventing invalid actions such as completing an already completed or abandoned todo, or adding a todo that already exists.

app/aggregates · high confidence

Introduce web layer with REST endpoints for todo operations

The application now exposes a web interface using Sinatra, providing HTTP endpoints for creating, amending, completing, and abandoning todos, as well as querying outstanding, scheduled, and completed todo lists. Error handling is standardized with custom UnprocessableEntity and BadRequest exceptions mapped to 422 and 400 status codes respectively.

app/web · high confidence

New CLI scripts for managing the Todo app

Added new scripts to interact with the Todo web API. The \scripts/request\ script provides a unified command-line interface to add, amend, abandon, complete, and list todos, as well as generate UUIDs. The \scripts/server\ script starts the application using Rackup in production or Shotgun otherwise. The \scripts/setup\ script installs dependencies and sets up databases for both development and test environments.

scripts · high confidence

New Completed Todos projection for tracking finished tasks

A new projection named 'Completed Todos' has been introduced to maintain a dedicated database view of all completed tasks. The implementation includes a Projector that listens for TodoAdded, TodoAmended, TodoAbandoned, and TodoCompleted events to keep the projection in sync, and a Query class that allows retrieving the list of completed todos.

_app/projections/completed\todos · high confidence

New Todo command handlers for add, complete, amend, and abandon operations

The application now supports four new Todo operations: adding, completing, amending, and abandoning tasks. Each operation is implemented as a dedicated command class (e.g., \Todo::Add\, \Todo::Complete\) that validates input parameters and delegates to the corresponding aggregate method (\add\, \complete\, \amend\, \abandon\) via a command handler. This introduces new capabilities for managing the full lifecycle of a Todo item.

app/commands/todo · high confidence

New outstanding todos projection

A new projection has been added to track and display the list of outstanding todos. The \projector.rb\ file defines a database table (\query\_outstanding\_todos\) that stores todo details (title, description, due date, stakeholder email) and handles events like \TodoAdded\, \TodoAmended\, \TodoCompleted\, and \TodoAbandoned\ to keep the projection in sync. A corresponding \query.rb\ file provides a handler to retrieve all records from this projection table.

_app/projections/outstanding\todos · high confidence

Behavioural changes

Added domain event classes for todo lifecycle

The application now defines specific domain events for the todo lifecycle, including TodoAdded, TodoAmended, TodoCompleted, TodoAbandoned, and StakeholderNotifiedOfTodoCompletion. These classes inherit from EventSourcery::Event, establishing the immutable facts that will be stored in the event store to track state changes.

app/events · high confidence

Initialize EventSourcery configuration for Postgres

The application now includes a new configuration file (config/environment.rb) that sets up the EventSourcery library with a Postgres event store. This configuration defines how the application connects to the database, including support for the BOXEN\_POSTGRESQL\_PORT environment variable and the standard DATABASE\_URL, allowing the event sourcing infrastructure to function correctly.

config · high confidence

Test coverage

Add RSpec test suite configuration; Added request specs for Todo CRUD and projection endpoints; Added test coverage for todo command validations; Added tests for the TodoCompletedNotifier reactor.

Dependencies

Initial Ruby dependency configuration

The project now includes a Gemfile and Gemfile.lock, establishing the Ruby environment with specific versions of key libraries including Sinatra, Puma, and Rack, alongside development and testing tools such as RSpec, Database Cleaner, and Pry.

(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

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 61 → 62 (+0.7)
  • 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 46 → 46 (+0.0)
  • Readiness 65 → 68 (+3.2)
  • Security 90 → 89 (-1.1)
  • Domain Modelling 100 → 100 (-0.0)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (5)

  • 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
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (15)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • High: security finding (details withheld)
  • Medium: security finding (details withheld)
  • No ADRs found
  • Outdated: commander
  • Outdated: event_sourcery
  • Outdated: event_sourcery-postgres
  • Outdated: pry-byebug
  • Outdated: puma
  • Outdated: rake
  • PR-triggered workflow without a permissions block

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

Survey your own repository

envato/event_sourcery_todo_app 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 9028383da9288b60832a6df1efd15e0d5e8cb941 — 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.