Skip to content
CAI
Software that uses CAICheck a score

curiosum-dev/kanta

62.0

Adequate · 18 September 2026

6.2k

lines of production code

Elixir

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Kanta is a translation management library for Elixir and Phoenix applications that provides a web-based dashboard and API for administering localized content. It integrates with Gettext to enable database-driven translation lookups with fallback to PO files, supporting both PostgreSQL and SQLite backends. The system offers features for tracking translation progress, detecting stale messages, and managing translations across multiple application sources.

How it got here

2022–2023 — Initial release and core feature development

31 changes.

This period marks the initial release of Kanta, a translation management library for Elixir/Phoenix, establishing its core OTP application structure, database-backed storage, and web-based dashboard. The work focused on building the foundational UI with Phoenix LiveView and Tailwind CSS, implementing multi-app translation support, and integrating PO file parsing with stale message detection. It also included setting up API endpoints, authentication, and comprehensive test infrastructure to support the v0.5.1 launch.

2024–2025 — SQLite3 migration and database backend

6 changes.

This period focused on implementing a database-driven translation backend for Kanta, introducing SQLite3 migration schemas and a CachedDB adapter for runtime lookups. Comprehensive test coverage was added to validate the new backend architecture, including fallback mechanisms to PO files, alongside support helpers and fixtures for internationalization scenarios.

Features

Add shared Select and Toggle UI components

Introduces new shared UI components for the web interface: a Select dropdown and a Toggle switch. The Select component allows users to choose from a list of options with support for color-coded indicators and keyboard navigation, while the Toggle component provides a switch-style input for boolean settings. Both components are built as LiveComponents using Alpine.js for interactivity and integrate with existing form handling via hidden inputs.

_lib/kanta\web/components/shared/select · high confidence

Add shared search input component

A new shared search input component has been added to the library, providing a reusable UI element for search fields. This component includes a label, an input field with a fixed minimum width, and a search icon, styled with Tailwind CSS classes to support both light and dark modes.

_lib/kanta\_web/components/shared/search\input · high confidence

Added API authentication plug and static asset serving plug

This change introduces two new plugs in the web layer: APIAuthPlug, which enforces optional API authorization by validating a Bearer token against a SHA-256 hash of the KANTA\_SECRET\_TOKEN environment variable (and can be disabled via configuration), and Assets, which serves pre-compiled CSS and JavaScript files for the dashboard with long-term caching headers and content integrity hashes.

_lib/kanta\web/plugs · high confidence

Added database migration support for SQLite3

Users can now run Kanta migrations on SQLite3 databases. This change introduces new migration modules for both PostgreSQL and SQLite3 that implement the Kanta.Migration behaviour, allowing the library to manage schema versions and apply changes across both supported database backends.

lib/kanta/migrations · high confidence

Added shared pagination component with dark mode support

A new shared Phoenix component for rendering pagination controls has been introduced, providing previous/next navigation buttons and dynamic page number links with ellipsis handling for large page counts. The component includes built-in support for dark mode styling and ensures accessibility through appropriate ARIA labels and current page indicators.

_lib/kanta\web/components/shared/pagination · high confidence

Added shared tabs component with mobile-responsive navigation

Introduced a new shared tabs component (\KantaWeb.Components.Shared.Tabs\) that renders tab navigation with distinct layouts for mobile and desktop. On mobile devices, tabs are presented as a select dropdown, while desktop users see a horizontal tab bar. Selecting a tab updates the URL query parameter \tab\ to reflect the active index, enabling state persistence across page loads.

_lib/kanta\web/components/shared/tabs · high confidence

Background extraction of stale translations via new GenServer

A new GenServer, MessagesExtractorAgent, has been introduced to handle the extraction of messages and detection of stale translations in the background. It initializes by running the message extractor and a stale detection process (using fuzzy matching) if the underlying database migrations are sufficiently recent (Postgres v3+ or SQLite v2+). Users can now query this agent to retrieve a set of stale message IDs, with the ability to force a recalculation of the stale detection results on demand.

_lib/kanta/po\files · high confidence

Initial LiveView JavaScript setup with Alpine.js hooks

The application now includes the core JavaScript entry point (\assets/js/app.js\) to initialize Phoenix LiveView connections, integrating Alpine.js for DOM reactivity and configuring automatic fallback to long-polling if WebSocket connections fail. Additionally, new shared Alpine.js hooks for \Select\ and \Toggle\ components have been added to handle user interactions, such as pushing update events to the server and synchronizing UI state changes like closing dropdowns or toggling visibility.

assets/js · high confidence

Initial SQLite3 migration schema and version upgrades

