Skip to content
CAI
Software that uses CAICheck a score

straw-hat-team/beam-monorepo

61.1

Weak · 21 September 2026

13k

lines of production code

Elixir

primary language

4

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

This system is a monorepo of Elixir libraries designed to provide foundational infrastructure for building Domain-Driven Design and Event Sourcing applications on the BEAM platform. It offers a cohesive set of tools including Trogon.Commanded for CQRS and consistency policies, Trogon.Ecto for advanced database types and validation, and Trogon.Proto for schema-driven code generation from Protocol Buffers. Additionally, it supplies supporting utilities for type-safe object identification, structured error handling, and custom linting checks to standardize development practices.

How it got here

2022–2025 — rebranding to Trogon and DDD expansion

21 changes.

The project was rebranded from OnePiece to Trogon, restructuring the monorepo and renaming core applications like Commanded and Result. This period focused on expanding Domain-Driven Design capabilities by introducing Trogon.Commanded with new DDD primitives and consistency policies, while also launching Trogon.Error for structured error handling and Trogon.TypeProvider for efficient type mapping.

2026 — Core library and tooling expansion

19 changes.

This period focused on releasing foundational Elixir libraries including Trogon.Proto for schema-driven code generation, Trogon.ObjectId for type-safe identifiers, and Trogon.Ecto for custom database types. The work also introduced Trogon.Credo for shared linting checks and enhanced the EventStoreDashboard with a new inspector page, supported by extensive test coverage and validation logic across all new packages.

Features

Add BEAM mascot assets and documentation

The repository now includes a dedicated \mascots\ directory containing the 'Joe' mascot, including its Adobe Illustrator source file, a preview image, and associated README files. This addition provides users with official branding assets and instructions for contributing variations under the Creative Commons Attribution 4.0 License.

mascots · high confidence

Add structured error metadata with visibility controls

Introduces \Trogon.Error.Metadata\ and \Trogon.Error.MetadataValue\ modules to manage error context with granular visibility levels (\:INTERNAL\, \:PRIVATE\, \:PUBLIC\). This allows error metadata to be structured and filtered based on who can see the information, supporting both simple string values and explicit visibility tuples, as well as integration with proto field specs for value policies.

_apps/trogon\error/lib/trogon/error · high confidence

Initial release of Trogon.Ecto package

The new Trogon.Ecto library is now available, providing extensions for Ecto including value objects, custom types, and migration helpers. This release establishes the foundational package structure with MIT licensing and standard Elixir project configuration.

_apps/trogon\ecto · high confidence

Initial release of Trogon.Proto for schema-driven Elixir code generation

The new \trogon\proto\ application provides an Elixir runtime and integration layer for the \trogon-proto\ Buf Schema Registry, shipping pre-compiled protobuf modules and compile-time macros for schema-driven code generation. It introduces \Trogon.Proto.Env\ to read proto field annotations and generate typed, secret-safe environment variable loaders with automatic type conversion, and \Trogon.Proto.Uuid.V1.UuidTemplate\ to generate deterministic UUIDv5 identity functions from versioned templates. The package also includes shared proto message contracts for Relay cursor pagination, CQRS read-your-writes consistency, structured error templates, typed UUIDs, stream identity, and object ID prefixes, configured via \buf.gen.yaml\ to generate Elixir code into \lib/\\generated\\_\.

_apps/trogon\proto · high confidence

Introduce EventStore inspector page

EventStoreDashboard now provides a dedicated page within Phoenix LiveDashboard to browse streams, events, subscriptions, and snapshots on a running node. This allows users to search and paginate large streams, follow correlation and causation chains across aggregates, and inspect individual events, streams, or snapshots directly from the dashboard without needing external database tools or read replicas.

_apps/eventstore\_dashboard, apps/eventstore\dashboard/lib · high confidence

Introduce Trogon TypeProvider for type-to-struct mapping

The new Trogon TypeProvider library enables mapping string type names to Elixir struct modules, supporting both explicit registration via \register\_type/2\ and automatic registration of Protobuf messages via \register\_protobuf\_message/1\. It allows importing type mappings between providers and includes a Mix task (\mix trogon.type\_provider.list\) to inspect registered mappings, ensuring that only valid struct modules are registered and providing clear error handling for unregistered types.

_apps/trogon\typeprovider/lib · high confidence

Introduce Trogon.Commanded library with DDD primitives and consistency policies

