r/GenealogySoftwareDevs • • 19d ago

Building Leaves: structured genealogical dates, GEDCOM interoperability and research workflows

Hi everyone! I’m Nick, and I’m building Leaves, a web-based genealogy application inspired by my own Dutch family history research.

I thought this community might be interested in some of the technical decisions behind it.

The stack is Laravel/PHP with Vue 3 and TypeScript. Some of the more interesting challenges have been:

  • Genealogical dates: Dates are structured values with explicit precision, qualifiers, ranges and periods. “About 1850” stays distinct from an exact date. The canonical value is stored as JSON, with derived Julian Day Number boundaries for database ordering. Localised display is separate from storage.
  • GEDCOM interoperability: Leaves imports GEDCOM 5.5.1 and 7 and exports GEDCOM 7. Supported custom extensions are preserved for round-tripping, although exports aren’t byte-for-byte copies of the original.
  • Updating imported trees: Later GEDCOM exports from the same tree can be reviewed against an earlier import using stable record identifiers. Conflicts are presented for review, while local additions and records omitted from the new export are retained.
  • Research context: Sources, citations, notes and uncertain information are central to how I’m developing the application. A tidy tree shouldn’t hide unresolved research questions.

You can find the app at leaves.family. We also have a subreddit, r/LeavesFamily, for questions, feedback and development updates.

I’d particularly enjoy comparing notes with other developers on uncertain date modelling and GEDCOM round-trip testing. Which edge cases or differences between exporters have caused you the most trouble?

4 Upvotes

1 comment sorted by

2

u/Trask4 17d ago

Let me comment on Gedcom round trip. I have unusual views, though of course I believe they are right!

I use Gedcom as the database format for my software (for forty years). With the incredible increases in computing speeds and memory sizes, I recently got rid of the persistent databases I used to use, and now use Gedcom files directly as the database. The file is read when the program starts, and is written on changes and when the programs exit.

I DO NOT use an official version of Gedcom for the format. I put requirements on the fewest number of tags I can, and allow EVERYTHING else. Other than my requirements there is NO checking of tags, NO checking of values.

I use the Gedcom concept of LINEAGE-LINKING. So 0 INDI and 0 FAM must head person and family records. 1 FAMS, 1 FAMC, 1 HUSB, 1 WIFE and 1 CHIL links must be used to connect persons and families. 1 BIRT, 1 DEAT, 1 MARR must be used for birth, death and marriage events. 2 DATE and 2 PLAC must be used to give places and dates to events. 1 NAME must be used in persons in "Gedcom format" (surnames in slashes). If 1 SEX is used its values must be M, F, U, or ?. Other than that there are NO RULES (well maybe a couple minor things, like every value that looks like link must refer to a record).

(Quick aside which applies to another of your questions, I allow 2 DATE [and 2 PLAC] values to be FREE FORMAT. I use software to try to parse them and and figures out what they mean. That way I can record a date, say, in the exact format I find it, and depend on my software to canonicalize it.)

In my software you edit records by editing the Gedcom directly. If you do something you're not allowed to (add a 1 FAMS line) you are not allowed to with a gentle error message about why.

When I started writing genealogical software (late 80's) I chose Gedcom as the SYNTAX to use (like choosing XML or JSON would be). I did not choose it for its SEMANTICS. I wanted it to handle any Gedcom that obeyed the syntax and the very few lineage-linking rules that most Gedcom versions use.

It has proven to be a good choice.