Skip to content
CAI
Software that uses CAICheck a score

elixir-maru/maru

59.0

Adequate · 23 September 2026

2.9k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Maru is an Elixir web framework that simplifies the creation of RESTful APIs by providing a declarative DSL for defining routes, parameters, and error handling. It integrates with the Plug ecosystem to manage HTTP versioning, request validation, and standardized responses. The system supports configurable JSON parsing and includes utilities for route inspection and testing.

How it got here

2013 — Rebranding to Maru and dependency updates

5 changes.

This period focused on renaming the project from Lazymaru to Maru, updating dependencies to support Elixir 1.4+ and Plug v1.7, and adding a comprehensive test suite. The work also involved cleaning up stale build artifacts and restructuring the codebase to use a new server module.

2014–2016 — Maru architecture refactoring and feature expansion

8 changes.

This period focused on a major internal refactoring of the Maru library, splitting its monolithic structure into modular components for routing, parameters, and exceptions. Concurrently, new features were introduced, including HTTP versioning and not-found handling plugs, built-in type parsers, and a Mix task for route inspection.

2017 — Test coverage and code refactoring

5 changes.

This period focused on improving code quality through comprehensive test coverage for builder plugins, route mounting, and the plug router helper. Concurrently, the resource module was refactored to separate DSL definitions, routing logic, and plug management into distinct modules, enhancing modularity and maintainability.

Features

Add mix maru.routes task for printing routes

A new Mix task, \mix maru.routes\, has been added to print the routes for a Maru router module. The task compiles the code, then iterates over the router's \\_\routes\\_\ data to display each route's version, HTTP method, path, and description. It supports specifying a particular module as an argument or, if no module is given, it will iterate over all registered Maru servers.

lib/mix/tasks · high confidence

Add versioning and error-handling plugs

The Maru framework now includes dedicated plugs for handling HTTP versioning and not-found errors. A new \Maru.Plugs.GetVersion\ plug extracts the API version from the \Accept\ header, query parameters, or a specific header, while \Maru.Plugs.PutVersion\ allows setting the version directly. Additionally, \Maru.Plugs.NotFound\ was added to raise a \Maru.Exceptions.NotFound\ error for unmatched routes, and \Maru.Plugs.SaveConn\ was introduced to store the connection in the process dictionary.

lib/maru/plugs · medium confidence

Added built-in type parsers for common data types

The framework now provides built-in type parsers for Atom, Base64, Boolean, Charlist, File, Float, Integer, JSON, List, Map, and String. Each type implements a parse function that converts raw input into the corresponding Elixir data structure. Notably, the JSON type parser is configurable and defaults to using the Jason library for decoding, allowing users to swap in a different JSON library if desired.

lib/maru/types · high confidence

Architecture

Restructured resource DSL and routing logic into dedicated modules

The resource module's internal structure has been refactored to improve modularity and maintainability. The DSL definitions (such as \prefix\, \version\, \plug\, and HTTP method handlers like \get\, \post\, etc.) have been moved into a new \Resource.DSLs\ module. Routing and endpoint generation logic has been extracted into \Resource.Helper\ and \Resource.Endpoint\. Additionally, route extension and filtering logic has been isolated into \Resource.Extend\, and plug management has been separated into \Resource.MaruPlug\. This change reorganizes the codebase without altering the external API or user-facing behavior.

lib/maru/resource · high confidence

Behavioural changes

Disable logger backends in test environment

The configuration file for the application now explicitly disables all logger backends when running in the test environment. This change ensures that test runs do not produce log output, which can improve test execution speed and reduce noise in test results.

config · high confidence

Major refactoring of Maru's internal architecture and DSL

The library's internal structure has been significantly reorganized to improve code clarity and maintainability. The \Maru.Builder\ module now serves as the central entry point, composing various builder plugins such as \Pipeline\, \Exception\, \PlugRouter\, \Description\, and \Parameter\. New modules have been introduced to handle specific concerns: \Maru.Server\ for standalone server management, \Maru.Test\ for unit testing, and \Maru.Response\ for standardizing response helpers. The router and resource logic have been split into separate modules (\Maru.Router\, \Maru.Resource\), and the exception handling has been moved to \Maru.Exceptions\. This refactoring changes how users interact with the library's internal components, although the public DSL remains largely consistent.

