Karsten Lehmann 11 July 2026 15:02:00
In the last post I wrote about governing who may touch your data. This one is about a much more everyday question: how do you actually find the right data in the first place, quickly, when there is a lot of it?
That question is trickier than it sounds in a system like ours, and the reason is the very thing that makes Haven safe.
The problem with searching encrypted data
Everything in Haven is encrypted. A document sitting in the store is a locked box; to read what is inside, your device has to unlock it with the right key. That is wonderful for privacy and terrible for search, because the naive way to answer “show me all the open invoices over 5,000, newest first” is to unlock every box, look inside, and throw most of them away. With a handful of documents you would never notice. With ten or fifty thousand, opening every one on a phone is exactly the kind of thing that makes an app feel slow.
So we did the same thing a good librarian does. A librarian does not read every book to answer “which novels came out in 2024?” - they glance at a card catalogue that lists just the useful bits: title, author, year, shelf. Haven now keeps a catalogue like that.
A little summary that keeps itself current
Behind the scenes, Haven maintains a compact summary of every document - just the short, searchable fields, the kind you would actually filter or sort on. It is small enough to live in memory, so scanning it is effectively instant, and crucially it is built from the data as it arrives, not on the spur of the moment when you finally run a search.
Every time new data syncs in or you make a change, the summary quietly catches up in the background. Compared to the work of syncing over the network, keeping the little catalogue current is almost free - and it means the first search after a big sync finds everything already prepared and warm. You get the answer, not a spinner.
And to be clear, this catalogue is not a privacy shortcut. It is stored encrypted in your browser’s local database, exactly like the documents themselves - it only ever exists in readable form for a brief moment in memory on your own device, while you are actually searching. It never leaves your device, and the server never sees it. The card catalogue lives in the same locked drawer as the books; Haven simply keeps it handy so it doesn’t have to open every book to answer a question.
Ask anything, sort anything - on the fly
Once that catalogue exists, a lot becomes easy that used to be expensive.
You can ask ad-hoc questions - “open tasks owned by Alice, due first” - and get them back sorted and paged, instantly, without opening a single document. You can group results into categories and get running totals and counts per group, the way a spreadsheet’s grouped view does. And you can re-sort or re-filter that grouping as fast as you can click, because it is all just a rearrangement of the in-memory cards rather than a fresh trip through your data.
You also don’t have to tell Haven up front which fields to make searchable. By default it automatically picks up the ordinary, short fields on every document, so the moment your data is there, it is queryable. If an app has special needs, it can tune what goes into the catalogue - and here is a detail that would have been painful in older systems: changing what is searchable does not rewrite your documents. It simply rebuilds the catalogue in the background, while continuing to answer questions from the previous version until the new one is ready. No mass migration, no downtime.
Lists that update themselves
Because the catalogue is always current, Haven can offer live lists. You open a view - “everything due this week” - and it keeps itself up to date as data changes, whether the change came from your own typing or from a teammate’s sync landing in the background. Items appear and disappear as they start and stop matching, without you refreshing anything. And it is smart about it: if a change happens that doesn’t actually affect what you are looking at, your screen doesn’t churn. Only real changes to your result cause a redraw.
This is the quiet machinery behind a lot of what makes Haven feel alive rather than static.
Across databases, and even across companies
Now the part people tend to sit up for.
A single view can pull together data from several databases at once - and not just your own. Because Haven is genuinely multi-tenant, a view can combine your private data, your work data, and data from a tenant you share with a partner company, and present all of it as one consistent, grouped, totalled list. That is the exact scenario behind the year-end report we described when we launched virtual view sheets in TeamGrid: three separate worlds, each behind its own encryption, brought together into one tidy result.
And it stays safe by construction. Each database contributes only from its own catalogue - which only ever held fields that that tenant could already read in the first place. So a cross-company view needs no key sharing and leaks nothing; every side sees only what it was always allowed to see, just arranged together.
It even works in the past
One more thing, because it composes beautifully with a feature we shipped earlier. All of this works on a historical snapshot too. When you use Haven’s application time travel to open an app as it looked at some earlier moment, the same instant search, grouping and totals answer against that past state. The catalogue is rebuilt for the moment you are visiting, so “how many open deals did we have at the close of last quarter?” is just a normal question asked of an older day.
Why it matters
The headline is simple: Haven gives you fast, spreadsheet-style searching, sorting and grouping over large, fully-encrypted, local-first data - across databases and even across organisations - without ever compromising the privacy that made you choose it. The heavy work of opening documents, which is where the cost always hid, simply never happens on the path that draws your screen.
For people building apps on MindooDB, all of this is available through the App SDK, so a hosted Haven app gets instant queries, live lists and cross-tenant views without shipping any of the machinery itself.
Next up in the series: what happens when the thing you are searching for isn’t a tidy field at all, but a word buried in a long document - or even in the text of a scanned piece of paper.