# mongomapper/mongomapper

A Ruby Object Mapper for Mongo

Repository: https://github.com/mongomapper/mongomapper
Canonical: https://ross.abutalabs.com/products/mongomapper
Homepage: http://mongomapper.com
Language: Ruby
License: MIT
License Family: permissive
Last push: 2025-12-31T13:50:05+00:00

## Health v2 (maintenance only)
Score: 59/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 60, release rhythm 35, longevity 100
- inputs: {"age_days": 6307, "days_push": 245, "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 1600, forks 380 (observed 2026-08-28T04:05:09.531234+00:00)

## What it is
MongoMapper is a Ruby object-document mapper (ODM) for MongoDB, providing Document and EmbeddedDocument models with keys, associations, validations, scopes, and querying. It integrates with Rails via Active Model and supports MRI and JRuby.

## Use cases
- persist Ruby objects in MongoDB
- define models with typed keys and embedded documents
- query MongoDB with a Ruby DSL and dynamic finders
- use MongoDB models in Rails or Sinatra apps
- add validations, callbacks, and timestamps to Mongo documents
- model one-to-many associations with embedded documents

## When to choose
- you're building a Ruby or Rails app backed by MongoDB
- you want a simple, extendable ODM with Active Model integration
- you need embedded documents and single collection inheritance
- you prefer explicit key definitions over schemaless models

## When to avoid
- you're using a relational database instead of MongoDB
- you prefer Mongoid, the more widely adopted Ruby MongoDB ODM
- you need an ORM with SQL migrations and joins
- your team wants a mapper with a very large community and ecosystem

## Facets
- artifact type: library
- maturity: active
- function: orm, database-driver, serialization
- domain: databases, web-development, backend
- platform: ruby, jvm
- tags: mongodb, ruby-gem, object-document-mapper, rails, active-model

## Member repositories
- mongomapper/mongomapper (main) score 59

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:09.531234+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-30T03:53:12.096020+00:00, confidence not recorded.
  - readme: https://github.com/mongomapper/mongomapper (fetched 2026-08-28T04:05:09.531234+00:00, sha 3a7e8dc876d7)
  - homepage: http://mongomapper.com (fetched 2026-08-29T11:24:26.265413+00:00, sha 69a61304dd96)
  - site_page: http://mongomapper.com/documentation (fetched 2026-08-29T11:24:26.274395+00:00, sha 13ad6a1dda49)
  - site_page: http://mongomapper.com/frequent-questions (fetched 2026-08-29T11:24:26.276202+00:00, sha 0ffae75cd24d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
