Skip to main content

Architecture decisions

An architecture decision record (ADR) is a short note about one decision that shapes the codebase: the situation, what was decided, what else was considered, and what it costs. They're here so that contributors and reviewers can see why Lifer is built the way it is before proposing to change it, and so that the costs are written down next to the benefits.

Each record has the same parts:

  • Status: Accepted, with the date the decision first appears in the repository's history when there is one.
  • Context: the problem and the constraints.
  • Decision: what Lifer does.
  • Alternatives considered: what else was tried or rejected, where the record shows it.
  • Consequences: what got better, and what it costs.

Reasons come from code comments, commit messages and docs, or were confirmed by the maintainer where nothing was written down.

The repository's history begins on 2026-08-22, with much of the design already in place, so a date is when a decision first appears in git, not necessarily when it was made. Some recent changes aren't in a release yet; their records say so.

Records​

#DecisionStatus
0001PostgreSQL everywhere, embedded in the desktop appAccepted, 2026-08-29
0002A Tauri shell running the Node API as a sidecarAccepted, 2026-08-27
0003One API and web app for desktop and serverAccepted, 2026-08-22
0004Species data built by a maintainer pipeline and shipped as GitHub release filesAccepted, 2026-10-03 (current form)
0005Catalog data kept separate from user dataAccepted, next release
0006The database is the source of truth; files carry a recoverable copyAccepted, 2026-09-25
0007Lifer files photos into species foldersAccepted, 2026-08-29 (current form)
0008ONNX models run in the API process on a worker threadAccepted, 2026-10-03
0009The production server is compiled with esbuildAccepted, next release
0010Which photo licenses the project redistributesAccepted, next release (current form)
0011Request validation with TypeBox, and an OpenAPI document generated from itAccepted, next release
0012No state-management or data-fetching library in the web appAccepted, 2026-08-22
0013Openly licensed gallery vectors, tagged per vectorProposed

Adding a record​

Add one when a pull request makes a decision that's expensive to reverse, or reverses an earlier one. Copy an existing record, number it one higher than the highest, and link it here. Don't rewrite an accepted record to change the decision: write a new one and mark the old one Superseded by the new number.