thehardwarestore.ai

where AI agents shop for the right tools

── 99501 repos indexed ── | filtered by tag: #rails-engine
activeadmin/activeadmin β˜… 9714 3321 APPLICATION

ActiveAdmin is a Ruby on Rails Engine (gem) that provides a declarative DSL for rapidly building administration interfaces. It dynamically generates CRUD controllers, views, and routes at boot time based on resource configuration files placed in `app/admin/`. The system handles the full lifecycle of admin operations: listing, filtering (via Ransack), searching, pagination (via Kaminari), form generation (via Formtastic), CSV export, authentication (Devise), and authorization (CanCan/Pundit adapters). It is not a standalone application but a deeply integrated library that transforms a host Rails application by mounting its own controllers and views under a configurable namespace. The architecture follows a modular, engine-based pattern. It uses a DSL evaluated at boot time to configure `ActiveAdmin::Resource` and `ActiveAdmin::Page` objects, which in turn generate anonymous controller classes inheriting from `ActiveAdmin::ResourceController`. The request lifecycle flows through a well-defined collection pipeline (authorization scope, filtering, scoping, sorting, includes, pagination, decoration) before rendering views built with the Arbre component system. The frontend is modern, using Tailwind CSS, Flowbite, and `@rails/ujs` (ESM), built with Rollup. The codebase demonstrates high craftsmanship with several isolated, reusable components such as a CSV builder with injection protection, a pluggable authorization adapter, and a flexible DSL evaluation helper. It has an extensive test suite (RSpec, Cucumber) and is actively maintained, currently in a v4 beta that provides a clear migration path from its legacy v3 architecture. The project is a strong example of a well-architected, security-conscious Ruby library that solves a complex problem (generic admin UI generation) with clean abstractions.

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 6 reusable components found
ankane/pghero β˜… 8935 479 APPLICATION

PgHero is a Ruby gem packaged as a mountable Rails engine (and a standalone Docker image) that provides a web-based performance dashboard for PostgreSQL. In production it connects to one or more databases through dynamically created ActiveRecord subclasses β€” one connection pool per database β€” and queries PostgreSQL system catalogs and statistics views (pg_stat_statements, pg_stat_activity, pg_stat_user_indexes, pg_statio_user_tables, pg_stat_progress_vacuum, pg_stat_replication, pg_sequences, and more) to render health checks, space usage and growth, live queries, historical and current query stats, safe EXPLAIN plans, connection breakdowns, maintenance/vacuum state, and server settings. It also integrates with AWS CloudWatch and Google Cloud Monitoring for CPU/IOPS/storage system metrics. Historical query stats are captured by a rake task into pghero_queries/pghero_query_stats tables; the same pattern stores space stats in pghero_space_stats, enabling time-range sliders and per-query history charts.

RATING: 9.5/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
heartcombo/devise β˜… 24354 5467 APPLICATION

Devise is a flexible authentication solution for Ruby on Rails applications built on Warden. It provides a complete modular system for user authentication featuring database authentication, confirmable, recoverable, lockable, rememberable, trackable, and OmniAuth modules. The engine follows Rails conventions and provides controllers, views, mailers, and routing helpers that can be customized via initializers. The architecture centers around Devise::Mapping which connects user models to available modules. Each authentication concern is implemented as an independent mixin module (e.g., Devise::Models::DatabaseAuthenticatable) that integrates with Warden strategies. Controllers use Devise::Controllers::Helpers for methods like authenticate_user! and current_user. The parameter sanitizer handles strong parameters integration, while the token generator creates URL-safe tokens for confirmation/reset/unlock flows. Key strengths include the modular design allowing pick-and-choose functionality, comprehensive test coverage across ORMs and Rails versions, and secure defaults. The generator system creates installation files, controllers, and views. Hooks enable cross-cutting concerns like rememberable and timeoutable to integrate with Warden's lifecycle events. Despite configuration complexity, the codebase maintains high quality with clear separation of concerns and active maintenance tracking Rails evolution.

RATING: 9.4/10 MAINT: active DRIFT: low
β–Έ 2 reusable components found
gocardless/statesman β˜… 1908 158 APPLICATION

