# collectiveidea/awesome_nested_set

An awesome replacement for acts_as_nested_set and better_nested_set.

Repository: https://github.com/collectiveidea/awesome_nested_set
Canonical: https://ross.abutalabs.com/products/awesome_nested_set
Language: Ruby
License: MIT
License Family: permissive
Last push: 2026-04-27T18:46:21+00:00

## Health v2 (maintenance only)
Score: 58/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 79, release rhythm 8, longevity 100
- inputs: {"age_days": 6768, "days_push": 128, "days_rel": 657, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2411, forks 489 (observed 2026-08-28T04:06:44.390988+00:00)

## What it is
A Ruby gem implementing the nested set pattern for ActiveRecord models, serving as a modern replacement for acts_as_nested_set and BetterNestedSet. It manages hierarchical tree data in relational databases using lft/rgt/parent_id columns with configurable options and STI support.

## Use cases
- store hierarchical categories in rails
- manage tree structures in activerecord
- replace acts_as_nested_set
- query nested set hierarchies in ruby
- model parent-child relationships in a database
- implement nested comments or menus in rails

## When to choose
- you use ActiveRecord/Rails and need hierarchical tree data with efficient subtree queries
- you want a maintained, bug-fixed replacement for acts_as_nested_set or BetterNestedSet
- you need STI support or configurable column names for nested sets

## When to avoid
- you use a non-Ruby or non-ActiveRecord stack
- you only need shallow parent-child relations where a simple parent_id with adjacency lists suffices
- your data changes very frequently, since nested sets are costly to update

## Facets
- artifact type: library
- maturity: stable
- function: orm, database
- domain: databases, web-development, developer-tools
- platform: ruby, jvm
- tags: nested-set, activerecord, rails, hierarchical-data, tree-structure, gem

## Member repositories
- collectiveidea/awesome_nested_set (main) score 58

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:44.390988+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-30T02:33:57.950711+00:00, confidence not recorded.
  - readme: https://github.com/collectiveidea/awesome_nested_set (fetched 2026-08-28T04:06:44.390988+00:00, sha 249ce2ed24d9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
