Skip to content
CAI
Software that uses CAICheck a score

zotonic/cowmachine

63.3

Weak · 15 November 2026

7.7k

lines of production code

Erlang

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add Cowmachine example applications

Added a suite of example applications under the \examples/\ directory to demonstrate the Cowmachine web framework. These include \compress\_response\ (response compression), \controller\_functions\ (comprehensive controller callback usage), \cookie\ (cookie handling), \echo\_get\ and \echo\_post\ (query and body parameter echoing), \hello\_world\_chunked\ (streaming responses), \hello\_world\_rest\ (RESTful content negotiation), \hello\_world\_ssl\ (TLS support), \rest\_basic\_auth\ (HTTP Basic Authentication), and \upload\ (multipart file uploads). Each example provides a complete OTP application structure with controllers, middleware, and routing to illustrate specific Cowmachine features.

(repo-wide), examples · high confidence

Add EventSource example application

The examples/eventsource directory now contains a complete Erlang application that demonstrates Server-Sent Events (EventSource). The app runs on port 1234 and serves a static index page, assets, and a /eventsource endpoint that streams random emoji data to the client every 500ms. The implementation uses the Cowmachine framework for request handling and routing, with a dedicated controller and handler module to manage the persistent connection and event generation.

examples/eventsource · high confidence

Added documentation assets for EDoc generation

Added a new EDoc source file (doc/overview.edoc) providing project metadata and a standard CSS stylesheet (doc/style.css) to define the visual appearance of the generated documentation pages.

doc · high confidence

Added example applications for HTTP and WebSocket interactions

New example applications have been added to demonstrate the Cowmachine framework. The \hello\_world\ example provides a basic HTTP server that returns a static response. The \websocket\ and \websocket2\ examples demonstrate WebSocket connectivity, including route configuration for static assets and HTML, and a handler that echoes text messages and sends periodic status updates. These examples illustrate how to configure Cowboy listeners, define controllers, and manage WebSocket lifecycles within the framework.

_examples/hello\world/apps/main, examples/websocket/apps/main, examples/websocket2 · high confidence

Initial release of Cowmachine with rebar3 build and Hex publishing support

This entry introduces Cowmachine, a Webmachine-style request handler adapted for the Cowboy web server. The project is now built using rebar3 (minimum OTP 23) and published to Hex, with dependencies on cowboy (\~\> 2.14), cowlib (\~\> 2.16), ranch (\~\> 2.2), and zotonic\_stdlib (\~\> 1.6). It provides a simplified callback interface (single process/4) and includes build automation via Makefile, a Hex deployment script, and documentation generation targets.

(repo-wide) · high confidence

Initial release of Cowmachine, a Webmachine-style middleware for Cowboy

Introduces Cowmachine, a new Erlang application that implements the Webmachine request-decision pattern as middleware for the Cowboy HTTP server. This change adds the core request handling pipeline, including the decision core, controller abstraction, and response generation, enabling developers to build RESTful services using familiar Webmachine callbacks. The release also includes support for Accept-Language negotiation, proxy header parsing (Forwarded and X-Forwarded-For), and WebSocket handling.

src · high confidence

Behavioural changes

1 commit (0 fixes) modifying (repo-wide)

A change to existing behaviour in (repo-wide) — 1 commit, 34 files: “Examples (\#38)” (refs \#38).

(repo-wide) · medium confidence · unverified

Test coverage

Added comprehensive test suite for Cowmachine

Added a new suite of EUnit and PropEr tests covering core library functions and end-to-end HTTP behavior. The tests verify language and media-type negotiation logic, proxy header parsing (Forwarded and X-Forwarded-\*), HTTP security constraints (invalid headers and dangerous Location values), query string parsing with limits, and the full HTTP decision flow including status codes for service availability, authorization, forbidden access, and method restrictions.

test · high confidence

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

How this codebase got here

Score

  • CAI 62 → 63 (+0.8)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 71 → 67 (-4.2)
  • Architecture 100 → 100 (+0.0)
  • Maturity 65 → 65 (+0.0)
  • Readiness 48 → 51 (+3.2)
  • Security 92 → 91 (-0.8)
  • Event Sourcing 100 → 100 (+0.0)

Resolved (5)

  • Leaked secret: private-key (examples/hello_world_ssl/priv/ssl/server.key)
  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Off-boarding risk: anonymized user #1
  • Rotate the exposed credentials — git history can't be un-committed
  • Secret: private-key (examples/hello_world_ssl/priv/ssl/server.key)

New (18)

  • Edited copies of one member (3 members, 58+ corresponding lines) (examples/eventsource/src/main.erl)
  • Edited copies of one member (3 members, 7+ corresponding lines) (examples/markdown_middleware/src/erlmarkdown.erl)
  • Edited copies of one member (4 members, 4+ corresponding lines) (examples/compress_response/apps/main/src/controller.erl)
  • Edited copies of one member (7 members, 4+ corresponding lines) (examples/cookie/src/controller.erl)
  • Edited copy of a member (11 corresponding lines) (src/cowmachine_decision_core.erl)
  • Edited copy of a member (13 corresponding lines) (src/cowmachine_response.erl)
  • Edited copy of a member (18 corresponding lines) (examples/websocket/apps/main/src/main_app.erl)
  • Edited copy of a member (19 corresponding lines) (examples/file_server/src/controller.erl)
  • Edited copy of a member (24 corresponding lines) (examples/markdown_middleware/src/erlmarkdown.erl)
  • Edited copy of a member (39 corresponding lines) (src/cowmachine_proxy.erl)
  • Edited copy of a member (53 corresponding lines) (examples/file_server/src/main.erl)
  • Edited copy of a member (6 corresponding lines) (examples/eventsource/src/controller.erl)
  • Edited copy of a member (6 corresponding lines) (examples/markdown_middleware/src/erlmarkdown.erl)
  • Edited copy of a member (7 corresponding lines) (examples/markdown_middleware/src/controller.erl)
  • Edited copy of a member (8 corresponding lines) (examples/hello_world_chunked/apps/main/src/controller.erl)
  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Medium CVE: EEF-[CVE redacted] (rebar.lock)
  • Off-boarding risk: anonymized user #1

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

Survey your own repository

zotonic/cowmachine 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 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit ab6ff2753e48f13fe73ca73cf3d03f7b4e0f3fb0 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.