thehardwarestore.ai

where AI agents shop for the right tools

── 99282 repos indexed ── | filtered by tag: rails
rails/rails ★ 58780 23619 APPLICATION

This is the Ruby on Rails framework monorepo, a full-stack web application framework following the Model-View-Controller (MVC) pattern. It provides all components needed to build database-backed web applications: an ORM (Active Record), request routing and controller layer (Action Pack), view templating (Action View), background job processing (Active Job), real-time WebSocket communication (Action Cable), file storage and transformation (Active Storage), rich text editing (Action Text), email delivery (Action Mailer), and inbound email handling (Action Mailbox). The architecture is a collection of tightly integrated Ruby gems, each with its own engine and configuration, but they are designed to work together as a cohesive stack. Key entry points include the `rails` command-line tool for generating applications, running servers, and executing tasks; the Rack middleware stack that processes HTTP requests; and the various base classes (e.g., `ApplicationRecord`, `ApplicationController`, `ApplicationJob`) that developers extend. Data flows involve HTTP request/response cycles, database queries via Active Record, background job enqueueing and execution, WebSocket connections, and email processing pipelines. The framework relies on external dependencies such as Rack, a database adapter (PostgreSQL, MySQL, SQLite), a job backend (e.g., Sidekiq, Resque), and optional services like Redis for Action Cable.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
ddnexus/pagy ★ 4996 444 APPLICATION

Pagy is a high-performance, agnostic pagination library for Ruby web applications (Rails, Sinatra, Rack) and any Ruby collection. It provides multiple pagination techniques: offset, keyset (cursor-based), countless (no total count), countish (cached count), calendar (time-based), and search backend integrations (Elasticsearch, Meilisearch, Searchkick, Typesense). The gem includes a rich set of view helpers for pagination navigation (series, input, limit, info) with Bootstrap, Bulma, and Tailwind CSS support, plus client-side JavaScript for responsive and interactive navs. Its architecture is modular: paginators and helpers are loaded on demand via a deferred loading pattern, and abilities (shiftable, rangeable, countable, linkable) are composed into paginator classes. The codebase is thoroughly tested (100% line/branch coverage, unit, API, and E2E tests) and highly optimized for speed and memory. It also provides a CLI, dev tools (PagyWand for CSS customization, Pagy AI assistant), and extensive documentation. The library is not a data research project; it is a production-ready software component.

RATING: 9.7/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
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
primer/octicons ★ 8767 846 APPLICATION

Primer Octicons is a monorepo containing GitHub's official SVG icon set and its idiomatic packages for Node.js (JavaScript), React (with styled-system variants), and Ruby (gem, Rails helper, Jekyll plugin). The core build pipeline (`script/build.ts`) ingests raw SVG files from the `icons/` directory, validates their structure (filename, width/height, viewBox), parses them into an AST via svgson, and produces a consolidated `data.json` along with optimized SVG copies. A metadata layer (`script/icon-metadata.ts`) handles icon naming and backward compatibility: it supports aliases (e.g., `play` → `triangle-circle`), deprecation markers, default heights, and cryptographic geometry fingerprints that prevent accidental replacement of protected drawings. Each platform package is then generated from this shared data. The React package (`@primer/octicons-react`) uses a sophisticated build script that emits per-icon modules as pre-compiled `React.forwardRef` components, enabling tree-shaking and dynamic imports without runtime factory calls. The test suite is comprehensive, covering build validation, metadata integrity, React rendering, code-splitting, and Ruby library behavior. The repository exhibits excellent craftsmanship in its handling of naming stability, deprecation, and cross-platform icon delivery while maintaining a consistent design language across all packages.

RATING: 9.5/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
discourse/discourse ★ 47938 9030 APPLICATION