This change introduces the new \Trogon.Commanded\ library, providing a suite of macros and behaviors to extend the Commanded package for Domain-Driven Design, Event Sourcing, and CQRS. It adds \Aggregate\, \Command\, \Event\, and \Entity\ modules that simplify defining domain structures with automatic identifier and identity prefix handling. A new \CommandRouter\ includes a \register\_transaction\_script\ macro to streamline command-to-handler wiring with a default stateless lifespan. The library also introduces \ConsistencyPolicy\ with \MinVersionPolicy\ and \ExactVersionPolicy\ to manage read-after-write guarantees in eventually consistent systems, alongside \Enum\ support for proto-driven enums and serializers for JSONB and Protobuf event storage.

_apps/trogon\commanded/lib · high confidence

Introduce Trogon.Credo package for sharing custom Credo checks

The \trogon\_credo\ application is released as version 0.1.0, providing a shared library of custom Credo checks that teams can depend on instead of copying code between repositories. This package introduces several new checks: \ForbiddenUse\ forbids bringing specific modules in with \use\; \MechanicalModuleName\ discourages naming modules after their execution mechanism (e.g., appending \Worker\ or \Job\); \AnonymousFunction\ encourages refactoring anonymous functions into named functions; \ModuleLocation\ enforces that modules using specific behaviors live in expected directory and namespace paths; \PreferredModule\ flags discouraged modules in favor of preferred replacements (defaulting to OpenTelemetry process propagator replacements); \ForbiddenImport\ prevents importing specific modules while allowing full-name calls; and \UnpinnedDependency\ warns against dependencies in \mix.exs\ that are not pinned to exact versions or full commit SHAs.

_apps/trogon\credo · high confidence

Introduce Trogon.Ecto package with custom Ecto types and validation helpers

This release adds the \trogon\_ecto\ library, providing a suite of new Ecto parameterized types including \DurationType\ (persisting as ISO 8601 strings, maps, or native PostgreSQL intervals), \BoundedString\ (enforcing character limits with optional truncation), \Enum\ (generating typed enum structs), and Kubernetes-style map types (\StringMap\, \LabelMap\, \AnnotationMap\) for validating key-value pairs. It also introduces \Trogon.Ecto.Changeset\ helpers for validating unset fields and flattening nested changeset errors into \FieldViolation\ structs for API reporting, along with \Trogon.Ecto.Migration\ helpers for standardizing column definitions and \Trogon.Ecto.Repo\ for simplified transaction result handling.

_apps/trogon\ecto/lib · high confidence

Introduce Trogon.TypeProvider for compile-time string-to-struct mapping

The new Trogon.TypeProvider package enables zero-runtime-overhead mapping between string identifiers and Elixir struct modules by generating efficient pattern-matching functions at compile time. It supports registering individual types, applying prefixes, and importing type definitions from other providers, which simplifies serialization and deserialization in event-driven architectures. The package also includes support for registering Protobuf messages, allowing seamless integration with Protocol Buffers alongside standard Elixir structs.

_apps/trogon\typeprovider · high confidence

Introduce structured error handling with Trogon.Error

Added the \Trogon.Error\ module, implementing a standardized error type system for Elixir applications. This change introduces a consistent way to define errors using domain and reason identifiers, Google RPC-compatible status codes, and visibility levels (internal, private, public). It supports static error messages defined at compile time and dynamic instance-specific metadata, ensuring predictable error contracts for API consumers and consistent logging.

_apps/trogon\error/lib/trogon · high confidence

Introduce type-safe ObjectId and UnionObjectId types with Ecto and Protocol support

This change introduces the \Trogon.ObjectId\ macro for defining type-safe, domain-specific identifiers that combine a human-readable prefix with a value, and \Trogon.UnionObjectId\ for discriminated unions of multiple ObjectId types. These types implement \Ecto.Type\ for direct use in schemas (including support for autogenerated primary keys via \autogenerate\), \Phoenix.Param\, \Phoenix.HTML.Safe\, and JSON encoders (\Jason.Encoder\ and \JSON.Encoder\) for serialization, and provide validation options (UUID, integer, or custom functions). The \UnionObjectId\ specifically allows combining distinct ObjectId types into a single field while preserving type safety and handling storage format prefixes for correct parsing.

_apps/trogon\_object\id/lib · high confidence

Introduction of the Trogon.Error structured error library

