# etrepat/baum

Baum is an implementation of the Nested Set pattern for Laravel's Eloquent ORM.

Repository: https://github.com/etrepat/baum
Canonical: https://ross.abutalabs.com/products/baum
Homepage: http://etrepat.com/baum
Language: PHP
License: MIT
License Family: permissive
Last push: 2024-06-11T18:02:31+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4869, "days_push": 813, "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 2223, forks 450 (observed 2026-08-28T04:06:27.841196+00:00)

## What it is
Baum is a PHP library implementing the Nested Set pattern for Laravel's Eloquent ORM, enabling efficient storage and querying of hierarchical tree data. It handles the complex SQL for insertions, moves, and deletions behind the scenes, allowing fast non-recursive queries on ordered trees.

## Use cases
- store hierarchical categories in Laravel with fast descendant queries
- build ordered menu trees with Eloquent models
- manage threaded comments or forum posts efficiently
- query all descendants of a node in a single SQL query
- implement nested set tree structures in a Laravel app

## When to choose
- you use Laravel's Eloquent and need ordered tree data with fast reads
- your trees are large and queried frequently, e.g. menus or category trees
- you want insert/move/delete complexity handled for you

## When to avoid
- you are not using Laravel or Eloquent
- your data is write-heavy with frequent tree restructuring
- you only need simple parent-child relations without ordered traversal

## Facets
- artifact type: library
- maturity: maintenance
- function: orm, database
- domain: web-development, databases, developer-tools
- platform: php
- tags: laravel, eloquent, nested-set, hierarchical-data, tree-structure, web-server

## Member repositories
- etrepat/baum (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:27.841196+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:45:01.781118+00:00, confidence not recorded.
  - readme: https://github.com/etrepat/baum (fetched 2026-08-28T04:06:27.841196+00:00, sha 499388fa69ac)
  - homepage: http://etrepat.com/baum (fetched 2026-08-29T10:25:34.743867+00:00, sha cf7be0641194)
- Data as of 2026-08-30T08:39:29.467469+00:00.
