A self-hostable family tree app with an interactive visualizer, AI bio writing, smart record import, and grounded family narratives. Free Gemini built in — or plug in your own OpenAI, Anthropic, GLM, or Kimi key. API keys are encrypted at rest with AES-256-GCM. Your data stays in your Postgres.
Built around a fast, draggable tree, real AI helpers, and a refreshing absence of subscription dialogs.
Pan, zoom, and drag any node. Toggle between descendants and ancestors. Search to jump to anyone in your tree instantly.
Generate a respectful, grounded biography for any person from the basics you've recorded — names, dates, places.
Paste an obituary or a sentence and the AI extracts a structured person record — name, gender, dates, places — ready to add.
Pick a focus person and get a 350–600 word narrative woven from your records — strictly grounded, no fabrication.
Built-in Google Gemini for the fastest start, plus OpenAI, Anthropic, Zhipu GLM, and Moonshot Kimi via your own API key.
Your provider keys are encrypted with AES-256-GCM, bound to your user via AAD, and decrypted only at the moment of an LLM call.
Clerk-powered auth out of the box. Admins can invite collaborators by email (optional AgentMail integration).
Download your tree as a standard GEDCOM file at any time. Take it to any other genealogy program — no lock-in.
Your records live in the Postgres of your choice — Replit, Neon, Supabase, or your own server. Standard schema, no exotic ORM.
All AI calls are dispatched from the server. Your provider API keys never reach the browser bundle, and the only place they're decrypted is the exact moment we're about to make an LLM request on your behalf.
Authenticated encryption from Node's built-in crypto. Each ciphertext is bound to (userId, provider) via AAD — rows can't be shuffled between users or providers.
Every /api/ai/* route sits behind Clerk authentication. The browser never sees provider keys, only the model's response.
Settings reads return booleans. Decryption fires once per request, immediately before the LLM call, and the plaintext is never logged or persisted.
On startup the server runs an encrypt → decrypt round-trip and logs a loud, unmissable error if the master key is missing or wrong, so misconfiguration never goes unnoticed.
Standard Node.js + Postgres. No Docker required. Five env vars and you're up.
Node.js 20+ and a Postgres URL is all you need. Vite handles the dev server.
Clerk for auth, a Postgres URL for storage, a Gemini key for the built-in AI default. Everything else is optional.
One command runs the Express + Vite server on port 5000. Schema is bootstrapped automatically on first boot.
Sign in, add a few people, and (optionally) wire up AgentMail to send invite emails to relatives.
# 1. Clone the repo git clone https://github.com/nzicecool/FamliyTreeAI.git cd familytreeai # 2. Install dependencies npm install # 3. Set environment variables export DATABASE_URL="postgres://user:pw@host/db" export CLERK_SECRET_KEY="sk_…" export VITE_CLERK_PUBLISHABLE_KEY="pk_…" export GEMINI_API_KEY="AIza…" # Optional export ENCRYPTION_KEY="$(openssl rand -base64 32)" export AGENTMAIL_API_KEY="…" # 4. Run it npm run dev # Open http://localhost:5000
| Variable | Required? | What it does |
|---|---|---|
| DATABASE_URL | Required | Postgres connection string for your tree, settings, and invites. |
| CLERK_SECRET_KEY | Required | Server-side Clerk key for verifying user sessions. |
| VITE_CLERK_PUBLISHABLE_KEY | Required | Client-side Clerk key for the sign-in UI. |
| GEMINI_API_KEY | Recommended | Powers the built-in AI default. Without it, only BYO providers work. |
| ENCRYPTION_KEY | Optional | Base64-encoded 32 bytes. If absent, derived deterministically from your Clerk secret. |
| AGENTMAIL_API_KEY | Optional | Sends invite emails when admins invite collaborators. |
Open source, self-hostable, and private by design. Set it up in a few minutes — no subscription, no upsell.