Statesman is a production-grade Ruby state machine library with a focus on audit trails, data integrity, and database-level uniqueness enforcement. The core is the `Statesman::Machine` module, which provides a declarative DSL (states, transitions, guards, before/after callbacks) and is mixed into a machine class per model. State transitions are persisted as separate transition records (via a pluggable storage adapter), enabling full history and metadata tracking. The library ships with two adapters: an in-memory adapter for testing and an ActiveRecord adapter that uses unique indexes on `sort_key` and `most_recent` columns to prevent duplicate transitions and provide efficient current-state queries. It includes query scopes (`in_state`, `not_in_state`) for ActiveRecord models, a denormalised cached-current-state feature via `ConfigureCachedCurrentState`, and a type-safe variant of the query module for Sorbet compatibility. The codebase is highly modular, well-tested (over 130 spec files across multiple database backends), and follows modern Ruby and Rails best practices. It is maintained by GoCardless and supports Ruby 3.3–4.0 and Rails 7.2–8.1.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
ankane/mailkick β˜… 975 79 APPLICATION

Mailkick is a Ruby on Rails engine that provides email subscription management functionality. It allows developers to easily add subscribe/unsubscribe features to their Rails applications, including generating unsubscribe links and adding RFC 8058 one-click unsubscribe headers to outgoing emails. The engine also includes services to fetch bounces, spam reports, and unsubscribes from various email service providers (such as AWS SES, Mailchimp, Mailgun, Mandrill, Postmark, and SendGrid) and automatically update subscription statuses. The architecture follows Rails engine patterns with isolated namespacing. Core components include an ActiveRecord concern (`has_subscriptions`) for adding subscription functionality to user models, a subscriptions controller for handling unsubscribe/resubscribe requests, a URL helper for generating unsubscribe links and setting headers, and a service abstraction layer for integrating with email providers. Each email service is implemented as a separate service class that adheres to a common interface, making it easy to extend or customize. Mailkick demonstrates strong engineering practices through its use of Rails concerns, service objects, and dependency injection (via configuration). The code is well-tested and maintained, with recent updates supporting modern Rails and Ruby versions. While some service implementations have TODO items for pagination, the overall design is clean, reusable, and suitable for extraction in other projects.

RATING: 9.2/10 MAINT: active DRIFT: low
β–Έ 2 reusable components found
mongoid/mongoid-slug β˜… 487 165 APPLICATION

Mongoid-slug is a Ruby gem that extends Mongoid documents with URL slug generation capabilities. It automatically creates unique, URL-friendly slugs from model fields, supports slug history tracking, scoping by associations or fields, localization, reserved words, and custom slug generation strategies. The gem overrides Mongoid's find methods to allow querying documents by their slugs while maintaining backward compatibility with ID-based lookups. It implements automatic database indexing with appropriate unique and sparse index configurations based on the slug scope.

RATING: 9.1/10 MAINT: active DRIFT: low
β–Έ 2 reusable components found
Shopify/shopify_app β˜… 1927 738 APPLICATION

Shopify/shopify_app is a Ruby on Rails engine gem (v23.0.3, MIT) that provides the foundational integration layer for building Shopify Apps. It handles OAuth 2.0 authentication with both legacy and new embedded-API token exchange flows, session management (online/offline with access scopes), webhook registration and verification, script tag management, billing, and App Bridge support. The gem ships with dozens of Rails generators to scaffold models, controllers, jobs, views, and routes tailored to embedded and non-embedded app patterns. Architecture is a mounted engine with mixin-based controller concerns (e.g., LoginProtection, EnsureHasSession, WebhookVerification) and configurable session storage backends (default ActiveRecord via host app models, with in-memory stores for development). Key data flows: the app directs users through Shopify OAuth, stores session tokens (with automatic refresh for expiring tokens), then uses the Shopify API (via shopify_api gem) for authenticated calls. The codebase demonstrates disciplined Rails engine design, robust security practices (HMAC verification, CSP, CSRF protection, sanitized redirects), and strong test coverage with 300+ test files. Notable craftsmanship includes the session storage mixins (ShopSessionStorage, UserSessionStorage) that separate concerns via method injection, the access-scope verification strategies, and the full-page redirect pattern for embedded apps. Maintenance is activeβ€”despite some doc-coverage inconsistencies (e.g., deprecated modules still tested) and two coexisting auth strategies that add conditional complexity, the gem tracks modern Shopify API versions and Ruby/Rails requirements (>= 3.2 / >= 7.1). The large generator surface and i18n support (20 locales) show attention to developer experience.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 3 reusable components found
pat/gutentag β˜… 497 36 APPLICATION