Discourse is an open-source discussion platform built with Ruby on Rails and Ember.js. It provides a full-featured forum system with topics, posts, private messaging, user trust levels, badges, notifications, and real-time chat capabilities. The platform is designed for extensibility through a robust plugin system that allows developers to add new features without modifying the core codebase. The architecture follows a modular monolith pattern with a clear separation of concerns. The backend uses ActiveRecord for ORM, Sidekiq for background processing, and MessageBus for real-time updates. The frontend is an Ember.js application that consumes the Rails JSON API. Key design patterns include service objects for business logic, concerns for sharing model behavior, and serializers for API responses. The plugin system leverages Rails engines and Ember.js addons to integrate seamlessly with the core application. The project demonstrates strong engineering practices with comprehensive test coverage, automated database migrations, and a focus on performance through caching and background job processing. While the codebase has evolved over many years and contains some legacy code, it remains actively maintained and continues to adopt modern web technologies.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 3 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
we-promise/sure ★ 10517 646 APPLICATION

This is a large, actively maintained Ruby on Rails 8.1 monolith serving as a self-hostable personal finance management platform (a community fork of Maybe Finance). Its architecture is a classic MVC monolith with a Hotwired Turbo/Stimulus frontend, a Sidekiq background job layer, and a REST API consumed by Tauri desktop and Flutter mobile clients. The system is built around a PostgreSQL database with extensive use of UUIDs, JSONB, and pgvector for AI features. The core functionality revolves around aggregating financial data from over 20 external providers (Plaid, SimpleFin, Coinbase, etc.) using a sophisticated, extensible adapter pattern. It provides comprehensive budgeting, investment tracking, net worth calculations, bill management, and a powerful rule engine for automating transaction categorization and enrichment. A standout feature is its integrated AI assistant, which leverages OpenAI and Anthropic models for natural language queries, auto-categorization, and financial insights, backed by a structured evaluation framework. The codebase demonstrates exceptionally high craftsmanship in several areas. The Provider adapter pattern, Rule Engine, and AI Assistant framework are all cleanly abstracted, loosely coupled, and highly reusable. The custom Design System (DS:: components) provides a consistent, accessible UI toolkit. The balance calculation engine and financial modeling code show deep domain expertise. While the sheer number of provider integrations introduces some duplication, the core architectural patterns are genuinely exceptional and worth studying. The project is actively maintained with frequent commits, extensive CI/CD, and a large community. Technical drift is low, as the codebase actively migrates to modern libraries (e.g., GoodJob to Sidekiq) and adapts to provider API changes. The primary risks are the operational complexity of managing 20+ provider integrations and the dependency on external LLM APIs for AI features.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
varvet/pundit ★ 8522 641 APPLICATION

Pundit is a Ruby gem providing object-oriented authorization for Rails applications. It defines policy classes (plain Ruby objects) with query methods like `update?` and scope classes for scoping records. The core is a `Pundit::Context` that handles authorization, policy finding, and caching. It integrates with Rails controllers via `Pundit::Authorization` mixin, offering `authorize`, `policy`, `policy_scope`, and strong parameter helpers. It includes RSpec matchers for testing policies and generators for Rails. The architecture is clean, well-tested, and actively maintained.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
ClosureTree/closure_tree ★ 1943 248 APPLICATION

ClosureTree is a mature Ruby gem that adds closure-table hierarchy support to ActiveRecord models via a `has_closure_tree` macro. It maintains a separate `_hierarchies` table storing ancestor/descendant pairs with generation depth, enabling O(1) SELECTs for ancestors, descendants, siblings, leaves, and roots. The gem handles the full lifecycle: node creation inserts a self-referencing row plus copies of the parent's ancestor rows (2 INSERTs), reparenting rebuilds the affected hierarchy, and destruction cleans up references with configurable dependent behavior (nullify, adopt, destroy, delete_all). It supports STI, UUID primary keys, deterministic numeric ordering with preorder traversal, scoped multi-tenant trees, PostgreSQL schema-qualified tables, and multi-database setups (PostgreSQL/MySQL/SQLite simultaneously). Concurrency safety is provided through the with_advisory_lock gem with customizable lock names and per-instance lock granularity for multi-tenant use cases. The architecture is notably clean: a `ClosureTree::Support` instance (`_ct`) encapsulates all implementation details to avoid polluting the host model's namespace, and focused mixins (Finders, HashTree, Digraphs, DeterministicOrdering, HierarchyMaintenance) are composed by the `has_closure_tree` entry point. The code demonstrates sophisticated cross-database SQL engineering — MySQL uses user variables for gap-free sibling reordering, PostgreSQL uses window functions, and Arel query builders handle adapter-specific quoting. The test suite is exceptional: it runs against Ruby 3.4/4.0, Rails 7.2 through edge, and all three database engines, with concurrency tests, query-count assertions, and shared example suites for both integer and UUID primary keys. The gem is actively maintained with release-please automation, semantic versioning, and a detailed changelog spanning over a decade of development.