This change introduces the database migration files for the new SQLite3 adapter, establishing the initial schema (v01) and subsequent structural updates (v02, v03). The v01 migration creates the core tables for managing locales, domains, contexts, and translation messages (including singular and plural forms), along with virtual searchable columns for text fields. The v02 migration adds an application sources table and modifies the messages table to link messages to specific application sources, updating the unique index accordingly. Finally, the v03 migration ensures a 'default' context exists in the database and migrates any existing messages with null context IDs to this default context.

lib/kanta/migrations/sqlite3 · high confidence

Initial application configuration setup

The application now includes a primary configuration file (config/config.exs) that establishes core settings for the Kanta library, including an ETS-backed cache with a 24-hour garbage collection interval, and standard Phoenix defaults for JSON serialization and logging. For development environments, it configures the esbuild and Tailwind CSS asset pipelines (with Tailwind set to version 3.4.17) and sets up the Versioce tool for automated version bumping and changelog generation. For testing environments, it defines the database connection parameters for the Kanta test repository, defaulting to a local PostgreSQL instance.

config · high confidence

Initial release of Kanta translation management library

Kanta is introduced as a user-friendly translations manager for Elixir/Phoenix projects, providing an intuitive interface for adding, editing, and deleting translations. This initial release (v0.5.1) includes a comprehensive web-based UI built with Phoenix LiveView, support for PostgreSQL and SQLite databases, and compatibility with Gettext 0.26 and 1.x via a custom backend adapter system. Key features include detection of stale messages, translation progress tracking, and plugin support for PO writing and DeepL integration. The library requires Elixir 1.14+ and Phoenix 1.7/1.8, and includes full documentation, contributing guidelines, and a code of conduct.

(repo-wide) · high confidence

Introduce Kanta as a standalone OTP application with database-backed translations and caching

Kanta is now a proper OTP application that starts a supervision tree including a Registry for managing multiple Kanta instances, a Nebulex-based Cache to minimize database calls, and a MigrationVersionChecker GenServer that warns users when database schema updates are available. The library provides a Kanta.Backend that extends Gettext to look up translations in the database first, falling back to PO files, and includes a full translation management context (Kanta.Translations) for handling singular/plural translations, locales, and domains. Configuration is validated via Kanta.Config, and the library supports both PostgreSQL and SQLite3 adapters through dedicated migration modules and a version checker.

lib/kanta · high confidence

Introduce multi-app translation support with ApplicationSource model

The translation system now supports multiple application sources (e.g., separate mobile apps) by introducing the \ApplicationSource\ model and its associated context. This change adds a new \application\_source\_id\ foreign key to the \Message\ model, allowing messages to be associated with specific applications. The diff includes the full CRUD context (\ApplicationSources\), finder modules for retrieving and listing sources, and type specifications. This structural change enables the system to manage translations across distinct application boundaries rather than a single monolithic source.

lib/kanta/translations · high confidence

Introduces layout view with asset and dashboard path helpers

Adds the \KantaWeb.LayoutView\ module, which embeds layout templates and provides helper functions for rendering. This includes \csp\_nonce\ for Content Security Policy handling, \live\_socket\_path\ for LiveView socket configuration, and \asset\_path\ which constructs verified routes for CSS and JS assets using a dashboard path prefix and current asset hash.

_lib/kanta\web/views · high confidence

New API controllers for translation resources

Added a set of new API controllers in the \lib/kanta\_web/controllers/api\ directory to expose translation management endpoints. These include controllers for application sources, contexts, domains, locales, messages, plural translations, and singular translations, each providing \index\ (listing with pagination) and \update\ (bulk entry updates via \DatabasePopulator\) actions. A basic \KantaApiController\ is also added to return a simple status check.

_lib/kanta\web/controllers · high confidence

New Kanta Dashboard and API routing macros

The \lib/kanta\_web/router.ex\ file introduces two new macros, \kanta\_dashboard/1\ and \kanta\_api/1\, to configure the web interface. The dashboard macro sets up LiveView routes for managing application sources, contexts, domains, locales, and translations, including specific forms for singular and plural translation updates, while also handling static assets and CSP nonces. The API macro defines JSON API endpoints for the same resources, protected by an authentication plug, enabling programmatic access to translation data.

_lib/kanta\web · high confidence

New Kanta backend adapters for database-driven translation lookups

This change introduces a new backend architecture for handling translations within the Kanta library. It defines a \Kanta.Backend.Adapter\ behavior that standardizes singular (\lgettext\) and plural (\lngettext\) translation lookups. A concrete implementation, \Kanta.Backend.Adapter.CachedDB\, is added to fetch translations from the database (handling locale, domain, context, and plural forms via Expo) and perform interpolation. Additionally, a \Kanta.Backend.GettextFallback\ macro is provided to dynamically generate a Gettext backend that falls back to standard PO file translations when database entries are missing, ensuring graceful degradation during extraction or when DB translations are incomplete.