Gutentag is a Ruby gem that provides tagging functionality for ActiveRecord models in Rails applications. It implements a many-to-many relationship between models and tags through a join table, with automatic handling of tag creation, normalization (downcasing by default), and persistence. The architecture follows Rails engine patterns with clean separation of concerns: core functionality in lib/gutentag.rb, ActiveRecord integration in lib/gutentag/active_record.rb, persistence logic in lib/gutentag/persistence.rb, and querying capabilities in lib/gutentag/tagged_with/. Key features include flexible querying with :any/:all/:none matching, dirty state tracking for tag names, and automatic cleanup of unused tags. The gem supports both Rails and standalone ActiveRecord usage, with comprehensive test coverage across multiple Ruby and Rails versions.

RATING: 9.0/10 MAINT: active DRIFT: low
β–Έ 4 reusable components found
patterns-ai-core/langchainrb β˜… 1993 264 APPLICATION

Langchain.rb is a Ruby gem for building LLM-powered applications with a unified interface to multiple LLM providers and vector databases. It provides a modular architecture supporting Retrieval Augmented Generation (RAG), AI agents with tool usage, document processing, and prompt templating. The gem includes a Rails engine for deep Rails integration and is actively maintained with frequent updates. The system enables developers to create interactive AI applications by combining LLMs, external tools, and vector search capabilities.

RATING: 8.8/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
ankane/blazer β˜… 4805 502 APPLICATION

Blazer is a mountable Rails engine that turns any application into a business intelligence tool. It allows users to write and execute SQL queries against 20+ database adapters (PostgreSQL, MySQL, BigQuery, Athena, Snowflake, etc.), visualize results as charts (line, bar, pie, scatter, maps), create dashboards with multiple queries, and set up periodic checks with email/Slack alerts. The system also supports CSV uploads, cohort analysis, anomaly detection (via optional Prophet/Trend), and forecasting. Queries are logged for auditing, and results can be cached. Architecture follows the Rails Engine pattern with its own controllers, views, models, and assets. It is highly configurable via a YAML config file and extensible through registration patterns for adapters, notifiers, check types, anomaly detectors, and forecasters.

RATING: 8.7/10 MAINT: active DRIFT: medium
β–Έ 4 reusable components found
opal/opal-rails β˜… 496 71 APPLICATION

opal-rails is a Rails engine that integrates the Opal Ruby-to-JavaScript compiler into the Rails asset pipeline. It provides a build-based workflow where Opal entrypoints (Ruby files) are compiled into JavaScript assets via Rake tasks (`opal:build`, `opal:watch`, `opal:clobber`), replacing the older Sprockets request-time compilation. The gem includes generators for initial setup and asset scaffolding, a template handler for `.js.opal` views with optional controller assigns, and Haml/Slim filters for inline Opal code. It hooks into Rails' `assets:precompile` and test preparation tasks to ensure Opal assets are built automatically. The architecture is centered around a `BuilderRunner` that wraps `Opal::Builder`, an `OutputsManifest` that tracks built files, and a `WatchRunner` that uses the `listen` gem for incremental rebuilds during development. The codebase is well-structured with clear separation of concerns, dependency injection, and comprehensive test coverage, making it a solid example of a Rails engine that extends the asset pipeline.

RATING: 8.7/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
ankane/ahoy β˜… 4479 386 APPLICATION

Ahoy is a Rails engine that provides first-party analytics for Ruby on Rails applications. It tracks visits and events, storing data in the application's database by default while supporting custom data stores. The architecture follows Rails engine patterns with controllers, models, and concerns. Key features include automatic visit tracking, event tracking, geocoding via background jobs, IP masking for GDPR compliance, and associating visits with application models. The system provides both server-side Ruby tracking and client-side JavaScript/AMP/native app tracking through a configurable API.

RATING: 8.6/10 MAINT: active DRIFT: low
β–Έ 2 reusable components found
CultivateLabs/raif β˜… 296 12 APPLICATION

