Bansha
A collaborative genealogy management platform where families document their lineage — an interactive family tree, member profiles, and privacy-aware sharing across generations.
Overview
Bansha (“lineage” in Nepali) digitizes family genealogies that traditionally live in the memory of elders and fragile paper records. Families build a shared, living family tree with rich member profiles, life events, and controlled visibility between branches.
The problem
Family history was scattered across handwritten records and oral accounts, and it disappeared a generation at a time. Existing genealogy tools were Western-centric, subscription-heavy, and had no concept of the extended-family structures and naming conventions the community actually uses.
The solution
I designed and built an interactive tree editor that handles thousands of members per family: pan-and-zoom navigation, branch collapsing, and inline editing. Relationship data is modeled as a graph over PostgreSQL, with recursive CTEs powering ancestry queries, relationship path-finding, and generation numbering. Branch-level permissions let distant relatives contribute without seeing private records.
Architecture
Next.js App Router with server components for tree rendering at depth, and a Node.js service layer over PostgreSQL. The tree is a graph problem wearing a relational costume — recursive CTEs do the heavy lifting.
Challenges
Ancestry and “how are we related?” queries exploded combinatorially. A closure table plus recursive CTEs brought worst-case lookups from seconds to milliseconds.
DOM-based rendering died past a few hundred nodes. I moved the tree to a virtualized canvas renderer with level-of-detail — names appear as you zoom in.
Families wanted to share the tree but not everything in it. Branch-scoped permissions with per-field visibility took several modeling iterations to get right.
Lessons learned
Model the domain honestly — forcing graph data into naive parent-child rows costs you later.
Performance is a feature: the canvas renderer is the single most praised part of the product.
Community software lives or dies on trust; privacy controls deserve first-class design time.