← Back to Home
Family Tree · In progress

A Family Tree App With a Layout Engine You Can Test

Solo Developer · SwiftUI + Swift Package · iOS · Sep 2026 – Present

Overview

An iOS app for mapping your family without feeling like you are operating database software. The tree is the main screen: you add relatives from the person you are looking at, and empty "ghost" slots show where a missing parent, partner, or child would go.

Real families are hard to draw. Remarriages, step-parents, adoptions, and partners who married in all have to land somewhere sensible, and an early version put a newly added father 482 points from his own son. So the project was rebuilt around a pure-Swift layout engine in its own package, tested without a simulator, with SwiftUI only drawing what the engine decides.

Status: the foundation and the structural rebuild are done. Now in progress: interaction refinements found on a phone, then the first release — your own tree instead of the built-in sample family, saved data, editing and undo, and accessibility.

Swift SwiftUI Swift Package Swift Testing iOS 26 Xcode

Problem & Solution

The Problem

  • Family tree apps feel like filling in database forms
  • Remarriages and step-families break simple tree layouts
  • Layout bugs only showed up by eye, in the simulator
  • One 1,640-line view file mixed drawing with family logic
  • Stored relationships drifted out of step with each other

The Solution

  • Add relatives from the tree itself, in human terms
  • A layout engine with explicit rules for partners and families
  • Golden layout tests that run in about a second
  • Family logic in a package that never imports SwiftUI
  • Store two relationships; derive everything else

Key Highlights

One Architectural Rule
Family logic never imports SwiftUI, and UI code never does family math; the root view went from 1,640 lines and twelve types to 93 lines
Two Stored Relationships
Only parent-child and partner are stored. Siblings, labels like "cousin", and family groupings are all derived by walking those two
Order, Then Coordinates
The engine decides each row's order before any position exists and never reorders afterwards, which fixed relatives landing next to strangers
Ghost Slots
Placeholders for missing relatives are placed by the layout pass in space the row reserved, not by searching for a gap, which once put one 1,914 points from its owner
Fast Tests
80 package tests for family rules and layout, including golden layouts of fixture families, run in about a second; 5 app tests cover the store and viewport
Written Plan
Twelve design documents, a decision log, and an ordered work plan with acceptance criteria for every task

Technical Approach

What's Next

Phase 1: Your Own Tree

  • Start from an empty tree — name yourself, then add your first relatives — instead of the built-in sample family
  • Save data with SwiftData, in a shape that can sync through iCloud later, with file protection on
  • Edit and delete people, disconnect relationships, and undo with the system gesture
  • Full VoiceOver labels, a deliberate reading order, a list alternative to the canvas, and Dynamic Type at the largest sizes
  • Choose an App Store name

What This Demonstrates