lib/kanta/backend · high confidence

New PO file extraction and stale detection services

Added new service modules in lib/kanta/po\_files/services to handle the extraction of singular and plural translations from .po files into the database, including automatic creation of contexts and domains when missing. Additionally, introduced a StaleDetection service that identifies translation messages present in the database but missing from all locale PO files, using fuzzy matching (Jaro distance) to suggest active replacements for merging.

_lib/kanta/po\files/services · high confidence

New PO file parsing and message extraction handlers

Added \Kanta.PoFiles.POFileParser\ and \Kanta.PoFiles.MessagesExtractor\ modules to handle reading and processing .po translation files. The parser locates PO files within the \priv/gettext\ directory, optionally filtering by configured locales, and extracts message keys for stale detection. The extractor processes these files to retrieve singular and plural translations, supporting explicit message contexts and defaulting to a 'default' context when none is specified.

_lib/kanta/po\files/handlers · high confidence

New dashboard layout with dark mode and responsive sidebar

The Kanta dashboard now features a new layout template that includes a responsive sidebar navigation (collapsible on mobile) and support for dark mode, which respects the user's system preference and can be toggled via a button in the header.

_lib/kanta\web/templates · high confidence

New shared UI components for icons and branding

The application now includes a new \KantaWeb.Components.Icons\ module and a \KantaWeb.Components.Shared.Logo\ component in the shared UI library. The icons module provides reusable SVG helpers for common actions and states, including replace, navigation arrows, search, sorting chevrons, inspect, languages, album, and box. The logo component renders the Kanta brand mark, allowing consistent branding across the interface.

_lib/kanta\web/components/shared · high confidence

New translation dashboard with stale message management and cache controls

A new dashboard LiveView has been introduced to provide a central overview of translation statistics, including counts for languages, messages, contexts, and domains. It features a Translation Progress section that displays completion percentages for each language. The dashboard also introduces operational controls: users can manually clear the translation cache, permanently delete detected stale messages, or merge stale messages into their fuzzy-matched targets. Additionally, the layout supports rendering child components from installed plugins to extend dashboard functionality.

_lib/kanta\web/live/dashboard · high confidence

New translation management UI with filtering and plural support

The translations dashboard now includes dedicated LiveViews and components for managing application sources, contexts, and domains, each with list tables and detail views. A new filters bar allows users to search messages and filter by domain, context, application source, translation status, and staleness. Singular and plural translation forms have been introduced, with plural forms supporting tabbed editing for multiple quantity variants and displaying example usage strings. The locales list view now renders gradient icons and conditionally includes plugin components, while the translation form live view handles parameter parsing and navigation to preserve filter state.

_lib/kanta\web/live/translations · high confidence

New utility modules for color defaults, database population, and parameter parsing

This change introduces several new utility modules in the \lib/kanta/utils\ directory to support internal framework operations. \Kanta.Utils.Colors\ provides a default color definition (\\#7E37D8\) for UI theming. \Kanta.Utils.DatabasePopulator\ and \Kanta.Utils.GetSchemata\ enable populating the database with translation-related schemas (such as contexts, domains, and messages) using conflict resolution strategies. \Kanta.Utils.GettextRecompiler\ manages flag files to trigger recompilation of Gettext backends after extraction. \Kanta.Utils.ModuleFolder\ and \Kanta.Utils.ModuleUtils\ offer helpers for converting module names to safe folder names and checking module existence. Finally, \Kanta.Utils.ParamParsers\ adds logic for parsing IDs and page numbers, including support for custom ID parse functions.

lib/kanta/utils · high confidence

Behavioural changes

Introduction of Tailwind CSS for styling and dark mode support

The application now uses Tailwind CSS for its styling, replacing the previous approach. This change introduces a new design system with specific color palettes for light and dark themes, enabling a dark mode feature controlled via a CSS class. The configuration also includes custom font families (KoHo), utility classes for form feedback states (phx-no-feedback, phx-click-loading, etc.), and integrates the @tailwindcss/forms plugin to style form elements consistently.

assets · high confidence

PostgreSQL migration schema updated to v04 with fuzzy search and application sources

The PostgreSQL migration path for Kanta has been updated through version 04. Version 01 establishes the base schema including locales, domains, contexts, messages, and translations. Version 02 adds fuzzy search capabilities by creating tsvector columns and GIN indexes on translation tables, along with the unaccent extension. Version 03 introduces application sources and modifies the messages table to include an application\_source\_id, updating the unique index accordingly. Version 04 ensures a 'default' context exists and migrates any messages with null context\_id to use this default context.

lib/kanta/migrations/postgresql · high confidence

Support for Phoenix 1.8+ and new web interface entrypoint

The library now supports Phoenix 1.8+ by conditionally configuring controllers to include JSON format support and a specific dashboard layout, while maintaining compatibility with Phoenix 1.7. A new \KantaWeb\ module serves as the entrypoint for defining web interfaces, introducing a \dashboard\_path\ helper for verified routes and integrating \PhoenixHTMLHelpers\. Additionally, the main \Kanta\ module has been refactored into a supervisor that manages plugins and migration version checking.

lib · high confidence

Updated compiled frontend assets to Tailwind CSS v3.4.17 and Alpine.js v3.12.1

The distributed CSS and JavaScript bundles have been regenerated. The CSS now reflects Tailwind CSS v3.4.17, incorporating updated utility classes and CSS variables. The JavaScript bundle now includes Alpine.js v3.12.1, which provides the reactive UI framework and directive handling for the application.

dist · high confidence

Updated language data and database schema for Kanta v4

The application now includes an updated ISO 639 language dataset in priv/iso639.json, adding support for languages such as Kashmiri, Turkmen, Uzbek, Macedonian, and others with their respective metadata and flag colors. Additionally, a new Ecto migration has been introduced to upgrade the Kanta database schema to version 4, ensuring the underlying storage structure aligns with the latest library requirements.

priv · high confidence

Fixes

Add commit message linting for Kanta mix release projects

A new commit-msg hook has been added to enforce commit message standards using commitlint. This ensures that commit messages are validated against conventional commit guidelines before being accepted, improving consistency in project history.

.lefthook · medium confidence

Test coverage

Added comprehensive test coverage for Kanta translation backend and utilities; Added test coverage for schemata spec module; Added test fixtures for internationalization scenarios; Added test support helpers for Gettext, Ecto, and Phoenix; Added tests for the shared pagination component; Updated test environment setup and removed dummy test.

Dependencies

Initial release of Kanta 0.5.1 with Elixir/Phoenix dependencies and frontend tooling

This commit establishes the initial dependency structure for the Kanta translations management library (version 0.5.1). It introduces Elixir dependencies including Phoenix 1.7, Ecto 3.12, Phoenix LiveView, Phoenix HTML 4.0, Gettext 1.0.0, and Nebulex for caching, alongside dev tools like Credo, Dialyxir, and ExDoc. It also adds frontend asset management via \assets/package.json\ and lockfiles, specifying Alpine.js, Babel, Tailwind CSS, and PostCSS, and configures the build pipeline in \mix.exs\ to compile these assets using esbuild and Tailwind.

(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

Baseline

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

Lenses

  • Code Health 99
  • Architecture 89
  • Maturity 56
  • Readiness 75
  • Security 77
  • Accessibility 54

Changes since last survey

  • 300 commits — 251 feature/other, 49 fixes

By area

  • (repo) — 85 commits
  • lib/kanta — 71 commits
  • (root) — 61 commits
  • lib/kanta_web — 47 commits
  • .github/workflows — 13 commits
  • test/kanta — 9 commits
  • config/config.exs — 2 commits
  • dist/css — 2 commits
  • docs/how-to-write-plugins.md — 2 commits
  • test/fixtures — 2 commits
  • .github/ISSUE_TEMPLATE — 1 commit
  • assets/images — 1 commit
  • lib/kanta_web.ex — 1 commit
  • priv/static — 1 commit
  • test/kanta_test.exs — 1 commit
  • test/support — 1 commit

Notable commits

  • fix: Add dialyzer, fix credo and dialyzer warnings
  • fix: Fix
  • fix: Fix JS error on LiveView page change
  • fix: Fix Pagination UI
  • fix: Fix Tailwind styles in compiled assets [#122]
  • fix: Fix bug when context is nil in PO file
  • fix: Fix credo
  • fix: Fix github dependency on gettext fork (#1)
  • fix: Fix line break in cached DB test
  • fix: Fix naming
  • fix: Fix naming across file
  • fix: Fix redirect to Dashboard
  • fix: Fix to application_source_form_live
  • fix: Fix translation preloads to preload only necessary data
  • fix: Fix: non async tests for DB-related operation.
  • fix: Fixes link to License in README.md
  • fix: Fixes to migrations
  • fix: Merge branch 'develop' into fix/multiline-translations
  • fix: Merge branch 'develop' into fix/multiple-locales-for-messages-fixes
  • fix: Merge pull request #10 from curiosum-dev/fix/phoenix-verified-paths
  • …and 280 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

curiosum-dev/kanta 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 618339ae740c42c983adffd99ce5911dd4bb13db — 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.