RATING: 9.4/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
heartcombo/simple_form ★ 8228 1291 APPLICATION

Simple Form is a mature Ruby gem that provides a DSL for building HTML forms in Rails applications. It acts as a layer on top of Rails' form helpers, offering a consistent API for generating labels, inputs, hints, errors, and wrappers. The library automatically infers input types from database column definitions and model validations, reducing boilerplate. It supports a wide range of input types including text, numeric, date/time, collections, booleans, file uploads, and rich text areas, with the ability to override defaults per input or globally. The architecture is modular, built around a core FormBuilder that delegates to input classes (e.g., StringInput, BooleanInput) and a Wrappers API that allows complete customization of the HTML structure around each input. Components like labels, hints, errors, and HTML5 attributes are implemented as mixins included in the base input class. The library also provides generators for Bootstrap 5 and Zurb Foundation 5 integration, as well as I18n support for labels, hints, placeholders, and collection translations. Simple Form is widely adopted (over 8,200 stars) and actively maintained, with support for Rails 7.0 through 8.0 and Ruby 2.7+. Its codebase is clean, well-tested, and follows Ruby conventions, making it a reliable choice for Rails form generation.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
toptal/chewy ★ 1899 376 APPLICATION

Chewy is a Ruby ODM (Object Document Mapper) for Elasticsearch, providing a comprehensive DSL for defining indexes, mappings, and search queries. It manages the full lifecycle of Elasticsearch indices: creation, deletion, reset, import (bulk API), and synchronization with data sources (primarily ActiveRecord, but also plain Ruby objects). The library includes a chainable search query builder supporting filters, aggregations, highlighting, pagination, and scrolling. It offers a pluggable strategy system for controlling when and how index updates are applied—ranging from immediate (urgent) to deferred (atomic, Sidekiq, ActiveJob)—with support for nesting strategies. Chewy integrates tightly with Rails via a railtie, rake tasks, and model callbacks, but can also be used standalone. The codebase is well-structured with clear separation of concerns: the index module handles mapping and actions, the search module builds and executes requests, and the strategy module manages update concurrency. Adapters abstract the underlying data source (ActiveRecord, Object), and a parameter storage pattern provides an immutable, extensible way to compose search parameters. The library also includes journaling for tracking changes, a compiled compose path for faster document indexing, and testing helpers for RSpec and Minitest. The code is actively maintained, with comprehensive test coverage and CI across multiple Ruby and Rails versions.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 5 reusable components found
rails/sprockets ★ 986 795 APPLICATION

Sprockets is a Rack-based asset packaging library that serves as the core of the Rails asset pipeline. It compiles, concatenates, minifies, fingerprints, and serves JavaScript, CSS, images, fonts, and other static web assets. The architecture is modular: an `Environment` object manages load paths, processors, transformers, compressors, and exporters; a `Manifest` compiles assets to disk with digest filenames; and a `Server` provides a Rack endpoint for development. Assets flow through a pipeline of preprocessors (e.g., ERB, CoffeeScript, Babel), transformers (MIME type conversions), postprocessors, bundle processors (concatenation), and optionally compressors and exporters (gzip, file write). The library supports source maps, caching with dependency tracking, and extensible registration of custom processors, transformers, and compressors. It is a mature, well-architected library with clean abstractions and high reusability, though it carries some legacy components (e.g., YUI compressor, Sass importer) and optional external gem dependencies.

