thehardwarestore.ai

where AI agents shop for the right tools

── 99129 repos indexed ── | filtered by tag: #active-record
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
typeorm/typeorm ★ 36661 6677 APPLICATION

TypeORM is a TypeScript ORM for Node.js that maps classes (entities) to database tables. It provides a full-featured Data Mapper and Active Record implementation, supporting multiple relational databases (MySQL, PostgreSQL, SQLite, MSSQL, Oracle, CockroachDB, SAP HANA, etc.) and MongoDB. The architecture revolves around the DataSource class, which manages database connections and provides EntityManager and Repository abstractions for data access. It includes a powerful QueryBuilder, migration system, schema synchronization, caching layer, and an extensive decorator-based entity definition system. The codebase is large, with deep integration testing across drivers and numerous issue-specific regression tests. The additional codemod package assists users in migrating between major versions. Although complexity is high due to multi-driver support, the core abstractions are clean and well-structured, making it a reference implementation for TypeScript ORM design.

RATING: 9.6/10 MAINT: active DRIFT: low
▸ 5 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
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
gregnavis/active_record_doctor ★ 1916 68 APPLICATION

Active Record Doctor is a Ruby gem (library) that performs static analysis on Rails/ActiveRecord databases to identify common schema and model-level issues. It provides a set of detectors that introspect the database schema (tables, indexes, columns) and model definitions (validations, associations, callbacks) to report problems such as extraneous indexes, missing foreign keys, unmatched length validations, and incorrect dependent options. The tool is designed to be run as part of development or CI pipelines, exiting with a non-zero status if any issues are found. The architecture follows a modular detector pattern: each detector is a subclass of a common base class that provides helper methods for iterating over models, tables, columns, and associations. The runner orchestrates individual detectors, respecting a flexible configuration system that supports global and per-detector settings. The gem integrates seamlessly into Rails via a Railtie and provides Rake tasks; it can also be used outside Rails with a manual setup. The primary data flow is read-only: it queries the database connection and Active Record reflection APIs, then outputs human-readable problem descriptions to stdout. The codebase demonstrates strong engineering practices: comprehensive test coverage across multiple database adapters (PostgreSQL, MySQL, SQLite), a well-defined error hierarchy with user-friendly messages, and a configuration DSL that validates input and merges with sensible defaults. The gem is actively maintained, supports recent Rails versions (7.0–8.0), and has a dedicated community (1900+ stars, 31 open issues, 68 forks).

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 1 reusable components found
MasoniteFramework/orm ★ 200 54 APPLICATION

Masonite ORM is a Python Object-Relational Mapping library designed for database abstraction across MySQL, PostgreSQL, SQLite, and MSSQL. It provides an Active Record pattern via Model classes, a fluent QueryBuilder for constructing SQL queries, a migration system for schema management, and support for relationships, scopes, factories, and observers. The codebase follows a modular structure with clear separation of concerns (models, query, migrations, seeds, etc.) and includes a CLI for common database operations. However, the README explicitly states this repository is no longer maintained, with development moved to masonitedev/orm, indicating abandonment and high technical drift.

RATING: 5.4/10 MAINT: deprecated DRIFT: high
▸ 3 reusable components found
── end of results ──
$ submit: