MCPSERV.CLUB
webtrees

webtrees

Self-Hosted

Collaborative online genealogy platform for family tree management.

Active(91)
657stars
0views
Updated 4 days ago

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 FULLTEXT indexes 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\SourceInterface to 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

  1. Family History Organizations: Host a shared tree where multiple researchers can edit records, attach media, and generate printable charts.
  2. Genealogical SaaS Providers: Wrap webtrees in a multi‑tenant architecture, expose the REST API to client apps, and offer custom themes per brand.
  3. Academic Research Projects: Import large GEDCOM dumps, run custom analytics via plugins, and publish results through the built‑in reporting tools.
  4. 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

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
GPL-3.0
Stars
657
Technical Specs
Pricing
Open Source
Database
MySQL
Docker
Community
Supported OS
LinuxWindowsmacOSDocker
Author
fisharebest
fisharebest
Last Updated
4 days ago