wmaciejak/rails_rom_graphql_clean_architecture_boilerplate
60.8
Adequate · 20 September 2026
718
lines of production code
Ruby
primary language
4
measurements over time
What this system is
This system is a Ruby on Rails boilerplate application designed to demonstrate Clean Architecture principles using ROM 4 and GraphQL. It provides a structured data access layer organized by feature concepts, utilizing dependency injection and batch loading to optimize database queries. The codebase serves as a reference implementation for setting up a performant, modular backend with PostgreSQL.
Features
Introduces a centralized dependency injection container
The application now includes a new \lib/container.rb\ that wraps the \dry-container\ library to manage service instantiation. This container provides a global singleton instance for accessing registered services via a simple bracket notation (e.g., \Container\[name\]\) and includes an automatic registration mechanism that scans \./app/concepts/\ for repository classes, registering them as singletons within the container.
lib · high confidence
Behavioural changes
Adopts dry-container and restructures ROM for concept-based modularity
The application now uses dry-container for dependency injection, with a new initializer that auto-registers repositories under a 'repositories' namespace. Additionally, the ROM configuration has been updated to support a modular 'concepts' directory structure, automatically loading relations, mappers, and commands from nested paths within app/concepts, replacing the previous flat loading strategy.
config · high confidence
GraphQL resolvers now use dependency injection and batched loading for related entities
The GraphQL layer has been refactored to replace direct repository instantiation with a centralized dependency injection container, ensuring that all query resolvers (for Users, Posts, and Comments) fetch data through registered repository instances. Additionally, the schema definitions for Comment, Post, and User types have been updated to resolve many-to-one and one-to-many relationships (such as a comment's author or a post's comments) using new, centralized resolver classes that leverage batch loading. This change improves performance by reducing database queries for related data and standardizes how data access is wired within the application.
app/graphql · high confidence
Removal of legacy ROM relation definitions
The standalone ROM relation classes for Users, Posts, and Comments have been removed from the application. This change eliminates the explicit schema inference definitions that previously mapped these entities to the SQL database, indicating a shift in how data access is structured or managed within the system.
app/relations · high confidence
Restructured data access layer into feature-scoped concepts
The application's data access layer has been reorganized from a flat repository structure into a modular 'concepts' architecture, grouping logic by feature (Comment, Post, User). This change introduces ROM-based Relation definitions for schema inference and dedicated Resolver classes to handle batch loading of associated records (such as comments for posts or posts for users). Existing repositories have been migrated into this new structure, moving from global classes like \CommentRepo\ to namespaced \Comment::Repository\ classes, thereby improving code organization and separation of concerns for each domain feature.
app/concepts · high confidence
Dependencies
Upgrade Ruby dependencies and specify runtime version
The application's dependency set has been updated, most notably upgrading the ROM ecosystem from release candidates to stable releases (ROM 4.0.1, rom-rails 1.0.0, rom-sql 2.1.0) and adding the dry-container gem (0.6.0). Other gems such as Sequel, RSpec, Rubocop, and Database Cleaner have also been bumped to newer patch or minor versions. Additionally, the Gemfile now explicitly specifies the Ruby runtime version as 2.4.2.
(dependencies) · high confidence
Housekeeping
Updated project documentation and added Procfile for deployment
The README has been significantly expanded to describe the application as a Rails 5, ROM 4, and GraphQL boilerplate using Clean Architecture, including specific requirements (Ruby 2.4.2, PostgreSQL 10), a list of implemented features like N+1 query mitigation via BatchLoader, and known issues. Additionally, a Procfile has been added to define the web process command (\bundle exec puma -C config/puma.rb\), enabling standard deployment on platforms like Heroku.
(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
Score
- CAI 60 → 61 (+0.6)
- Rubric changed (rubric-2026.08.17 → rubric-2026.09.15) — scores are not directly comparable.
Lenses
- Code Health 100 → 100 (+0.0)
- Architecture 69 → 68 (-1.0)
- Maturity 79 → 76 (-3.2)
- Readiness 40 → 46 (+6.2)
- Security 95 → 75 (-20.0)
Resolved (11)
- Coverage not included — suite not readable by the collector
- Dependency hygiene not measured — no supported dependency manifest was read
- No exposed public API
- Rotate the exposed credentials — git history can't be un-committed
- Secret: generic-api-key (config/secrets.yml)
- Test reliability not included
- The README lists requirements (ruby 2.4.2, PostgreSQL 10) but does not state which versions of Rails/ROM/GraphQL are supported or what environment variables the app needs to run. (README.md)
- complexity unreadable for .rb — churn × complexity hotspots could not be measured
- early-stage repository — too little history to judge knowledge freshness
- git history depth insufficient
- single-maintainer — knowledge-concentration (bus factor) risk
New (22)
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Critical CVE: [GHSA redacted] (Gemfile.lock)
- Critical vulnerability: [GHSA redacted] (Gemfile.lock)
- Documentation: no installation or build instructions (README.md)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- High CVE: [GHSA redacted] (Gemfile.lock)
- Low CVE: [GHSA redacted] (Gemfile.lock)
- Medium CVE: [GHSA redacted] (Gemfile.lock)
- …and 2 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
wmaciejak/rails_rom_graphql_clean_architecture_boilerplate 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 20 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 9d286c41ad041b7d6147459b7ca7c42e5b5026f0 — 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-28e75b8e3254.