IvanRublev/Domo
41.6
Weak · 21 September 2026
6.7k
lines of production code
Elixir
primary language
8
measurements over time
What this system is
Domo is an Elixir library that provides compile-time type safety and validation for domain models and Ecto changesets. It automatically generates type-ensuring functions to verify struct integrity and preconditions, ensuring data consistency before runtime. The system also integrates with Phoenix for hot-reload compatibility and offers benchmarking tools to compare performance against alternative validation approaches.
How it got here
2020 — Structural type enforcement and validation
7 changes.
The project introduced compile-time type ensurer generation and Ecto.Changeset validation to enforce structural type consistency and preconditions. This period focused on establishing a standardized code quality baseline and comprehensive test coverage for these new features, while removing legacy example applications.
2021–2022 — compile-time type safety and example apps
15 changes.
The project shifted to generating type-ensuring functions at compile time, introducing a modular registry and dedicated compiler tasks to support Ecto and Phoenix hot-reload scenarios. This architectural change was accompanied by comprehensive test coverage and the creation of example applications to demonstrate the library's capabilities and performance.
Features
Add Avialia example app assets and database migrations
The Avialia example application is enhanced with complete asset pipelines and database schema definitions. Frontend assets are introduced, including a Babel configuration, a Webpack build setup, and SCSS/CSS files that provide styling for alerts, forms, and the Phoenix landing page. On the backend, new Ecto migrations create the 'passengers' and 'shipments' tables, while the seeds script is updated to populate measurement data for cargo tracking.
_example\avialia/assets · high confidence
Add Ecto.Changeset validation support
The library now supports validating Ecto.Changeset data against defined types and preconditions. A new \Domo.Changeset\ module provides a \validate\_type/2\ function that ensures changeset fields conform to their \t()\ type specs and fulfill precondition constraints. This allows developers to integrate structural type checking directly into their Ecto validation pipelines, with options to filter precondition errors and handle nested associations.
lib/domo · high confidence
Add example demonstrating typed struct integrations
A new example application, \example\_typed\_integrations\, has been added to showcase the integration of the \Domo\ library with \TypedStruct\ and \TypedEctoSchema\. This example provides reference implementations (\FunctionalCoreStruct\ and \EctoSchemaStruct\) that demonstrate compile-time validation of default values and runtime data validation, serving as a practical guide for users.
_example\_typed\integrations · high confidence
Added Ecto and Domo benchmarking suite
Introduced a new benchmarking application, \benchmark\_ecto\_domo\, designed to compare the performance of Ecto and Domo for change set validation. The suite includes models for Albums and Tracks, configuration for a PostgreSQL database, and a main runner that utilizes the Benchee library to measure CPU and memory consumption across 3000 inputs. This addition provides a direct performance comparison between Ecto's \validate\_required\ and Domo's \validate\_type\ mechanisms.
_benchmark\_ecto\domo · high confidence
Added compile-time type ensurer generation for structs
The library now generates type-ensuring functions (new!, new, ensure\_type!, ensure\_type) at compile time by analyzing struct field types. This enables compile-time verification of business domain model consistency, ensuring that only valid data is accepted during struct construction and modification. The generated code is stored in the build directory and can be found in \_build/MIX\_ENV/domo\_generated\_code. This change improves compatibility with Elixir 1.15+, Ecto 3.7.x, and umbrella apps, while also supporting self-referencing structs, Range.t(), and MapSet.t() types.
lib · high confidence
Added linting and formatting configuration files
Added configuration files for the Credo and Check tools, and updated the Elixir formatter configuration to include new test paths and line length settings, establishing a standardized code quality and formatting baseline for the project.
(repo-wide) · high confidence
Compile-time type ensurer generation and validation
The library now generates type-ensuring functions at compile time, enabling early detection of type mismatches and invalid default values. This includes validating struct integrity and defaults, supporting user-defined preconditions for valid value ranges, and handling Ecto.Changeset and Phoenix hot reload scenarios. The change introduces new modules for aliasing, atomization, batch ensuring, dependency resolution, and planning, which collectively improve compatibility with Elixir 1.19 and Ecto 3.7.x.
_lib/domo/type\_ensurer\factory · high confidence
Introduce Avialia example application with boarding and cargo management
The example\_avialia/lib directory now contains a complete example application featuring a 'Boardings' context for managing passengers and a 'Cargos' context for managing shipments, including custom Ecto types for shipment weight and kind. The web layer includes a PageController and router handling CRUD operations for both domains, supported by new templates and views that render passenger and cargo forms and lists. This adds a functional demo of the library's capabilities within the example project.
_example\avialia/lib · high confidence
Removals
Removal of the example\_app domain model and API
The example application demonstrating the Domo library's domain modeling capabilities has been removed. This includes the Order and Quantity domain models, the quantity converter, the Phoenix API endpoints for adding and listing orders, the database schema and migrations, and all associated tests. Users will no longer have access to this example implementation.
_example\app · high confidence
Architecture
Refactored type-ensuring function generation into a modular registry
The type-ensuring function generation logic has been refactored into a new \MatchFunRegistry\ module that delegates to specialized sub-modules (for lists, maps, structs, tuples, or-elements, and literals). This change restructures how type specs are matched and validated at compile time, introducing a GenServer-based registry to manage and generate match functions for various Elixir types.
_lib/domo/type\_ensurer\factory/generator · high confidence
Behavioural changes
Add project-specific configuration for test environment
A new 'config/config.exs' file has been added to the project, establishing a configuration scope restricted to this project. It defines a general application configuration and, specifically for the test environment, sets the 'test\_structs\_path' and configures 'MixProject' and 'MixTestWatch' settings.
config · high confidence
Introduce compile-time type resolution for fields and arguments
The library now generates type-ensuring functions at compile time, replacing the previous runtime approach. This change introduces a new \fields.ex\ module that resolves field types, handles Ecto schema associations, and processes remote types with support for preconditions and error messages. Additionally, a new \arguments.ex\ module provides utility functions for generating argument combinations. These updates improve compatibility with Elixir 1.18, Ecto 3.7.x, and OTP 26, while also supporting self-referencing structs, range types, map sets, and user-defined preconditions.
_lib/domo/type\_ensurer\factory/resolver · medium confidence
Migrate example app to Avialia with multi-repo support
The example application has been renamed to 'example\_avialia' and updated to use the 'import Config' syntax. The configuration now supports two Ecto repositories (Boardings and Cargos) across all environments, with environment-specific database URLs and test partitioning. The endpoint configuration includes live view signing salt, pubsub server, and hot reload compilers.
_example\avialia/config · high confidence
Renamed example project from example\_app to example\_avialia
The example application has been renamed from example\_app to example\_avialia. This includes renaming the project directory, updating the .gitignore file to reflect the new project name, and adjusting the .formatter.exs configuration to import dependencies in a specific order (Ecto, Phoenix, then Domo) and set a line length of 150 characters.
_example\avialia · high confidence
Support Phoenix hot-reload with dedicated compiler task
Added a new Mix compiler task, \Mix.Tasks.Compile.DomoPhoenixHotReload\, to handle Domo's compilation during Phoenix hot-reload scenarios. This change ensures that the Domo plan is processed correctly when Phoenix's hot-reload mechanism invokes the compiler directly, preventing the system from remaining in plan collection mode indefinitely. The implementation includes logic to detect if the hot-reload compiler is active and ensures the Elixir compiler has run before processing the plan, thereby fixing issues with Phoenix hot-reload from umbrella app roots.
lib/mix · high confidence
Test coverage
Added and reorganized tests for Domo's changeset validation and code evaluation; Added comprehensive test coverage for the Domo type resolution and validation logic; Added test fixtures for struct modules; Added test suite for the Avialia example application; Added tests for Domo compiler tasks; Added tests for the Domo type-ensurer factory components.
Dependencies
Update project dependencies and configuration
The Domo library's \mix.exs\ was updated to require Elixir 1.15+, and its development dependencies were updated, including \credo\ and \ex\_doc\. The \example\_app\ was renamed to \example\_avialia\ and upgraded to require Elixir 1.11+, with \phoenix\ updated to 1.5.9 and \phoenix\_ecto\ to 4.1. Additionally, new benchmark and test projects were added: \benchmark\_ecto\_domo\ (using \typed\_ecto\_schema\ and \benchee\), \example\_typed\_integrations\ (using \typed\_struct\), and \test/struct\_modules\ (using \ecto\). The \example\_avialia\ also received a \package.json\ for frontend asset compilation.
(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 52 → 42 (-10.2)
- Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 96 → 98 (+1.5)
- Architecture 100 → 96 (-4.3)
- Maturity 45 → 45 (+0.0)
- Readiness 41 → 26 (-14.8)
- Security 62 → 70 (+7.6)
- Accessibility 47 (new)
Resolved (62)
- Coverage not included — suite not readable by the collector
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical vulnerability: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Dependency hygiene not measured — no supported dependency manifest was read
- Duplicated block (7 lines × 2) (lib/domo/type_ensurer_factory/generator/match_fun_registry/maps.ex)
- Duplicated block (7 lines × 2) (lib/domo/type_ensurer_factory/resolver/fields.ex)
- Duplicated block (8 lines × 2) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- Duplicated block (9 lines × 2) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- Duplicated block (9 lines × 3) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- High CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- High CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- High CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- …and 42 more
New (73)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Critical vulnerability: [GHSA redacted] (example_avialia/assets/package-lock.json)
- Dependency hygiene PARTLY measured — Mix pinning read, dependency currency not (Hex registry unreachable)
- Documentation: no installation or build instructions (README.md)
- Duplicated block (12 lines × 3) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- Duplicated block (2–6 lines × 3) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- Duplicated block (5 lines × 2) (lib/domo/type_ensurer_factory/resolver/fields.ex)
- Duplicated block (6–8 lines × 3) (lib/domo/type_ensurer_factory/generator/match_fun_registry/maps.ex)
- Duplicated block (8 lines × 2) (lib/domo/type_ensurer_factory/resolver/fields.ex)
- Duplicated block (9 lines × 2) (lib/domo/type_ensurer_factory/generator/match_fun_registry/lists.ex)
- High CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- High CVE: [GHSA redacted] (example_avialia/assets/package-lock.json)
- …and 53 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
IvanRublev/Domo 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 18c08ab427cd9b917932a9497f9983d754529522 — 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.