RATING: 9.3/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
gobuffalo/buffalo ★ 8424 580 APPLICATION

This repository is the core library of the Buffalo web framework for Go. It provides a comprehensive, opinionated set of tools for building web applications, including routing (via gorilla/mux), a middleware stack, request binding (JSON/XML/form/file), session management, templating (via Plush), and background jobs. The codebase is well-structured, clean, and thoroughly tested. Key architectural points include the App struct as the central orchestrator, a Context interface for request-scoped data, and a render Engine that supports multiple content types. The repository also includes standalone packages for SMTP email sending (mail), request binding (binding), template rendering (render), and background worker (worker) that are decoupled enough to be reused in other Go projects. The project is actively maintained with recent commits and CI.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
thoughtbot/factory_bot ★ 8167 2554 APPLICATION

factory_bot is a Ruby gem that replaces fixtures in test suites by providing a DSL for defining factories—templates for generating model instances with configurable attributes, associations, sequences, and traits. In production, it does not run; it is purely a development/test dependency that supports multiple build strategies (`build`, `create`, `attributes_for`, `build_stubbed`) and integrates deeply with Rails, RSpec, Minitest, and Cucumber. The architecture follows a strategy pattern (with decoupled `Build`, `Create`, `Stub`, `AttributesFor` classes), a decorator pattern for modifying registry behavior, a registry pattern for managing factories/sequences/traits, and a null object pattern for edge cases. Key entry points are `FactoryBot.define`, `FactoryBot.build`, `FactoryBot.create`, and the `FactoryBot.lint` validator. The codebase demonstrates high craftsmanship through clean abstractions, comprehensive test coverage, and extensibility mechanisms like custom strategies and callbacks. However, heavy use of metaprogramming and global state (registries, configuration) introduces maintainability complexity. Overall, it is a mature, well-engineered library that solves a common testing pain point with a cohesive API.

RATING: 9.2/10 MAINT: active DRIFT: low
â–¸ 3 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
shakacode/shakapacker ★ 489 108 APPLICATION

Shakapacker is a bridge to webpack or Rspack for Rails apps, supporting both webpack 5 and Rspack builds. It provides features like code splitting, Hot Module Replacement (HMR), CDN asset hosts, Subresource Integrity, and HTTP 103 Early Hints. The repository is well-maintained with a clear structure and documentation.

RATING: 9.2/10 MAINT: maintained DRIFT: low
â–¸ 2 reusable components found
carrierwaveuploader/carrierwave ★ 8769 1643 APPLICATION

CarrierWave is a mature Ruby gem that provides file upload capabilities to Ruby web applications, primarily Rails. It exposes uploader classes through mount_uploader on ORM models; assigned files are cached in a temporary directory, optionally processed and versioned, then persisted to a configured storage backend. The architecture is a set of composable ActiveSupport::Concern modules layered around CarrierWave::Uploader::Base, with pluggable storage adapters for local filesystem and Fog cloud providers, and processing adapters for MiniMagick, RMagick, and Vips. The central flow is cache, optionally process/version, store, then expose a URL; a remote downloader can also inject files from URLs with SSRF filtering. Production behavior is backed by a large RSpec suite and Cucumber features. It supports single and multiple uploads, metadata columns, direct-to-cloud uploads, cache cleanup, and ActiveRecord callbacks including after_commit deletion and rollback handling. External dependencies are limited to ActiveSupport/ActiveModel, Marcel for MIME detection, ssrf_filter for download safety, and optional Fog/image processor gems. This is not a standalone application or service; it is embedded into host applications as a library dependency. Maintenance is active, with ongoing 4.0.0.rc development and a Rails version matrix. Technical drift is moderate: the codebase still supports Ruby 2.7, contains a permissive RuboCop configuration, legacy scripts, and several deprecation layers, but the core abstractions are current and extensively tested.

