phcurado/zoi
69.8
Adequate · 18 September 2026
10.1k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
Zoi is an Elixir schema validation library that defines and validates data structures with support for coercion, custom refinements, and type-specific constraints. It integrates directly with Phoenix LiveView by converting schemas into HTML form structs and provides introspection capabilities to auto-generate human-readable documentation. The system includes a benchmarking suite for performance evaluation and comprehensive test coverage for core validation, JSON Schema encoding, and ISO date handling.
Features
Added Zoi performance benchmark suite
A new benchmarking tool has been added to the \bench\ directory to measure the performance of Zoi schema validation. The suite includes scripts to run specific test cases (primitives, complex structures, comparisons) or a quick smoke test, allowing users to evaluate Zoi's speed against libraries like Ecto and NimbleOptions.
bench · high confidence
Introduce Phoenix Forms integration and schema introspection
Zoi now includes built-in support for Phoenix HTML forms via the new \Zoi.Form\ and \Zoi.FormData\ modules, which allow Zoi schemas to be directly converted into \Phoenix.HTML.Form\ structs for seamless use in LiveView and Phoenix templates. Additionally, the library adds a \Zoi.Describe\ module that introspects schema metadata to automatically generate human-readable documentation strings for fields, simplifying the creation of HexDocs or inline help text.
lib/zoi · high confidence
Introduce Zoi schema validation library and remove Xoi
The library now includes \Zoi\, a schema validation library for Elixir that allows defining schemas for various data types (strings, integers, booleans, maps, etc.) with built-in validations like minimum/maximum values, regex patterns, and email formats. It supports coercion, custom refinements, transforms, and custom error messages. The previous \Xoi\ module has been removed.
lib · high confidence
Project renamed to Zoi with initial configuration and documentation
The project has been renamed from Xoi to Zoi, updating the package name in the README and gitignore. This change introduces the initial project configuration, including a Credo linter setup (.credo.exs), tool version specifications for Elixir 1.20.0-rc.6 and Erlang 29.0 (.tool-versions), and a Coveralls configuration (coveralls.json). The repository also adds the Apache 2.0 License and a comprehensive Changelog documenting versions up to 0.18.7, alongside an updated README with usage examples and documentation references.
(repo-wide) · high confidence
Test coverage
Add comprehensive test suite for Zoi and remove legacy Xoi tests; Added comprehensive test coverage for Zoi core modules.
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
Baseline
- First survey — no prior run to compare against. CAI 70.
Lenses
- Code Health 99
- Architecture 100
- Maturity 59
- Readiness 70
- Security 80
Changes since last survey
- 262 commits — 232 feature/other, 30 fixes
By area
- (root) — 130 commits
- lib/zoi — 113 commits
- lib/zoi.ex — 9 commits
- test/zoi — 8 commits
- guides/recipes.md — 1 commit
- guides/using_zoi_to_generate_openapi_specs.md — 1 commit
Notable commits
- fix: Add deprecated support for all types and fix extend options (#148)
- fix: Fix nested keyword error (#82)
- fix: Fix nilability in generated struct typespecs (#153)
- fix: fix README lib version
- fix: fix Zoi.Struct.enforce_keys/1 on optional and default types (#105)
- fix: fix badge
- fix: fix changelog
- fix: fix coercion on decimal
- fix: fix comma in openAPI example (#57)
- fix: fix credo and dialyzer
- fix: fix decimal type being required dependency on Zoi.Describe module (#85)
- fix: fix docs
- fix: fix docs
- fix: fix elixir 1.20 warnings (#141)
- fix: fix enum binary typespec (#107)
- fix: fix error message on nullable
- fix: fix map parsing logic (#25)
- fix: fix nested regex patterns in json schema objects (#134)
- fix: fix object transform function from anon func to mfa (#33)
- fix: fix readme
- …and 242 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
phcurado/zoi 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 18 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 37b91021e166f526972ed44f4bf675f9a10adce9 — 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-5d04157a340d.