Overview
Discover what makes webtrees powerful
**webtrees** is a PHP‑based, self‑hosted genealogy platform designed for collaborative editing of GEDCOM data. From a developer’s standpoint it is a full‑stack web application that exposes a rich API surface, adheres to modern PHP standards (PSR‑1/2/4/6/7/11/12/15/17), and bundles a modular plugin ecosystem. The core engine parses GEDCOM files into an internal object model, persists that model in a relational database (MySQL/MariaDB or PostgreSQL), and renders family trees, timelines, and charts through a Blade‑style templating system that can be overridden by custom themes.
Backend
Database
Frontend
Extensibility
Overview
webtrees is a PHP‑based, self‑hosted genealogy platform designed for collaborative editing of GEDCOM data. From a developer’s standpoint it is a full‑stack web application that exposes a rich API surface, adheres to modern PHP standards (PSR‑1/2/4/6/7/11/12/15/17), and bundles a modular plugin ecosystem. The core engine parses GEDCOM files into an internal object model, persists that model in a relational database (MySQL/MariaDB or PostgreSQL), and renders family trees, timelines, and charts through a Blade‑style templating system that can be overridden by custom themes.
Technical Stack & Architecture
- Backend: PHP 8.x with Composer‑managed dependencies. The application follows a Model–View–Controller pattern, where models map to GEDCOM entities (individuals, families, sources) and controllers handle HTTP requests via PSR‑7 request/response objects.
- Database: The schema is normalized to support large family trees; indexes on key columns (e.g.,
xref,name) enable fast lookups. The ORM layer is lightweight, using PDO with prepared statements and a custom caching strategy (PSR‑6). - Frontend: Vanilla JavaScript with semistandard linting, complemented by jQuery for legacy compatibility. CSS is modularized using SCSS; themes can be swapped without touching the core.
- Extensibility: A plugin manager loads modules from a
modules/directory. Each module declares hooks (e.g.,onGedcomImport,onUserLogin) and can register new routes, services, or JavaScript bundles. The plugin API is documented in PHPDoc and exposed via the developer portal.
Core Capabilities & APIs
- GEDCOM Import/Export: Programmatic access to import/export routines, including validation against the GEDCOM 7.0 spec.
- RESTful Endpoints: A set of JSON endpoints (
/api/v1/individuals/{id}) that return the internal representation, enabling integration with external services or mobile clients. - Event Hooks: Developers can tap into lifecycle events (e.g.,
afterRecordSave) to trigger side effects such as updating a search index or notifying third‑party APIs. - Search & Indexing: A full‑text search layer powered by MySQL’s
FULLTEXTindexes or an optional ElasticSearch integration for large datasets. - Permissions & Collaboration: Role‑based access control is configurable per tree, allowing fine‑grained editing rights and audit trails.
Deployment & Infrastructure
webtrees runs on any LAMP/LEMP stack that supports PHP 8.x and a supported database. It can be containerized with Docker; the official webtrees:latest image includes Apache, PHP, and the necessary extensions. For scalability, developers can:
- Deploy behind a reverse proxy (NGINX) with HTTPS termination.
- Use read replicas for the database to offload search queries.
- Cache static assets via a CDN and PHP OPcache for opcode caching.
The application’s configuration is file‑based (config.php) but can be overridden by environment variables, making it suitable for CI/CD pipelines.
Integration & Extensibility
The plugin system is the primary integration point. Modules can register:
- Custom Routes: Adding new UI pages or API endpoints.
- Services: Implementing interfaces such as
Webtrees\Interfaces\SourceInterfaceto pull data from external genealogical APIs. - Webhooks: Exposing outbound events that third‑party services can subscribe to (e.g.,
onIndividualUpdated). - Themes: Overriding Twig/Blade templates to change the look and feel without touching core code.
Because webtrees adheres strictly to PSR standards, developers can mix in any third‑party PHP library (e.g., Guzzle for HTTP clients) with minimal friction.
Developer Experience
- Documentation: A comprehensive README, API reference, and coding‑style guidelines are maintained in the repository.
- Community: An active GitHub issue tracker, a dedicated Discord channel, and regular release notes foster rapid feedback.
- Testing: The codebase is covered by PHPUnit tests, and continuous integration ensures that new commits do not break existing functionality.
- Licensing: The GPLv3 license encourages open‑source contributions while protecting the core from proprietary forks.
Use Cases
- Family History Organizations: Host a shared tree where multiple researchers can edit records, attach media, and generate printable charts.
- Genealogical SaaS Providers: Wrap webtrees in a multi‑tenant architecture, expose the REST API to client apps, and offer custom themes per brand.
- Academic Research Projects: Import large GEDCOM dumps, run custom analytics via plugins, and publish results through the built‑in reporting tools.
- Personal Archives: Deploy locally on a NAS or Raspberry Pi, sync GEDCOM files from desktop tools, and keep an offline, self‑hosted backup.
Advantages for Developers
- Performance: PHP 8’s JIT and the lightweight ORM keep response times low even for thousands of records.
- Flexibility: Full control over the data model, UI, and deployment environment.
- Extensibility: A robust plugin API means you can add almost any feature without touching core code.
- Community & Support: Regular updates, a mature code
Open SourceReady to get started?
Join the community and start self-hosting webtrees today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Black Candy
Self-hosted music streaming for your personal library
Input
Self-hosted, no-code form builder for brandable surveys
MyIP
All‑in‑one IP and network diagnostics tool
OctoBot
Open-source, customizable crypto trading bot with evolution and strategy optimization.
piqueserver
Self-hosted other
Loomio
Collaborative decision-making for groups and organizations