A genealogy toolkit for creating local databases of your family tree, curating favorites, and generating sparse family tree visualizations.
This project is a web-based UI enhancement that evolved from the creator's early explorations into learning more about his ancestry using a CLI-based tool: FamilySearchFinder.
SparseTree connects to genealogy providers (FamilySearch, Ancestry, WikiTree, 23andMe) to download and store your ancestry data locally. Once you have your data, you can:
- Validate Data: Detect cyclic loops, date inconsistencies, and other data quality issues
- Curate Favorites: Mark interesting ancestors with notes (royalty, immigrants, founders, etc.)
- Generate Sparse Trees: Visualize only your selected favorites connected through their lineage
- Cross-Reference: Link people to multiple genealogy platforms and Wikipedia
Most family tree visualizations become overwhelming quickly - 10 generations means over 1,000 direct ancestors. SparseTree lets you curate the most interesting people and visualize just those connections.
- Node.js 18+
- A FamilySearch account
git clone https://github.com/atomantic/SparseTree.git
cd SparseTree
npm install
npm run build- Log into FamilySearch
- Open browser dev tools (F12) → Network tab
- Copy the Authorization header value (without "Bearer" prefix)
FS_ACCESS_TOKEN=YOUR_TOKEN node index YOUR_PERSON_ID --max=10pm2 start ecosystem.config.cjs- Frontend: http://localhost:6373
- Backend: http://localhost:6374
| Feature | Description |
|---|---|
| Local Database | Download and store ancestry data as JSON + SQLite |
| Multiple Providers | FamilySearch, Ancestry, WikiTree, 23andMe |
| Path Finding | Find shortest/longest/random paths between ancestors |
| Data Export | TSV for spreadsheets, GEDCOM for other software |
| Favorites | Tag and annotate interesting ancestors |
| Sparse Tree | D3.js visualization of favorites only |
| Ancestry View | FamilySearch-style expandable pedigree |
| Document | Description |
|---|---|
| docs/cli.md | CLI command reference |
| docs/architecture.md | Data model and storage |
| docs/api.md | API endpoint reference |
| docs/development.md | Development setup |
| docs/providers.md | Provider configuration |
| PLAN.md | Development roadmap |
# Download ancestry (up to 10 generations)
FS_ACCESS_TOKEN=TOKEN node index PERSON_ID --max=10
# Find path between two people
node find ROOT_ID ANCESTOR_ID --method=s # shortest
node find ROOT_ID ANCESTOR_ID --method=l # longest (detects cycles)
# Export to TSV
node tsv DB_ID
# Rebuild database after code updates
node rebuild DB_IDSee docs/cli.md for all commands and options.
FamilySearch is a collaborative database. Be aware:
- Cyclic Loops: People can be linked as their own ancestors. Use
--method=lto detect. - Questionable Links: Deep ancestry (pre-1500s) often contains speculative connections.
- User Contributions: Anyone can edit. Verify important connections with primary sources.
./update.sh # Pull, build, migrate, restart
./update.sh --dry-run # Preview changesISC