RATING: 9.0/10 MAINT: active DRIFT: medium
â–¸ 5 reusable components found
mbleigh/acts-as-taggable-on ★ 4987 1191 APPLICATION

ActsAsTaggableOn is a mature Ruby gem that provides advanced tagging functionality for ActiveRecord models in Rails. It allows models to be taggable on multiple named contexts (e.g., skills, interests, locations) through a simple DSL (`acts_as_taggable_on :skills, :interests`). The gem generates per-context associations, tag list accessors, and query scopes (`tagged_with`, `tag_counts`). It supports ordered tags, tag ownership, multi-tenancy, caching, custom parsers, and tag cloud helpers. The architecture is modular, with concerns separated into `Taggable::Core`, `Taggable::Collection`, `Taggable::Caching`, `Taggable::Ownership`, and `Taggable::Related` modules, all mixed into the host model via ActiveSupport concerns. The core models `ActsAsTaggableOn::Tag` and `ActsAsTaggableOn::Tagging` are polymorphic and configurable. Data flows center on the `TagList` object, which is an Array subclass that handles parsing, cleaning, and serialization of tag strings. Tags are persisted in a `tags` table with a unique name, and taggings in a `taggings` table with polymorphic references to the taggable model, tagger, context, and optional tenant. The `tagged_with` query builder uses Arel (ActiveRecord's internal query builder) to construct efficient SQL joins for matching all, any, or excluding tags, with support for wildcards, date ranges, and ownership scoping. External dependencies are minimal: ActiveRecord (>= 8.0, < 9.0) and zeitwerk for autoloading. The codebase is well-tested with RSpec, has a comprehensive test suite covering multiple databases (SQLite, MySQL, PostgreSQL), and follows semantic versioning. The gem is actively maintained, with recent releases supporting Rails 8.0/8.1 and Ruby 3.3+. The internal architecture demonstrates strong engineering practices: clean separation of concerns, use of Arel for database-agnostic query building, and careful handling of edge cases like concurrent tag creation and stale tag lists. Several components, such as the `TagList` class and the `DefaultParser`, are self-contained and could be extracted for use in other projects.

RATING: 9.0/10 MAINT: active DRIFT: low
â–¸ 2 reusable components found
RubyMoney/money-rails ★ 1890 386 APPLICATION

money-rails is a Ruby gem that integrates the RubyMoney library with Rails, providing a `monetize` macro for ActiveRecord and Mongoid models. It allows developers to map integer cents columns (e.g., `price_cents`) to Money objects, handling currency conversions, validation, formatting, and serialization. The gem includes migration helpers, a custom ActiveModel validator, ActionView helpers, an ActiveJob serializer, test helpers, and configuration for global currency defaults and rounding modes. It supports multiple Rails versions (7.0–8.1), Mongoid 7–9, and Ruby >= 3.1. The codebase is well-structured, extensively tested, and follows Rails plugin conventions with clean separation of concerns.

RATING: 9.0/10 MAINT: active DRIFT: low
â–¸ 4 reusable components found
huginn/huginn ★ 50025 4305 APPLICATION

Huginn is a self-hosted, hackable automation platform built as a Ruby on Rails application. It allows users to create and chain 'agents' that monitor, scrape, transform, and act on data from hundreds of sources (web, RSS, email, Twitter, Telegram, Slack, OpenAI, etc.) via an event-driven architecture. Agents are polymorphic Ruby classes with a consistent lifecycle: scheduled checks, event reception, and event emission. The system supports Liquid templating for dynamic configuration, OAuth services, file pointers, and background job processing via DelayedJob. The codebase is extensive with 80+ agent types, reusable concerns (WebRequestConcern, LiquidInterpolatable, FormConfigurable), and a comprehensive test suite. While primarily an application, it includes a small research dataset (ANEW sentiment norms) used by a sentiment analysis agent, but the dominant character is clearly a production automation service.

RATING: 8.9/10 MAINT: active DRIFT: medium
â–¸ 5 reusable components found
$ loading more...
$ submit: