ASAnmol Shrestha
← All projects
Platform2023

Bansha

A collaborative genealogy management platform where families document their lineage — an interactive family tree, member profiles, and privacy-aware sharing across generations.

BAbansha.org
0+family trees created
0k+members documented
0deepest recorded lineage (gen)
0sfull-tree render (3k members)

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.

MY ROLEFull stack developer & product design
TIMELINE5 months to launch, ongoing
STACK
Next.jsTypeScriptNode.jsPostgreSQLPrismaVercel

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.

ClientNext.js App Router · canvas-based tree renderer · optimistic edits
APINode.js + Prisma · relationship graph service · invite & permission engine
DataPostgreSQL · closure-table + recursive CTEs for ancestry queries
InfraVercel edge deployment · ISR for public trees · image CDN for portraits

Challenges

Graph queries in a relational DB

Ancestry and “how are we related?” queries exploded combinatorially. A closure table plus recursive CTEs brought worst-case lookups from seconds to milliseconds.

Rendering huge trees

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.

Privacy between branches

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.

NEXT CASE STUDYZyabaa