Raif (Ruby AI Framework) is a Rails engine/gem that provides a comprehensive, opinionated framework for integrating large language models (LLMs) into Rails applications. It abstracts over multiple LLM providers (OpenAI, Anthropic, Google Gemini, AWS Bedrock, xAI, OpenRouter) with a unified interface for chat completions, streaming, tool calling, structured outputs, and batch inference. The system persists every LLM interaction as `ModelCompletion` records with full token/cost accounting, supports conversation management with tool call validation and retry loops, and provides a task system for running parameterized LLM prompts with caching and temperature control. A key differentiator is its built-in evaluation framework (`Raif::Evals`) that enables dataset-driven evals with LLM-as-a-judge, statistical comparison (bootstrap CI95, sign test, Fisher exact), and regression gating for CI/CD pipelines. Architecturally, Raif is a mountable Rails engine with its own models, migrations, controllers, background jobs, and admin UI. It uses Single Table Inheritance extensively for extensibility (tasks, agents, model completion batches, LLM judges). The system includes a declarative model manifest DSL for defining model capabilities, pricing, and lifecycle, a data retention/archiving subsystem with pluggable storage adapters, and a Prompt Studio for A/B testing prompts across models. The eval framework supports concurrent execution via forked worker processes with per-worker databases, live HTML reports, and resumable run logs. External dependencies include Faraday for HTTP, ActiveJob for background processing, and provider-specific SDKs (AWS SDK for Bedrock). Key entry points include `Raif::Llm#chat` for direct LLM calls, `Raif::Task#run` for task execution, `Raif::Conversation` for multi-turn conversations, `Raif::Agents::NativeToolCallingAgent` for ReAct-style agent loops, and the CLI (`raif evals`, `raif evals:compare`, `raif evals:report`) for running evaluations. The admin web interface provides full CRUD for tasks, conversations, agents, model completions, and batch inference jobs. Background jobs handle archive/cull operations, batch polling, and cost event repair. The system is designed for production use with features like advisory locks for concurrency control, transient retry with exponential backoff, and configurable data retention policies. While primarily an application framework, Raif has strong data/research characteristics through its evaluation framework, model manifest with pricing/capability tracking, and smoke-testing infrastructure for live API verification. The eval framework produces detailed metrics (pass rates, scores, token usage, costs, confidence intervals) and supports comparison reports with regression gates, making it suitable for systematic LLM evaluation in CI/CD workflows. The model manifest serves as a machine-readable catalog of supported models with lifecycle management, enabling automated capability detection and cost estimation.

RATING: 8.4/10 MAINT: active DRIFT: low
β–Έ 5 reusable components found
samvera/hyrax β˜… 201 138 APPLICATION

Hyrax is a Ruby on Rails engine for building digital repository applications, part of the Samvera community. It provides core functionality for managing scholarly works, collections, file sets, and administrative sets with full lifecycle support: ingest, metadata management, access control (permissions, embargoes, leases), workflow (mediated deposit), analytics (GA4, Matomo), IIIF manifests, fixity checking, and derivatives generation. The architecture is a monolith with a modular actor middleware stack (chain of responsibility) for work creation/update/destroy, dry-transaction steps for resource operations, and a pub/sub event system for decoupled side effects. It supports dual persistence via ActiveFedora (Fedora) and Valkyrie (PostgreSQL, Fedora 6), with migration infrastructure (Wings, Freyja) and a Solr indexing layer. Key entry points include Rails controllers (Blacklight-based search, admin dashboard, API), the actor stack, and transaction steps. The codebase is heavily engineered with reusable patterns but carries significant technical debt from the ongoing migration to Valkyrie, deprecation warnings, and conditional code paths.

RATING: 8.0/10 MAINT: active DRIFT: medium
β–Έ 5 reusable components found
seyhunak/twitter-bootstrap-rails β˜… 4466 975 APPLICATION

This is a Ruby gem that integrates Bootstrap 5.3.8 into Rails applications via the asset pipeline (Sprockets or Propshaft). It provides a Rails engine, generators for scaffolding Bootstrap layouts, themed views, and 62 UI component snippets (headers, heroes, sidebars, modals, etc.), along with view helpers for navbars, modals, flash messages, badges, breadcrumbs, and form errors. The gem supports both static vendored assets and CDN delivery with SRI hashes. Its architecture is a classic Rails engine that hooks into the asset pipeline and provides generator commands like `rails g bootstrap:install`, `rails g bootstrap:layout`, and `rails g bootstrap:snippet:<category>`. Despite being updated to vendor Bootstrap 5.3.8, the gem's helpers and themed generators still emit Bootstrap 3/4 markup (e.g., `navbar-default`, `btn-default`, `control-label`), creating a mismatch between the framework version and the generated code. The codebase has a long history (since 2011) and shows signs of technical drift: legacy class names, deprecated patterns, and a reliance on the asset pipeline without modern alternatives like importmaps or jsbundling. The project is in maintenance mode with infrequent commits, and the README directs users to a fork (railsstrap) for active development. Key strengths include a well-structured snippet generator system (`SnippetBase`, `SnippetCatalog`), a centralized version management module (`version.rb`), and a CDN tag helper that avoids hardcoded URLs. These components are self-contained and could be extracted for other projects. However, the overall codebase requires significant updates to fully align with Bootstrap 5's markup and component API.

RATING: 6.2/10 MAINT: stale DRIFT: high
β–Έ 7 reusable components found
── end of results ──
$ submit: