Skip to content
CAI
Software that uses CAICheck a score

Taure/kura

59.0

Adequate · 17 September 2026

8.6k

lines of production code

Erlang

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Kura is a database abstraction layer and ORM for Elixir that supports pluggable backends like PostgreSQL and SQLite, enabling multi-repo configurations within a single application. It provides advanced data modeling capabilities, including complex associations, composite keys, and CTEs, alongside robust features for audit logging and at-rest field encryption. The system also includes a capability detection mechanism to ensure backend compatibility and comprehensive test coverage for its core operations.

Features

Expanded ORM schema definitions and query capabilities

The Kura ORM header file has been updated to support advanced data modeling and querying features. Users can now define complex relationships including \has\_many :through\ associations, embedded schemas (\embeds\_one\, \embeds\_many\), and composite foreign keys. The changeset record now supports constraint validations, association changes, and optimistic locking. Additionally, the query record has been extended to support Common Table Expressions (CTEs), set operations (UNION, INTERSECT, EXCEPT), and soft delete filtering via the \include\_deleted\ flag.

include · high confidence

Introduce audit trail, at-rest encryption, and backend capability checks

Users can now track data changes with a new audit trail module that logs inserts, updates, and deletes to an \audit\_log\ table, supporting actor context and metadata. At-rest field encryption is available via \{encrypted, Type}\ fields, using AES-256-GCM and a pluggable keyring behaviour for key management. Additionally, a new capabilities system allows backends to declare supported features (like \jsonb\, \window\_functions\, or \full\_text\_search\), enabling consumers to fail fast at startup if required features are missing.

src · high confidence

Kura 2.0 introduces pluggable backends and multi-repo support

The database layer now supports pluggable backends, allowing you to choose between PostgreSQL (via the new \kura\_postgres\ package) and SQLite (via \kura\_sqlite\) instead of being locked into a single driver. You configure these by providing a \{repos, \#{...}}\ map in your application environment, where each repo specifies its \backend\. This architecture also enables multi-repo setups within a single application, letting you run different databases (e.g., Postgres for primary data, SQLite for analytics) with independent dialects and connection pools. Existing single-repo configurations remain supported via fallbacks, but new projects should adopt the map-based configuration.

(repo-wide) · high confidence

Test coverage

Added comprehensive test suites for aggregate functions, audit logging, and association handling

Added new test modules in the test directory to verify core library capabilities. kura\_aggregate\_tests covers count, sum, avg, min, and max operations with various filters and edge cases. kura\_audit\_tests and kura\_audit\_encryption\_tests validate actor context management, data stashing, and the redaction of encrypted fields in audit logs. kura\_assoc\_tests, kura\_cast\_assoc\_tests, and kura\_changeset\_assoc\_tests exercise association definitions, on\_delete behaviors, and changeset casting for has\_many, belongs\_to, and embeds\_many relationships. Additional tests in kura\_app\_tests verify pool configuration defaults and multi-repo dialect resolution, while kura\_bench\_tests provide performance benchmarks for insert throughput and read latency.

test · 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

Baseline

  • First survey — no prior run to compare against. CAI 59.

Lenses

  • Code Health 91
  • Architecture 100
  • Maturity 56
  • Readiness 47
  • Security 75

Changes since last survey

  • 184 commits — 155 feature/other, 29 fixes

By area

  • (root) — 74 commits
  • (repo) — 22 commits
  • .github/workflows — 17 commits
  • include/kura.hrl — 10 commits
  • src/kura_migrator.erl — 10 commits
  • src/kura_app.erl — 7 commits
  • src/kura_repo_worker.erl — 6 commits
  • src/kura_changeset.erl — 4 commits
  • guides/associations.md — 3 commits
  • src/kura_changeset_assoc.erl — 3 commits
  • src/kura_dialect_pg.erl — 3 commits
  • src/kura_preloader.erl — 3 commits
  • src/kura_types.erl — 3 commits
  • guides/constraints-and-indexes.md — 2 commits
  • src/kura_db.erl — 2 commits
  • src/kura_dialect.erl — 2 commits
  • guides/architecture.md — 1 commit
  • guides/migrations.md — 1 commit
  • src/kura_driver.erl — 1 commit
  • src/kura_migration.erl — 1 commit

Notable commits

  • fix: Merge pull request #22 from Taure/fix/ex-doc-build
  • fix: Merge pull request #39 from Taure/feat/benchmarks-and-join-fix
  • fix: fix(hank): ignore unused_callbacks for kura_pool behaviour (#104)
  • fix: fix(migrator): code:ensure_loaded dialect before function_exported check (#117)
  • fix: fix(migrator): portable schema_migrations DDL for non-Postgres backends (#116)
  • fix: fix(migrator): wait for pgo pool before running migrations (#89)
  • fix: fix(otp29): replace deprecated catch with try/catch + add OTP 29 to CI matrix (#119)
  • fix: fix(query-cache): key compiled-query cache on the query, not a phash2 (#164)
  • fix: fix(types): accept scalar values in jsonb cast/dump/load (#118)
  • fix: fix(types): dump jsonb string scalars (#123)
  • fix: fix: add missing cte_admins test schema for CTE integration test (#70)
  • fix: fix: add permissions to release workflow (#60)
  • fix: fix: close the quoting gaps and honour on_conflict in bulk inserts (#181)
  • fix: fix: compile_joins generates proper cross-table ON clauses
  • fix: fix: derive fields from dumped changes in insert/update (#54)
  • fix: fix: ensure_database connects to configured DB first (#88)
  • fix: fix: pass ssl/ssl_options to migrator temp pool (#87)
  • fix: fix: quote atom/enum defaults in generated DDL (#124) (#127)
  • fix: fix: quote every identifier and fail closed on dump errors (#180)
  • fix: fix: re-enable mutation testing and eqWAlize, fix failures (#55)
  • …and 164 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

Taure/kura 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 17 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 2fa6d253af528f3185dd5669efecc018fc9e27cf — the exact code this score is about.
  • Scored under rubric-2026.09.12 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-f94092f054c1.