Skip to content
CAI
Software that uses CAICheck a score

shiguredo/swidden

67.2

Adequate · 17 September 2026

685

lines of production code

Erlang

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

Swidden is an Erlang-based HTTP API framework built on Cowboy that routes POST requests to handler modules based on a service-version-operation pattern. It enforces input validation using JSON Schema and supports custom middleware and interceptors. The system includes a test client and comprehensive tooling for development and code quality.

Features

Added JSON schemas and dispatch configuration for the spam API

The application now includes a dispatch configuration file and a set of JSON Schema definitions for the 'spam' and 'spam\_admin' API areas. These schemas define the expected input structures for various endpoints, such as user creation, updates, and metrics retrieval, using JSON Schema draft-06. This change establishes the validation rules and routing mappings for these specific API handlers.

priv · high confidence

Initial release of the Swidden HTTP API framework

Introduces the Swidden application (version 2026.2.1), an Erlang-based HTTP API framework built on Cowboy. It provides a dynamic dispatch mechanism that routes POST requests to handler modules based on a service-version-operation pattern defined in a dispatch configuration file. The framework includes built-in JSON schema validation using Jesse, request body size limiting (8MB), and support for custom interceptors and middleware. It also exposes a test client module for making HTTP requests to the running API.

src · high confidence

Initial release with Cowboy 2.19.0, Erlang/OTP 29.0 requirement, and new pre-commit tooling

This entry establishes the baseline for the project, introducing a header-based HTTP API framework. It requires Erlang/OTP 29.0 or later and upgrades the HTTP stack to Cowboy 2.19.0 and Gun 2.6.0, while switching the JSON library to the shiguredo\_jsone fork (2025.1.0). The build and development workflow is updated to use rebar3 with a minimum OTP version of 29.0, and replaces the previous linting/formatting tools (rebar3\_efmt, rebar3\_lint, elvis) with a new pre-commit setup using \prek\ and the \shiguredo/erlang-pre-commit\ repository for \efmt\ and \elint\. Documentation and configuration files such as AGENTS.md, CLAUDE.md, and prek.toml are added to define coding standards and repository-specific settings.

(repo-wide) · high confidence

Behavioural changes

Migrate JSON Schema validation from shiguredo\_jesse to jsone\_schema

The JSON Schema validation implementation has been replaced with the \jsone\_schema\ module from the jsone library, removing the dependency on \shiguredo\_jesse\. This change updates the internal API handler to use \jsone:decode/1\ and \jsone\_schema:validate\_key/2\ directly, which corrects previous behavior where malformed JSON bodies were incorrectly reported as \InvalidJSON\ instead of \MalformedJSON\, and eliminates the leakage of server absolute paths in error responses by removing the \$id\ injection that occurred with the previous library.

issues · high confidence

Test coverage

Added test suite for Swidden API handlers and middleware

Added comprehensive EUnit tests for the Swidden HTTP API, including test helpers and mock handlers (\sample\_interceptor\, \sample\_middleware\, \spam\_user\_handler\, etc.). The tests verify core API behaviors such as successful CRUD operations, error handling for invalid JSON or missing bodies, redirect logic, interceptor execution, and middleware integration. It also includes unit tests for the \pascal2snake\ utility function and verifies service dispatching across different API versions.

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 67.

Lenses

  • Code Health 95
  • Architecture 69
  • Maturity 64
  • Readiness 65
  • Security 75

Changes since last survey

  • 300 commits — 299 feature/other, 1 fixes

By area

  • (root) — 170 commits
  • (repo) — 62 commits
  • src/swidden.app.src — 21 commits
  • .github/workflows — 8 commits
  • src/swidden.erl — 8 commits
  • priv/swidden — 5 commits
  • src/swidden_api_handler.erl — 4 commits
  • issues/0001-change-replace-jesse-with-jsone.md — 3 commits
  • doc/README.md — 2 commits
  • examples/spam — 2 commits
  • src/swidden_json_schema.erl — 2 commits
  • src/swidden_middleware.erl — 2 commits
  • src/swidden_misc.erl — 2 commits
  • .circleci/config.yml — 1 commit
  • issues/0000-template.md — 1 commit
  • src/swidden.hrl — 1 commit
  • src/swidden_app.erl — 1 commit
  • src/swidden_interceptor.erl — 1 commit
  • test/sample_interceptor.erl — 1 commit
  • test/swidden_api_handler_tests.erl — 1 commit

Notable commits

  • fix: Revert "色々アップデートする"
  • change: 0001 jsone_schema を直接使う方針に更新する
  • change: 0001 open JSON Schema 検証を shiguredo_jesse から jsone の jesse 互換 API へ移行する
  • change: 0001 動作確認結果と残タスクを更新する
  • change: 2016-2020 にする
  • change: 2020.2 に上げる
  • change: 2020.3 に上げる
  • change: 2020.3.1 に修正
  • change: 2020.3.1 を追加
  • change: 2020.4 に上げる
  • change: 2020.5.1 に上げる
  • change: 2021.1 に上げる
  • change: 2021.2 に上げる
  • change: 2021.4
  • change: 2021.5
  • change: 2021.9.0 に上げる
  • change: 2025.1.0
  • change: 2026.1.0
  • change: 27.2.1
  • change: 28.1 / 3.6.0
  • …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

shiguredo/swidden 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 5d080180dfbcf8a12e8e333dec498a4dbb9b139e — 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.