lib/maru · high confidence

Maru 0.14.0-dev: Support for Plug v1.7 and configurable JSON library

This release updates the framework to support Plug v1.7 and makes the JSON library configurable, defaulting to Jason. It also introduces a standalone Maru.Server module for running the server, deprecating the previous Maru.Supervisor approach. Additionally, the project has been transferred to the elixir-maru organization, and the README has been updated with comprehensive usage examples and installation instructions.

(repo-wide) · high confidence

Migration from Lazymaru to Maru

The library has been renamed from Lazymaru to Maru, with the old module names and files removed. The new Maru module provides a version accessor and configures a default JSON library (Jason) with a compile-time check to warn if the library is not loaded. The previous router and supervisor implementations have been replaced with a new structure, including a Mix task to discover Maru servers.

lib · high confidence

Removal of stale Elixir compilation artifacts

The \ebin\ directory's stale compilation artifacts have been removed, including the \.compile.elixir\ and \.compile.lock\ files and the \lazymaru.app\ application manifest. This cleanup eliminates outdated build metadata and ensures the project state is consistent with the current source code.

ebin · high confidence

Restructured builder into modular components for routes, parameters, and exceptions

The \lib/maru/builder\ directory has been refactored to replace the previous monolithic structure with distinct, specialized modules. Route generation is now handled by \PlugRouter\ and its associated DSLs, which manage the compilation of route matching and method-not-allowed responses. Parameter handling has been split into \Parameter\ (with \DSLs\, \Helper\, \Dependent\, and \Validator\ sub-modules) to support complex nested structures and conditional validation. Exception handling is now a dedicated \Exception\ module that automatically injects error-handling logic into the router's pipeline. Additionally, a new \Description\ module allows users to define API documentation directly within the builder, while \Pipeline\ and \Versioning\ modules manage middleware and versioning strategies. This change improves compile-time performance and code organization by separating concerns.

lib/maru/builder · high confidence

Test coverage

Added comprehensive test suite for Maru components; Added comprehensive tests for the Maru builder DSL, parameter handling, and versioning; Added route description validation tests; Added tests for builder plugins; Added tests for not-found and versioning plug behaviors; Added tests for route mounting; Added tests for the plug router helper.

Dependencies

Maru 0.14.0-pre.1: Name change, Elixir 1.4+ support, and updated dependencies

The project has been renamed from Lazymaru to Maru, with the application identifier changed to :maru. The framework now requires Elixir 1.4 or higher, dropping support for older Elixir versions. Dependencies have been updated to include Plug 1.7, Plug.Cowboy, and Jason, while also adding ExDoc and Inch.Elixir for documentation and metrics. The package metadata, including maintainers and licenses, has been configured.

(dependencies) · medium 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 64 → 59 (-4.6)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 100 → 100 (-0.5)
  • Architecture 100 → 100 (-0.1)
  • Maturity 49 → 49 (+0.0)
  • Readiness 58 → 50 (-8.3)
  • Security 92 → 75 (-16.7)

Resolved (9)

  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • No exposed public API
  • Test reliability not included
  • dormant codebase — no living knowledge left to concentrate

New (15)

  • Documentation: no contributor guidance (README.md)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • No SBOM
  • No artifact signing
  • No build provenance
  • No dependency advisory monitoring
  • Outdated: ex_doc
  • Outdated: jason
  • Outdated: plug
  • Outdated: plug_cowboy
  • TodoComment (lib/maru/test.ex)
  • TodoComment (lib/maru/test.ex)

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

Survey your own repository

elixir-maru/maru 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 23 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 62b6ca0e42dd550683af8743f50e67048c4027d0 — 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-955b9cee9818.