Skip to content
CAI
Software that uses CAICheck a score

nomasystems/erf

71.4

Strong · 2 October 2026

3.6k

lines of production code

Erlang

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

ERF is a design-first REST framework for Erlang that generates API routing and validation from OpenAPI 3.0 specifications. It provides an HTTP server abstraction with middleware support for authentication and logging, along with built-in Swagger UI for interactive documentation. The system includes utilities for static file serving, telemetry, and configuration management, demonstrated through example applications for user management and shop catalogs.

Features

Add users example application with REST API and authentication

The examples/users directory now contains a complete Erlang application demonstrating the erf framework. It includes a REST API for creating, retrieving, and deleting users, backed by an ETS table. The example implements a preprocess middleware for API key authentication (checking the x-api-key header) and a postprocess middleware for logging request processing time. The application starts an HTTP server on port 8080 using the public\_api\_server behavior.

examples/users · high confidence

Added Swagger UI and OpenAPI specification assets

The priv directory now includes the necessary assets to serve an interactive API documentation interface. This change adds the Swagger UI v4.5.0 HTML page and its Apache 2.0 license, along with the OpenAPI 3.0 specification schema and a sample Petstore example, enabling users to view and test API endpoints via the Swagger UI.

priv · high confidence

Initial release of the erf design-first REST framework

This change introduces the core components of erf, a design-first Erlang REST framework. It adds the main application module (erf.erl) with supervision tree support, a configuration manager (erf\_conf.erl), and an HTTP server abstraction (erf\_http\_server.erl) with an Elli backend. The framework includes an OpenAPI 3.0 parser (erf\_parser\_oas\_3\_0.erl) to generate API ASTs, a router generator (erf\_router.erl) to create routing modules from specifications, and support for preprocess/postprocess middlewares. It also adds utilities for static file serving (erf\_static.erl), telemetry events (erf\_telemetry.erl), and string manipulation (erf\_util.erl). The application version is set to 0.2.0 with dependencies on elli, ndto, and optional telemetry.

(repo-wide), src · high confidence

Behavioural changes

Shop example now serves catalog and orders APIs on a single port

The shop example application has been updated to mount multiple API specifications (orders and catalog) on a single HTTP port (8081) using the erf framework. This change consolidates the API endpoints, allowing users to access both the orders API at the root path and the catalog API under /catalog via one server instance, with Swagger UI enabled for documentation.

examples/shop · high confidence

Test coverage

Added comprehensive test suite for ERF server capabilities

Added new Common Test suites and fixtures to verify core server functionality, including OAS 3.0 parsing (with reference resolution), router generation, and request handling. The tests cover mounting multiple API specifications on a single port with isolated validation, streaming responses, middleware support, static file serving, Swagger UI integration, and graceful server lifecycle management (start, stop, and config reload).

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

Score

  • CAI 67 → 71 (+4.6)
  • Rubric changed (rubric-2026.09.12 → rubric-2026.09.18) — scores are not directly comparable.

Lenses

  • Code Health 93 → 93 (+0.1)
  • Architecture 100 → 100 (+0.0)
  • Maturity 55 → 63 (+7.9)
  • Readiness 61 → 63 (+1.7)
  • Security 92 → 96 (+4.0)

Resolved (6)

  • Coverage not measured — no coverage collector is wired up
  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)
  • Duplicated block (18 lines × 3) (src/erf_router.erl)
  • Hotspot: src/erf_router.erl (src/erf_router.erl)
  • erf_router.is_valid_request (cyclomatic 18) (src/erf_router.erl)

New (4)

  • Dependency hygiene PARTLY measured — rebar3 pinning read, dependency currency not (no rebar.lock-pinned Hex declaration to grade)
  • Floating source dependency: elli
  • Floating source dependency: ndto
  • Repeated repair: src/erf_router.erl (src/erf_router.erl)

Changes since last survey

  • 3 commits — 0 feature/other, 3 fixes

By area

  • src/erf_router.erl — 3 commits

Notable commits

  • fix: fix(router): Fixed double-encoding the malformed-body 400 response (#108)
  • fix: fix(router): accept json requests with parameters or without body (#107)
  • fix: fix(router): don't coerce absent optional query params before validation (#106)

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

Survey your own repository

nomasystems/erf 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 2 October 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 6890c26d6edab0d4d7576012be41e6062f9cdd9c — the exact code this score is about.
  • Scored under rubric-2026.09.18 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-e569280dd5e2.