A browser-based family tree viewer that reads standard GEDCOM files and renders an interactive, navigable tree — no database or build step required.
Note
This version requires an email account and SMTP2GO API key to protect the site with passwordless magic-link authentication — keeping bots and scrapers away from your family data. If you want a simpler setup with no auth, the Simple Tree View release is a single self-contained file with no login required.
- Interactive tree — centered on any individual, showing grandparents, parents, siblings, spouses, and children at a glance
- Auto-selects a default person — opens the most-connected individual automatically when a file is loaded
- Click to navigate — click any person card to re-center the tree on them
- People panel — alphabetically sorted sidebar (by last name, then given name) with a live filter box; unknown surnames sort to the bottom; click any name to navigate
- Detail panel — vital records (birth, death, burial, christening), occupation, religion, residence, notes, and clickable relationship links
- Upcoming dates — scrollable panel showing birthdays and wedding anniversaries in the next 90 days; filters out people born more than 90 years ago who have no recorded death date
- Pan & zoom — drag to pan, scroll wheel or pinch to zoom, touch-friendly on mobile
- Magic-link authentication — passwordless email sign-in with a 3-digit code or click-to-verify link; 30-day sessions; rate-limited per IP
- Privacy-safe — GEDCOM files are gitignored and never leave your server
- PHP 7.4+ with
curlandiconvextensions (both bundled with PHP by default) - A web server (Apache with
mod_rewrite, orphp -S localhost:8000for local use)
-
Clone the repo:
git clone https://github.com/sanjayvsingh/familytree.git cd familytree -
Copy and fill in the config:
cp config.example.php config.php
Edit
config.phpwith your SMTP2GO API key, sender address, and (optionally) an email allowlist. -
Place your
.gedfiles in thegedcom/directory:mkdir gedcom cp /path/to/your/family.ged gedcom/
-
Start a local server:
php -S localhost:8000
-
Open
http://localhost:8000in your browser. You'll be prompted to sign in with your email before the tree loads.
The .htaccess in the project root enables mod_rewrite, sets security headers, enables gzip compression, and blocks direct access to auth/, cache/, and gedcom/. Make sure AllowOverride is enabled for the directory.
Shared hosting note: On first run PHP creates the auth/ directory. If it lands at mode 0700, Apache cannot traverse it and will return 403. Fix by setting auth/ and its subdirectories (tokens/, sessions/, rate/, logs/) to mode 755 in your file manager.
Parses GEDCOM 5.5.1 using a streaming line-by-line reader (handles large files without memory issues). Supported records and tags:
| Record | Tags parsed |
|---|---|
INDI |
NAME (with NPFX GIVN NICK SPFX SURN NSFX), SEX, BIRT DEAT BURI CHR BAPM CONF ADOP GRAD RETI EMIG IMMI (with DATE PLAC AGE), OCCU RELI RESI, NOTE, FAMS FAMC |
FAM |
HUSB WIFE CHIL, MARR DIV (with DATE PLAC), NOTE |
NOTE |
Inline and @xref@ pointer notes, with CONT/CONC continuation |
Encoding: UTF-8 (with BOM stripping), ANSI/Windows-1252, and ISO-8859-1 files are all handled automatically via the CHAR header tag.
Name parsing: Given names and surnames are extracted from the standard Name /Surname/ slash notation when GIVN/SURN sub-tags are absent.
familytree/
├── index.php # Entry point — auth guard, file picker, HTML shell
├── api.php # JSON API — session-gated, serves parsed GEDCOM data
├── auth.php # Auth endpoint — magic link request, code verify, logout
├── auth_lib.php # Auth library — tokens, sessions, rate limiting, email
├── login.php # Login UI — email + 3-digit code flow
├── gedcom_parser.php # Streaming GEDCOM 5.5.1 parser with two-tier caching
├── app.js # Tree layout, rendering, navigation, panels, upcoming dates
├── style.css # All styles (warm earth-tone theme, responsive)
├── config.example.php # Config template — copy to config.php and fill in
├── .htaccess # Apache rules — security headers, gzip, directory blocking
└── gedcom/ # Your .ged files go here (gitignored)
gedcom/,auth/,cache/, andconfig.phpare all gitignored- Token, session, and log files are written at mode 0600
- The
auth/directory has a deny-all.htaccessblocking direct HTTP access - All API endpoints require a valid session (Bearer token or
ft_sessioncookie) - Rate limiting: 5 auth attempts per IP per 10-minute window (applies to both magic-link requests and code verification)