A private, self-hosted family tree and archive. Your family's story, on your terms.
Or with Docker:
git clone https://github.com/tymrtn/family-book.git && cd family-book
cp .env.example .env # Edit with your values
docker compose up -d
# Open http://localhost:8000→ family-book-production.up.railway.app
Browse a demo family tree with seed data. No sign-up required to explore. This is a live instance running the latest main branch with a fictional demo family so you can see what Family Book looks like before deploying your own.
Every photo you upload, every conversation you have, every relationship you map on a platform becomes training data for AI models. Your grandmother's recipe in a WhatsApp group is feeding a neural network right now. You agreed to it in a terms update you never read.
Platforms change without asking. WhatsApp rewrites its privacy policy. Instagram kills features. Ancestry gets acquired. Your data follows the corporate roadmap, not yours.
Governments block platforms overnight. Russia restricted Telegram and WhatsApp. Families who kept their archives on those services lost access with no warning. If your country bans the app, your memories go dark.
Your family's data has real value. Today you give it away for free. As personal data licensing matures, you will want to decide who accesses it and on what terms. You can't license what you don't control.
A SQLite file on your own server outlives every startup, every acquisition, every terms-of-service change. No subscription to lapse. No company to shut down. Your great-grandchildren can open it in 50 years.
Family Book gives you that file.
Every family has a story. Photos on someone's phone. Names nobody remembers. A great-grandmother's maiden name lost because nobody wrote it down. A voice note from a grandparent, sitting in a WhatsApp chat that'll be deleted when the phone dies.
Family Book exists because your family's history shouldn't depend on a cloud service's business model.
- No subscription. Deploy once, run forever.
- No data mining. Your family photos don't train anyone's AI.
- No platform risk. You own the server, the database, the files. Move them anytime.
- No walled garden. Standard SQLite database. Export everything.
| Family Book | Ancestry.com | FamilySearch | MyHeritage | |
|---|---|---|---|---|
| Who owns your data? | You. Forever. | Ancestry Inc. | LDS Church | MyHeritage Ltd. |
| Self-hosted | ✅ | ❌ | ❌ | ❌ |
| Free forever | ✅ | ❌ ($299/yr) | ✅ (limited) | ❌ |
| Own your data | ✅ SQLite file | ❌ | ❌ | ❌ |
| Privacy by default | ✅ | ❌ DNA selling | ❌ | ❌ |
| WhatsApp import | 🚧 Planned | ❌ | ❌ | ❌ |
| Multi-language | ✅ en/es/ru | Partial | ✅ | Partial |
| Open source | ✅ MIT | ❌ | ❌ | ❌ |
A D3.js-powered tree visualization with branches, partnerships, and multi-generational navigation. Click any person to see their profile, relationships, and photos.
Birth dates (with fuzzy precision — "about 1943" is valid), locations, languages spoken, patronymics, maiden names, nicknames. Every culture's naming conventions respected. Parent-child subtypes: biological, adoptive, step, foster, guardian.
Upload photos and documents. SHA-256 dedup means the same photo uploaded twice takes no extra space. Every file served through authenticated endpoints — no public URLs to your family photos.
A family timeline. First steps. Weddings. Graduations. That Tuesday when grandpa told the story about the war. Each moment has comments and emoji reactions. Sort by date, filter by person, search by keyword.
No access control lists. No admin panels for permissions. The family tree structure IS the permission system. Graph distance determines what you can see. Close family sees everything. Distant relatives see less. It's how privacy works in real families.
English, Spanish, Russian out of the box. Add any language with a JSON file. Names render in their native script — Бабушка Юки stays Бабушка Юки.
Install on your phone. Works offline for browsing. Feels native. No app store required.
Daily SQLite backups to the persistent volume. Restore with one command. Your database is a single file — copy it anywhere.
git clone https://github.com/tymrtn/family-book.git
cd family-book
cp .env.example .env # Edit with your values
uv sync # Install dependencies
uv run alembic upgrade head # Create database
uv run python -m app.seed # Load demo family (optional)
uv run uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadOpen localhost:8000. You'll see the landing page. Register, add your first family member, start building.
# Install Railway CLI: https://docs.railway.com/guides/cli
railway login
railway init --name family-book
railway up
railway domain # Get your public URLSet environment variables:
SECRET_KEY=<generate with: python3 -c "import secrets; print(secrets.token_hex(32))">
FERNET_KEY=<generate with: python3 -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())">
DATABASE_URL=sqlite:///data/family.db
DATA_DIR=data
BASE_URL=https://your-app.up.railway.app
docker compose up -dThe docker-compose.yml includes the app, persistent volume for /data, and optional Matrix bridge for WhatsApp/Messenger import.
| Layer | Technology | Why |
|---|---|---|
| Backend | Python 3.12 + FastAPI | Async, type-safe, great for APIs |
| Database | SQLite (WAL mode) | Single file, zero config, fast |
| ORM | SQLAlchemy 2.0 + Alembic | Async support, migrations |
| Frontend | Jinja2 + HTMX | Server-rendered, no build step, instant interactivity |
| Tree | D3.js | The gold standard for data visualization |
| Auth | Magic links (passwordless) | No passwords to forget or leak |
| Media | Local filesystem + SHA-256 dedup | Simple, reliable, deduplicated |
| i18n | JSON locale files | Easy to add languages |
| Deploy | Docker + Railway | One-click cloud or self-hosted |
Family Book is deliberately not a SPA. Server-rendered HTML + HTMX gives you:
- No build step (no webpack, no node_modules, no 200MB of JavaScript tooling)
- Works without JavaScript (graceful degradation)
- Instant page loads (HTML is fast)
- Easy to understand (read the template, see the page)
HTMX handles the interactive bits: inline editing, live search, modal dialogs. D3.js handles the tree. That's it.
app/
├── main.py # FastAPI app + startup
├── config.py # Settings from environment
├── models/ # SQLAlchemy models
│ ├── person.py # Person, with all name variants
│ ├── relationships.py # ParentChild, Partnership
│ ├── media.py # Media files + metadata
│ ├── moments.py # Timeline events
│ └── auth.py # Users, sessions, magic links
├── routes/ # API + page routes
│ ├── persons.py # CRUD + search
│ ├── relationships.py # Add/remove connections
│ ├── tree.py # Tree data endpoint for D3
│ ├── media.py # Upload + authenticated serving
│ └── moments.py # Timeline CRUD
├── services/ # Business logic
├── templates/ # Jinja2 + HTMX pages
│ ├── base.html # Layout with nav
│ ├── tree.html # D3 tree visualization
│ ├── person.html # Profile page
│ ├── people.html # People grid
│ └── partials/ # HTMX fragments
├── static/ # CSS, JS, D3 config
├── importers/ # WhatsApp, Messenger, GEDCOM (planned)
└── matrix/ # Matrix bridge integration (planned)
data/ # Persistent volume
├── family.db # SQLite database
├── media/ # Uploaded files
└── backups/ # Daily backups
locales/ # i18n: en.json, es.json, ru.json
Siblings are derived, not stored. Two people who share a parent are siblings. No explicit sibling table — the relationship is computed from parent-child links. This prevents impossible states (A is B's sibling but B is not A's).
Partnerships, not marriages. The Partnership model supports married, domestic_partner, engaged, separated, divorced, widowed, and other. No gender constraints. Same model for every relationship type.
Fuzzy dates. Not everyone knows their grandmother's exact birthday. birth_date_raw stores what the family member actually said ("about 1943", "spring 1967"). birth_date_precision indicates year/month/day confidence.
Source tracking. Every Person, relationship, and media file has a source field: manual, gedcom_import, whatsapp, messenger, email. When you import from WhatsApp in 2026, the fact that "this photo came from WhatsApp" is preserved forever.
Family Book isn't just a family tree app. It's the private social network your family actually needs.
Your family's memories are scattered across platforms that don't care about your family:
- WhatsApp — Photos and voice notes buried in group chats. Phone dies, memories die.
- Facebook — Your family photos train their AI. Your grandmother's face is in a dataset.
- iCloud/Google Photos — Shared albums with no context. Who is this person? What year was this?
- Ancestry.com — $299/year to see your own family tree. Your DNA sold to insurance companies.
- Physical albums — Rotting in a closet in Portland. One flood away from gone.
A single place where:
-
Every family memory flows in automatically. WhatsApp photos arrive via Matrix bridge. Email forwards get parsed. Old scanned photos get uploaded with dates and context.
-
The family tree IS the permission system. Your cousin in Tokyo sees different things than your neighbor. No admin panel needed — closeness in the tree determines closeness in access. This is how privacy works in real families.
-
Multiple families share one instance. The Riveras and the Santoss on the same server, each seeing their own branch, with the shared grandchildren in the middle. Install once, serve the whole extended family.
-
Every fact has provenance. "Grandma was born in 1943" — who said that? When? Was it from a GEDCOM import, a WhatsApp message from Aunt Yuki, or a birth certificate scan? Source tracking on every piece of data.
-
It works for every culture. Patronymics (Russian), maiden names (Western), Eastern name order (Japanese), fuzzy dates ("about 1943"), and relationship labels that respect the actual complexity of modern families — step-parents, adoptive parents, guardians, domestic partners.
-
It survives you. SQLite database. Single file. Copy it to a USB drive. Your great-grandchildren can open it in 50 years with any programming language on any platform. No vendor lock-in. No subscription to expire. No company to go bankrupt.
The biggest technical challenge is importing from messaging platforms. WhatsApp, Messenger, and iMessage don't offer easy APIs for personal data export. The current architecture uses Matrix bridges (Mautrix) to connect to these platforms using your own account — no business verification needed.
But for non-technical families, setting up Matrix bridges is unrealistic. A potential path: a hosted bridge service (like a "Family Book Connector") that handles the Twilio/WhatsApp Business API complexity, pre-approved for personal family use. One-click enable, and your family's WhatsApp photos flow into your Family Book automatically.
This is an unsolved problem in the self-hosted space. Whoever solves it unlocks a massive market of families who want to own their data but can't navigate API onboarding.
- Phase 1 — Core models, API, tests (45/45 green)
- Phase 2A — Media gallery, Moments timeline, Comments, Reactions
- Phase 2B — HTMX frontend: tree, profiles, people grid, media, moments, auth
- Phase 3 — Docker, automated backup, i18n, PWA, security middleware
- Phase 4 — WhatsApp import via Matrix/Mautrix bridge
- Phase 5 — GEDCOM import/export (compatibility with Ancestry, FamilySearch)
- Phase 6 — Facebook/Messenger photo import
- Phase 7 — Push notifications, email digests
- Phase 8 — Advanced search, timeline filtering, family statistics
Family Book is MIT licensed. Contributions welcome! See CONTRIBUTING.md for full details on setting up your dev environment, running tests, and submitting PRs.
make dev # Start dev server with auto-reload
make test # Run the test suite
make seed # Load demo data
make migrate # Run database migrationsPlease read CLAUDE.md for architecture rules before submitting PRs.
Q: Can I import from Ancestry/FamilySearch/MyHeritage? GEDCOM import is on the roadmap. GEDCOM is the standard format — export from any platform, import into Family Book.
Q: What about DNA/genetic data? Not planned. Family Book is about stories, photos, and relationships — not genetics. There are better tools for that.
Q: Can multiple family members use it? Yes. Magic link auth means anyone with an email can log in. The tree structure determines what they see.
Q: How do I back up?
Automated daily backups run via cron. The database is a single SQLite file at /data/family.db. Copy it anywhere. Restore by replacing the file and running migrations.
Q: Is there a hosted version? Not yet. Self-hosted only. If there's demand, a hosted option may come later.
Family Book is part of The Sovereign Stack — a portfolio of tools for personal data sovereignty. Own your lineage, your email, your content, and your physical footprint. Stop renting your digital life.
MIT — do whatever you want with it.
Built with love for Mia. 🌙