# DmitryTsepelev/store_model

Work with JSON-backed attributes as ActiveRecord-ish models

Repository: https://github.com/DmitryTsepelev/store_model
Canonical: https://ross.abutalabs.com/products/store_model
Language: Ruby
License: MIT
License Family: permissive
Topics: ruby, rails, activerecord, json, hacktoberfest
Last push: 2026-08-20T12:43:15+00:00

## Health v2 (maintenance only)
Score: 76/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 35, longevity 100
- inputs: {"age_days": 2759, "days_push": 13, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1232, forks 109 (observed 2026-08-28T04:04:04.493272+00:00)

## What it is
StoreModel is a Ruby gem that wraps JSON-backed database columns (like jsonb) with ActiveModel-like classes using the Rails Attributes API. It lets you define typed attributes, validations, enums, and nested models for structured data stored inside a single JSON column.

## Use cases
- wrap jsonb column in a rails model with typed attributes
- validate data stored in a json column
- replace verbose hash access on json attributes with model objects
- define nested models for json attributes in activerecord
- keep json column logic out of the parent activerecord model

## When to choose
- you store structured, frequently-accessed data in a json/jsonb column in Rails
- you need validations, enums, or nested attributes for JSON-backed fields
- you want to follow single-responsibility by isolating JSON column logic in its own class

## When to avoid
- you only read a few simple keys from a JSON column with no logic around them
- your project is not Ruby on Rails / ActiveRecord based
- the data would be better served by a separate relational table or document database

## Facets
- artifact type: library
- maturity: active
- function: serialization, orm, json, form-handling
- domain: web-development, databases, developer-tools
- platform: ruby
- tags: activerecord, jsonb, activemodel, attributes-api, gem, rails

## Member repositories
- DmitryTsepelev/store_model (main) score 76

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:04.493272+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T08:22:19.211963+00:00, confidence not recorded.
  - readme: https://github.com/DmitryTsepelev/store_model (fetched 2026-08-28T04:04:04.493272+00:00, sha e4f851b76ff8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