The \apps/trogon\_error\ directory has been added to the project, introducing a new structured error library for Elixir. This library allows applications to define errors as typed values with domain-scoped identity, metadata, and visibility controls, supporting Google RPC-compatible status codes and localization. The addition includes the core application structure, configuration files (\.formatter.exs\, \.gitignore\), licensing, and documentation (README, CHANGELOG), establishing the foundation for consistent, machine-parseable error handling across the system.

_apps/trogon\error · high confidence

New proto-based macros for environment loading, error templates, and deterministic UUIDs

This change introduces three new compile-time macros in the \trogon\_proto\ library that generate Elixir code from Protocol Buffer definitions. The \Trogon.Proto.Env\ macro generates typed structs and \from\_env/0\ functions to load and validate environment variables, supporting steps like splitting, trimming, and decoding, while automatically masking secret fields in logs. The \Trogon.Proto.Error\ module provides infrastructure to extract error template metadata (domain, reason, code, visibility) from proto message extensions, enabling consistent error reporting. Additionally, the \Trogon.Proto.Uuid.V1.UuidTemplate\ macro generates deterministic UUIDv5 functions based on proto-defined templates, allowing for fast, pre-computed identity generation from structured data.

_apps/trogon\proto/lib/trogon/proto · high confidence

Release of Trogon.ObjectId 0.3.0 with Phoenix and JSON protocol support

The Trogon.ObjectId package has been updated to version 0.3.0, introducing support for Phoenix.Param, Phoenix.HTML.Safe, and JSON.Encoder protocols. This allows ObjectId structs to be seamlessly converted to strings in Phoenix views and encoded/decoded in JSON payloads, in addition to the existing Ecto type callbacks and string conversion capabilities. The package provides type-safe, prefixed object IDs (e.g., "user\_abc-123") as distinct structs to prevent runtime confusion between different ID types.

_apps/trogon\_object\id · high confidence

Removals

Removal of legacy DDD macro helpers (Aggregate, Command, Entity, Event, ValueObject)

The library has removed the \OnePiece.Commanded.Aggregate\, \Command\, \Entity\, \Event\, and \ValueObject\ modules, which previously provided \use\ macros to define Domain-Driven Design structures by wrapping Ecto schemas. This change eliminates the convenience macros that automatically set up primary keys, derived encoders, and helper functions like \new/1\ for commands and events. Users relying on these specific macros for defining aggregates, commands, entities, events, or value objects will need to migrate to the library's current approach, likely involving direct Ecto schema usage or alternative provided behaviors.

_apps/one\_piece\commanded/lib · high confidence

Removal of legacy documentation and tooling files

The \CHANGELOG.md\, \README.md\, \.tool-versions\, and \priv/plts/.gitkeep\ files have been deleted from the \apps/one\_piece\_commanded\ application. This cleanup removes historical version records, user-facing documentation, and local tooling configuration files that are no longer part of the active codebase structure.

_apps/one\_piece\commanded · high confidence

Removal of one\_piece\_result application

The one\_piece\_result application has been removed from the codebase. This change deletes the application's configuration file (.tool-versions), its documentation (README.md), and its placeholder file (priv/plts/.gitkeep), effectively eliminating the component that previously handled t:OnePiece.Result.t/0 responses.

_apps/one\_piece\result · high confidence

Behavioural changes

App renamed to Trogon.Commanded with new formatter and documentation

The application has been renamed from \one\_piece\_commanded\ to \Trogon.Commanded\, reflected in the directory structure, \.gitignore\, and \LICENSE\ files. A new \.formatter.exs\ file has been added to configure Elixir code formatting, including specific macro registrations like \register\_type\ and \polymorphic\_embeds\_one\. Additionally, a \CHANGELOG.md\ and \README.md\ have been introduced to document the library's history and its role as an opinionated extension layer for the Commanded framework, supporting Domain-Driven Design and Event Sourcing in Elixir.

_apps/trogon\commanded · high confidence

Configured Trogon.Proto.Env for test environment

The configuration file now explicitly sets up the Trogon.Proto.Env macro to use a mock system adapter (Trogon.Proto.TestSupport.SystemAdapter.Mock) when running in the test environment, replacing previous sample logger configuration comments.

config · high confidence

Environment loading now reports all missing or invalid variables in a single error

The Trogon Proto environment loader has been updated to aggregate all configuration failures into a single error report. Previously, users might have encountered errors one variable at a time; now, when environment variables are missing or invalid, the system raises a \LoadError\ that lists every problematic variable and its specific reason (missing or invalid) at once. This allows users to identify and fix all configuration issues in a single pass rather than iteratively.

_apps/trogon\proto/lib/trogon/proto/env · high confidence

Regenerated protobuf modules for v1alpha1 domain contracts

The generated Elixir protobuf modules in apps/trogon\proto/lib/\\generated\\_ have been regenerated to reflect the v1alpha1 API definitions. This update introduces new message and enum types across several domain areas, including Actor identification, Consistency guarantees (MinVersion/ExactVersion), generic Content blobs, and Environment variable handling (including Base64 decoding, splitting, trimming, and visibility controls). It also adds shared error contracts with canonical gRPC error codes and visibility options, Hierarchy NodeId definitions, NATS Micro service options, Cursor-based Pagination and PageInfo structures for Relay-style queries, and UUID generation namespaces and options. These generated modules provide the underlying data structures and descriptors for the platform's domain APIs.

_apps/trogon\proto/lib/\\generated\\_ · high confidence_

Renamed from OnePiece.Result to Trogon.Result with enhanced type specifications

The result handling library has been renamed from OnePiece.Result to Trogon.Result, requiring users to update module aliases and function calls (e.g., from OnePiece.Result.ok/1 to Trogon.Result.ok/1). Additionally, the Result module now uses enhanced, specific type specifications for its ok and err types, improving type safety and documentation clarity for composed result pipelines.

_apps/trogon\result · high confidence

Test coverage

Added test coverage for Trogon.Commanded core components; Added test coverage for the Trogon TypeProvider; Added test fixtures for Trogon Proto validation and environment loading; Added test fixtures for proto-driven identity and stream prefixes; Added test suite and support infrastructure for Trogon.Ecto; Added test suite for Trogon Error handling and metadata; Added test suite for Trogon.ObjectId and UnionObjectId; Added test support files for Protobuf message definitions; Added test support fixtures for Trogon.Proto.Env; Added test support for mocking system environment variables; Added test support modules for CommandRouter example; Added test support modules for Commanded integration testing; Added tests for CommandHandlerCase test support; Added tests for UUID template generation and validation; Added tests for environment variable loading and error template extraction.

Dependencies

Umbrella restructure and dependency updates

The project has been rebranded from OnePiece to BeamMonorepo, renaming the umbrella root and several internal packages (e.g., one\_piece\_commanded to trogon\_typeprovider, one\_piece\_result to trogon\_result). This change also introduces new packages (eventstore\_dashboard, trogon\_credo, trogon\_ecto, trogon\_error, trogon\_object\_id, trogon\_proto) and updates core dependencies, including Ecto to \~\> 3.12/3.14, Commanded to \~\> 1.2/1.4, Phoenix to \~\> 1.7, and various dev tools like ex\_doc, credo, and dialyxir to their latest versions.

(dependencies) · high confidence

Housekeeping

Initial project scaffolding and documentation

The repository has been initialized with standard BEAM/Elixir configuration files, including \.credo.exs\ for code linting, \.dialyzer\_ignore.exs\ for type checking exclusions, \.formatter.exs\ with a 120-character line length, and \.tool-versions\ specifying Elixir 1.20 and Erlang 28.3. A MIT \LICENSE\ file has been added, and the \README.md\ has been updated to describe the project as a monorepo for event-sourced libraries (such as \trogon\_error\, \trogon\_commanded\, and \trogon\_object\_id\) rather than a placeholder.

(repo-wide) · 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

This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.

Score

  • CAI 67 → 61 (-5.7)
  • Rubric changed (rubric-2026.08.19 → rubric-2026.09.15) — scores are not directly comparable.

Lenses

  • Code Health 98 → 99 (+1.4)
  • Architecture 98 → 100 (+1.9)
  • Maturity 58 → 59 (+0.4)
  • Readiness 63 → 44 (-18.7)
  • Security 76 → 82 (+6.2)
  • Domain Modelling 100 (new)

Resolved (17)

  • Change coupling: helpers.ex ↔ mix.exs (apps/trogon_commanded/lib/trogon/commanded/helpers.ex)
  • Coverage not included — suite not readable by the collector
  • Dependency hygiene not measured — no supported dependency manifest was read
  • Duplicated block (6 lines × 2) (apps/trogon_object_id/lib/trogon/object_id.ex)
  • Duplicated block (7 lines × 2) (apps/trogon_object_id/lib/trogon/object_id.ex)
  • Duplicated block (9 lines × 2) (apps/eventstore_dashboard/lib/event_store_dashboard/components/streams_table.ex)
  • FileTooLong: trogon/error.ex (apps/trogon_error/lib/trogon/error.ex)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • High CVE: [GHSA redacted] (mix.lock)
  • LLM evaluation failed
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • Medium CVE: EEF-[CVE redacted] (mix.lock)
  • No exposed public API
  • Off-boarding risk: anonymized user #1
  • Test reliability not included
  • TooManyMethods: Env (apps/trogon_proto/lib/trogon/proto/env.ex)

New (16)

  • Documentation: no installation or build instructions (apps/trogon_credo/README.md)
  • Documentation: no installation or build instructions (apps/trogon_ecto/README.md)
  • Duplicated block (5 lines × 2) (apps/trogon_credo/lib/trogon/credo/check/warning/forbidden_import.ex)
  • Duplicated block (5 lines × 2) (apps/trogon_ecto/lib/trogon/ecto/enum.ex)
  • Duplicated block (6 lines × 2) (apps/trogon_credo/lib/trogon/credo/check/warning/forbidden_import.ex)
  • Duplicated block (7 lines × 2) (apps/trogon_object_id/lib/trogon/object_id.ex)
  • Duplicated block (7 lines × 2) (apps/trogon_object_id/lib/trogon/object_id.ex)
  • Duplicated block (8 lines × 2) (apps/trogon_credo/lib/trogon/credo/check/warning/forbidden_import.ex)
  • Duplicated block (9 lines × 2) (apps/trogon_commanded/lib/trogon/commanded/type_provider.ex)
  • Duplicated block (9–17 lines × 2) (apps/eventstore_dashboard/lib/event_store_dashboard/components/streams_table.ex)
  • FileTooLong: proto/env.ex (apps/trogon_proto/lib/trogon/proto/env.ex)
  • High: security finding (details withheld)
  • Off-boarding risk: anonymized user #1
  • TodoComment (apps/trogon_commanded/lib/trogon/commanded/type_provider.ex)
  • TodoComment (apps/trogon_error/lib/trogon/error.ex)
  • TodoComment (apps/trogon_typeprovider/lib/trogon/type_provider.ex)

Changes since last survey

  • 44 commits — 38 feature/other, 6 fixes

By area

  • apps/trogon_ecto — 15 commits
  • apps/trogon_object_id — 7 commits
  • .github/workflows — 6 commits
  • apps/trogon_credo — 5 commits
  • apps/trogon_commanded — 4 commits
  • apps/trogon_proto — 3 commits
  • (root) — 2 commits
  • .github/release-please-config.json — 1 commit
  • apps/trogon_error — 1 commit

Notable commits

  • fix: fix(ci): align release-please signoff with renamed bot account (#424)
  • fix: fix(ci): unblock Hex publishes broken by umbrella dep polarity flip (#425)
  • fix: fix(trogon_ecto): reject unknown duration type options (#443)
  • fix: fix(trogon_object_id): align equal?/2 with the Ecto.Type nil contract (#429)
  • fix: fix(trogon_object_id,trogon_commanded,trogon_error): default mix deps to Hex requirements outside the umbrella (#420)
  • fix: fix(trogon_proto): reject env fields the loader cannot populate (#454)
  • change: chore(ci): survive 1Password vault and item renames (#434)
  • change: chore(deps): bump 1password/load-secrets-action from 4.0.1 to 5.0.0 (#418)
  • change: chore(deps): bump 1password/load-secrets-action from 5.0.0 to 5.0.1 (#433)
  • change: chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#416)
  • change: chore(deps): bump straw-hat-team/github-actions-workflows/.github/workflows/elixir-quality-assurance.yml from 1.9.0 to 1.9.1 (#428)
  • change: chore(deps): update deps flagged by hex.audit security advisories (#419)
  • change: chore(master): release trogon_commanded 1.0.2 (#422)
  • change: chore(master): release trogon_commanded 1.1.0 (#465)
  • change: chore(master): release trogon_credo 0.1.0 (#459)
  • change: chore(master): release trogon_ecto 0.2.0 (#432)
  • change: chore(master): release trogon_ecto 0.3.0 (#438)
  • change: chore(master): release trogon_ecto 0.4.0 (#440)
  • change: chore(master): release trogon_ecto 0.5.0 (#442)
  • change: chore(master): release trogon_error 0.8.2 (#421)
  • …and 24 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

straw-hat-team/beam-monorepo 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 21 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 bb35fa3f5077636a41aa026da1ad515861d136d3 — 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-fa71c66cabd8.