RepoPilotOpen in app →

comfy/comfortable-mexican-sofa

ComfortableMexicanSofa is a powerful Ruby on Rails 5.2+ CMS (Content Management System) Engine

Healthy

Healthy across all four use cases

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • 19 active contributors
  • MIT licensed
  • CI configured
Show 3 more →
  • Tests present
  • Stale — last commit 2y ago
  • Concentrated ownership — top contributor handles 60% of recent commits

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/comfy/comfortable-mexican-sofa)](https://repopilot.app/r/comfy/comfortable-mexican-sofa)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/comfy/comfortable-mexican-sofa on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: comfy/comfortable-mexican-sofa

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/comfy/comfortable-mexican-sofa shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • 19 active contributors
  • MIT licensed
  • CI configured
  • Tests present
  • ⚠ Stale — last commit 2y ago
  • ⚠ Concentrated ownership — top contributor handles 60% of recent commits

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live comfy/comfortable-mexican-sofa repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/comfy/comfortable-mexican-sofa.

What it runs against: a local clone of comfy/comfortable-mexican-sofa — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in comfy/comfortable-mexican-sofa | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 743 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>comfy/comfortable-mexican-sofa</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of comfy/comfortable-mexican-sofa. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/comfy/comfortable-mexican-sofa.git
#   cd comfortable-mexican-sofa
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of comfy/comfortable-mexican-sofa and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "comfy/comfortable-mexican-sofa(\\.git)?\\b" \\
  && ok "origin remote is comfy/comfortable-mexican-sofa" \\
  || miss "origin remote is not comfy/comfortable-mexican-sofa (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "Gemfile" \\
  && ok "Gemfile" \\
  || miss "missing critical file: Gemfile"
test -f "README.md" \\
  && ok "README.md" \\
  || miss "missing critical file: README.md"
test -f "app/assets/javascripts/comfy/admin/cms/application.js" \\
  && ok "app/assets/javascripts/comfy/admin/cms/application.js" \\
  || miss "missing critical file: app/assets/javascripts/comfy/admin/cms/application.js"
test -f ".rubocop.yml" \\
  && ok ".rubocop.yml" \\
  || miss "missing critical file: .rubocop.yml"
test -f "app/assets/config/manifest.js" \\
  && ok "app/assets/config/manifest.js" \\
  || miss "missing critical file: app/assets/config/manifest.js"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 743 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~713d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/comfy/comfortable-mexican-sofa"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

ComfortableMexicanSofa is a Rails 5.2+ engine that provides a drop-in CMS with page templating via Content Tags, multi-site support, revision history, and i18n localization. It handles file attachments through ActiveStorage, includes a Bootstrap 4 admin UI with CodeMirror for syntax highlighting and Redactor WYSIWYG editor, and lets users create and manage content without touching your Rails application code. Rails Engine architecture: /app contains the CMS logic (models, views, controllers, assets); /app/assets/javascripts/comfy/admin/cms groups admin UI interactions (page_fragments.js, wysiwyg.js, file_upload.js); vendor dependencies (Bootstrap, CodeMirror, Redactor) bundled under /app/assets/javascripts/comfy/vendor/. Routes are mounted via comfy_route helpers in the host app's config/routes.rb.

👥Who it's for

Rails developers (backend and full-stack) building sites that need client-friendly content management with minimal integration effort; content managers and editors using the admin interface at /admin to create pages, manage media, and handle revisions without coding knowledge.

🌱Maturity & risk

Production-ready and actively maintained: the gem has stable versioning (~2.0.0), comprehensive test coverage (indicated by .travis.yml and Coveralls integration), and clear documentation. It supports Rails 5.2+ with modern dependencies (Bootstrap 4, ActiveStorage). Recent commit history and Gitter community presence suggest active usage and support.

Low-to-moderate risk: engine coupling to Rails 5.2+ enforces dependency discipline, but relies on external services (ImageMagick for image resizing must be installed separately, and you must add either kaminari or will_paginate). Single-engine design concentrates functionality, so breaking changes to the core affect all features. No recent abandonment signals visible, but verify the last commit date in the actual repo.

Active areas of work

Not enough metadata provided in this briefing to determine recent PRs or active work. Check .travis.yml for CI status and the actual GitHub repo for open issues and recent commits to understand current development focus.

🚀Get running

git clone https://github.com/comfy/comfortable-mexican-sofa.git
cd comfortable-mexican-sofa
bundle install
rails generate comfy:cms
rails db:migrate

Then add gem "comfortable_mexican_sofa", "~> 2.0.0" to your target Rails app's Gemfile.

Daily commands:

rake db:migrate
rails server

Then navigate to http://localhost:3000/admin (if mounted at /admin via comfy_route :cms_admin, path: "/admin"). No separate frontend server needed—runs within the Rails app.

🗺️Map of the codebase

  • Gemfile — Defines all gem dependencies including Rails 5.2+ and CMS-specific plugins; essential for understanding the project's external dependencies and version constraints.
  • README.md — Primary documentation covering features, integration patterns, and CMS architecture; required reading before implementing any major features.
  • app/assets/javascripts/comfy/admin/cms/application.js — Main admin interface entry point; orchestrates all admin-facing JavaScript modules and initializes the CMS UI framework.
  • .rubocop.yml — Defines code style and quality standards enforced across the codebase; necessary to understand linting rules before submitting changes.
  • app/assets/config/manifest.js — Asset pipeline configuration for bundling CSS/JS; controls what frontend assets are compiled and served to clients.
  • CONTRIBUTING.md — Outlines development workflow, testing requirements, and PR conventions; must-read before submitting contributions.
  • .travis.yml — CI/CD pipeline configuration; defines automated testing and deployment process for all commits.

🛠️How to make changes

Add a New Admin Editor Module

  1. Create a new JavaScript module in app/assets/javascripts/comfy/admin/cms/ (app/assets/javascripts/comfy/admin/cms/custom.js)
  2. Export initialization function that hooks into the admin base on document ready (app/assets/javascripts/comfy/admin/cms/base.js)
  3. Import the new module in the admin application manifest (app/assets/javascripts/comfy/admin/cms/application.js)
  4. Add event handlers following the pattern used in wysiwyg.js or file_upload.js (app/assets/javascripts/comfy/admin/cms/wysiwyg.js)

Integrate a New Vendor Library

  1. Add the minified library file to app/assets/javascripts/comfy/vendor/ (app/assets/javascripts/comfy/vendor/bootstrap.bundle.min.js)
  2. Register the library in the asset manifest (app/assets/config/manifest.js)
  3. Create a wrapper module in app/assets/javascripts/comfy/admin/cms/ to initialize it (app/assets/javascripts/comfy/admin/cms/codemirror.js)
  4. Call the initialization function from application.js or base.js (app/assets/javascripts/comfy/admin/cms/application.js)

Add Custom Admin UI Components

  1. Create HTML/template structure (Rails views will handle server-side rendering) (app/assets/javascripts/comfy/admin/cms/custom.js)
  2. Attach event handlers and DOM initialization in base.js or custom module (app/assets/javascripts/comfy/admin/cms/base.js)
  3. Add styling using Bootstrap utility classes or custom CSS (app/assets/fonts/comfy/admin/cms/lib/redactor-font.eot)
  4. Import any required vendor libraries (e.g., flatpickr for date fields) (app/assets/javascripts/comfy/vendor/flatpickr.min.js)

Add Content Tag or Page Template Feature

  1. Create slug generation or page identifier handling (app/assets/javascripts/comfy/admin/cms/slugify.js)
  2. Implement page fragment management logic (app/assets/javascripts/comfy/admin/cms/page_fragments.js)
  3. If involving versioning/history, integrate diff library (app/assets/javascripts/comfy/vendor/diff/diff_match_patch.min.js)
  4. Update admin UI module to expose the feature (app/assets/javascripts/comfy/admin/cms/application.js)

🔧Why these technologies

  • Ruby on Rails 5.2+ — Full-featured web framework providing ORM, routing, asset pipeline, and built-in security; ideal for rapid CMS development with minimal configuration.
  • CodeMirror — Browser-based code editor supporting syntax highlighting and multiple languages; allows in-place HTML/CSS/JS editing without external tools.
  • Bootstrap — Responsive CSS framework ensuring admin UI works across devices; reduces custom CSS and provides accessible form components.
  • Flatpickr — Lightweight date/time picker reducing dependencies; critical for publishing schedules and content metadata without jQuery bloat.
  • Redactor Editor Integration — WYSIWYG editor for non-technical content creators; provides rich text editing without raw HTML knowledge.

⚖️Trade-offs already made

  • Engine-based architecture (mounted Rails engine)

    • Why: Allows drop-in integration without forking Rails app; users customize via Rails generators and configuration.
    • Consequence: Less flexible for highly custom layouts; contributors must understand Rails engine conventions and asset pipeline behavior.
  • Multiple sites support in single Rails app

    • Why: Reduces infrastructure complexity and shared resource costs.
    • Consequence: Adds complexity to data models and routing; potential for cross-site

🪤Traps & gotchas

ImageMagick must be installed separately for image resizing—Rails will not fail gracefully if missing. Pagination gem required: you must add either kaminari or will_paginate to your host app's Gemfile or pagination will break. Route mounting order matters: the catch-all comfy_route :cms must be last in config/routes.rb or it will shadow other routes. ActiveStorage migration required: run rails active_storage:install before rails db:migrate or file attachments will fail. Admin path conflicts: if your app already uses /admin, you must customize the mount path in comfy_route :cms_admin, path: "/custom-admin".

🏗️Architecture

💡Concepts to learn

  • Rails Engines — ComfortableMexicanSofa is built as an engine mounted into a host Rails app; understanding engine isolation, asset pipelines, and route namespacing is critical to extending or customizing it
  • Content Tagging / Template Variables — The core CMS feature allowing non-developers to insert dynamic content into pages via tags like {{ page.title }}; understanding the parsing and rendering logic is essential for creating custom tags
  • ActiveStorage — File attachments and image handling rely on Rails ActiveStorage; direct integration means understanding blob storage, variant generation, and service adapters affects media features
  • Internationalization (i18n) — The CMS supports 22 locales and page-level localization; understanding Rails i18n mechanics and how content is stored per locale is needed to add languages or fix translation bugs
  • Revision History / Audit Trail — ComfortableMexicanSofa tracks all page changes as versions; understanding how versioning is stored, queried, and diffed (see diff.js) enables restoring content and implementing rollback features
  • WYSIWYG Editors (Redactor) — The admin UI uses Redactor for rich text editing; understanding its plugin API, event handlers, and content sanitization is necessary to customize editor behavior or add toolbar buttons
  • Asset Pipeline and Webpack Integration — Admin UI assets (JS, CSS) are bundled via Rails asset pipeline; understanding manifest.js, asset compilation, and vendor dependency ordering is needed to debug frontend issues or add new libraries
  • refinery/refinery — Alternative Rails CMS engine with similar modular architecture and admin UI, useful for comparing design patterns and feature parity
  • locomotivecms/locomotive — Another Rails-based CMS with more advanced templating; solves similar problems but with different UX philosophy (useful for understanding trade-offs)
  • rails/rails — Core Rails framework; understanding ActiveStorage, engines, and i18n in Rails proper is essential for contributing to ComfortableMexicanSofa
  • codemirror/codemirror5 — The syntax editor bundled as a vendor dependency in this project; critical for maintaining or upgrading the code highlighting feature
  • twbs/bootstrap — Bootstrap 4 is the CSS framework for the admin UI; familiarity with its grid, components, and utilities is needed to modify admin templates

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add GitHub Actions CI workflow to replace Travis CI (.travis.yml deprecation)

The repo uses outdated .travis.yml for CI/CD, which Travis CI is phasing out. GitHub Actions is now the standard for GitHub-hosted projects. This modernizes the CI pipeline, improves reliability, and leverages native GitHub integrations for test reporting and coverage uploads (currently using Coveralls).

  • [ ] Create .github/workflows/ci.yml with matrix testing for Rails 5.2+ and multiple Ruby versions
  • [ ] Configure RuboCop linting step referencing .rubocop.yml configuration
  • [ ] Add Coveralls coverage reporting integration to replace Travis CI coverage uploads
  • [ ] Verify all test commands from existing .travis.yml are replicated
  • [ ] Update README.md badges to use GitHub Actions status instead of Travis CI

Add JavaScript unit tests for admin CMS modules (app/assets/javascripts/comfy/admin/cms/)

The codebase contains numerous JavaScript modules (wysiwyg.js, codemirror.js, file_upload.js, slugify.js, timepicker.js, sortable_list.js, page_fragments.js) with no visible test files. Adding Jest or similar tests would improve reliability and prevent regressions in critical admin UI functionality.

  • [ ] Create spec/ or test/ directory structure for JavaScript tests
  • [ ] Add Jest or Jasmine configuration file (jest.config.js or karma.conf.js)
  • [ ] Write unit tests for app/assets/javascripts/comfy/admin/cms/slugify.js (URL generation logic)
  • [ ] Write integration tests for app/assets/javascripts/comfy/admin/cms/file_upload.js
  • [ ] Update .gitignore and Gemfile to include JavaScript testing dependencies
  • [ ] Document testing approach in CONTRIBUTING.md

Add missing API documentation for CMS fragment and page rendering system

The file structure shows complex asset organization and page fragment management (page_fragments.js), but README.md snippet is incomplete ('Features' section cuts off). There's no visible API documentation for how developers integrate the CMS engine with their Rails apps, configure page layouts, or manage content fragments programmatically.

  • [ ] Create docs/api.md documenting core Rails models/controllers (likely in lib/comfortable_mexican_sofa/)
  • [ ] Document page fragment configuration and rendering in docs/fragments.md
  • [ ] Add docs/getting-started.md with step-by-step integration guide
  • [ ] Document WYSIWYG editor configuration (referencing app/assets/javascripts/comfy/admin/cms/wysiwyg.js)
  • [ ] Update README.md with completed Features section and links to documentation
  • [ ] Add code examples for common use cases (custom page types, content blocks, etc.)

🌿Good first issues

  • Add tests for app/assets/javascripts/comfy/admin/cms/slugify.js (URL slug generation)—no test file visible in the structure, yet it's used in page creation workflows.
  • Document the Content Tags system with concrete examples in CONTRIBUTING.md—the wiki is referenced but in-repo examples are minimal for developers extending tag types.
  • Add missing TypeScript definitions or JSDoc comments to app/assets/javascripts/comfy/vendor/codemirror/ modules to improve IDE support and reduce onboarding friction for new contributors.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 8f7e425 — fix seeds exporter (#911) (lopesrb)
  • e1160ce — Bump comfortable_mexican_sofa to 2.0.19 (GBH)
  • ef0b230 — fixing issue with rack 2.0.8 (GBH)
  • 58c4ee3 — will this works with sprokets 4? (GBH)
  • 3d0ea8e — syncing locale files (GBH)
  • ac533da — feat(I18n): added arabic locale (#897) (Dreamersoul)
  • ecba082 — bumping puma (GBH)
  • fd7de7e — bumping sqlite gem (GBH)
  • a1584e9 — rails 6 needs ruby 2.5+ (GBH)
  • c04fa6f — tests green locally for rails 6.0 (GBH)

🔒Security observations

  • High · WYSIWYG Editor XSS Risk — app/assets/javascripts/comfy/admin/cms/wysiwyg.js, app/assets/fonts/comfy/admin/cms/lib/redactor-font.eot. The presence of wysiwyg.js and Redactor editor in the codebase suggests potential XSS vulnerabilities. WYSIWYG editors are notorious for XSS issues if user input is not properly sanitized before rendering. ComfortableMexicanSofa is a CMS that handles user-generated content, making this a critical concern. Fix: Ensure all user-generated content from WYSIWYG editor is properly sanitized using a whitelist approach. Use libraries like sanitize-html or DOMPurify. Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  • High · Flash/SWF File Vulnerability — app/assets/javascripts/comfy/vendor/Moxie.swf, app/assets/javascripts/comfy/vendor/Moxie.xap. The presence of Moxie.swf and Moxie.xap files indicates Flash-based file upload functionality. Flash files are deprecated and pose significant security risks including arbitrary code execution, Cross-Site Request Forgery, and plugin vulnerabilities. Fix: Replace Flash-based file uploads with modern alternatives using HTML5 File API. Remove Moxie.swf and Moxie.xap entirely. Implement proper file validation, scanning for malware, and secure file storage mechanisms.
  • High · Missing CSRF Protection Verification — app/assets/javascripts/comfy/admin/cms/file_upload.js, app/assets/javascripts/comfy/admin/cms/file_link.js. CMS systems require strong CSRF protection. File-based analysis cannot confirm if CSRF tokens are properly validated in all forms and state-changing operations. Rails engines must explicitly protect against CSRF attacks. Fix: Verify all POST/PUT/DELETE requests include CSRF tokens. Audit file upload and link operations for CSRF protection. Use Rails' built-in protect_from_forgery filter with appropriate exception handling.
  • High · File Upload Security Concerns — app/assets/javascripts/comfy/admin/cms/file_upload.js, app/assets/javascripts/comfy/admin/cms/files_modal.js. The codebase includes file upload functionality (file_upload.js, files_modal.js) without visible server-side validation in the static analysis. File uploads are a common vector for malware, arbitrary code execution, and path traversal attacks. Fix: Implement strict server-side file validation: whitelist file types, verify MIME types, scan for malware, enforce file size limits, store uploads outside web root, and use random filenames. Never trust client-side validation.
  • Medium · Third-Party JavaScript Dependency Risks — app/assets/javascripts/comfy/vendor/. Multiple vendor JavaScript libraries are included (CodeMirror, Flatpickr, diff_match_patch, Bootstrap) without visible version pinning or dependency management documentation. These represent potential supply chain and security risks if outdated. Fix: Document all third-party library versions and their security status. Use npm/yarn with lock files for JavaScript dependencies. Implement Software Composition Analysis (SCA) tools to track vulnerabilities. Keep all dependencies current.
  • Medium · Potential SQL Injection in CMS Queries — app/assets/javascripts/comfy/admin/cms/slugify.js. As a Rails CMS engine, the codebase likely contains database queries. Without visibility into the app/models or app/controllers code, potential SQL injection vulnerabilities cannot be ruled out, especially for user-generated slug/filter content. Fix: Use parameterized queries and Rails ORM (ActiveRecord) exclusively. Never concatenate user input into SQL strings. Use proper escaping for all dynamic database operations. Implement query logging and monitoring.
  • Medium · Missing Security Headers Configuration — .rubocop.yml, .codeclimate.yml. No visible configuration for security headers in .rubocop.yml, .codeclimate.yml or Rails configuration files. Critical headers like CSP, X-Frame-Options, X-Content-Type-Options are likely missing or misconfigured. Fix:

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · comfy/comfortable-mexican-sofa — RepoPilot