Building Labi

The protocol catalog gets wired in — with six protocols in it, and nobody notices yet

2026-06-16

This is the day that mattered most, in hindsight, and the one that quietly went wrong in a way nobody would notice for almost a month.

The real infrastructure landed solid from the very start: a CatalogProtocolRecord Isar collection built to the protocol catalog's v1.0 schema, a ProtocolRepository singleton handling search and lazy CDN loading, an AttributionSheet widget built specifically for CC-BY 4.0 compliance — crediting the original author whenever someone views a protocol pulled from the library, because borrowed science without attribution isn't something worth shipping. ProtocolRepository.init() got wired into main.dart right after Isar starts up. All of that held up perfectly, untouched, for the rest of the project. It's genuinely well-built code.

What didn't hold up: the search index bundled as a Flutter asset that day had exactly six protocols in it, at 2KB — obviously a placeholder, obviously meant to be swapped for the real thing before anyone actually used this feature. It never got swapped. It sat there, quietly wrong, wired into a repository that worked perfectly and did nothing, because nothing in the app's UI called .search() or .lazyLoadProtocol() yet. A fully working engine, bolted to nothing, for weeks.

The same day, two smaller fixes that had nothing to do with the catalog but happened alongside it anyway. API keys came out of the source code entirely and into environment variables, where they should have lived from the first commit that ever needed one — the unglamorous kind of fix that's easy to keep postponing until you're already doing a security-adjacent pass on something else. And the protocol UI itself started looking like something worth trusting: a "Before you start" materials card shown whenever a protocol actually lists what it needs, a version chip when more than one version exists, a small "protocols.io" badge whenever a protocol came from the CDN rather than being typed in by hand. Small changes. Together, they're the difference between a screen that lists steps and one that tells you where they came from.


← Back to Blog