MindooDB Blog

Search everything in Haven - including the text on the paper on your desk

Karsten Lehmann 11 July 2026 15:03:00

In the previous post I described how Haven answers tidy questions - “open tasks owned by Alice” - instantly, by keeping a little catalogue of the searchable fields. But a lot of what we actually look for isn’t a tidy field. It is a word. A name buried three paragraphs into a meeting note. A part number somewhere in a long e-mail. The word “warranty” in a contract you filed months ago.

For that, Haven now has proper full-text search.

Type a word, find it anywhere

You type “solar panels” and Haven finds every document that mentions it - across your notes, e-mails, Word documents, Markdown, long text of any kind - and shows the best matches first, the way you expect a search box to behave. It handles partial words as you type, tolerates small typos, and lets you combine a text search with the ordinary filters from the last post, so “documents mentioning ‘solar’ that are also invoices from this year” is a single, natural question.

It even folds neatly into the grouped, totalled views I described earlier: you can run a live search box over a categorised list, and the categories and totals recompute over just the matching documents as you type.

Built on your device, private by design

Here is the part that fits the rest of Haven. This search index is built on your own device, from your own decrypted content, and it is stored encrypted like everything else. The server is never involved and never learns what you searched for. It keeps itself up to date quietly in the background as new data syncs in, so the first search after a big sync is already warm.

Under the hood, the search is powered by MiniSearch, an excellent open-source full-text engine that runs entirely in your browser - which is exactly why the whole thing can stay on your device and work offline.

There is a consequence worth understanding, because it is a feature, not a quirk: search only finds what you can actually read. If a teammate holds keys to documents you don’t, their search will turn up hits that yours won’t - because your device can only index what it can unlock. Two people searching the same database may see different results, and that is exactly right: search mirrors your real access, it never leaks the existence of things you were not meant to see. And when access is removed, the matching entries disappear from the index immediately, so recognised words never outlive the permission to see them.

Searching inside attachments, too

Search doesn’t stop at the document body. Haven can also read the text inside the files attached to a document - PDFs, Word, PowerPoint and Excel files, plain text and more - and make that findable as well. So the phrase you remember from the third page of an attached PDF is enough to find the document it hangs off. The libraries that do this are only loaded when they are actually needed, so you never pay for a feature you don’t use.

The paper problem: OCR built in

A huge amount of what teams deal with never started as a digital file. It is a signed contract handed over at a meeting, a handwritten note from a customer visit, a printed invoice that arrived in the post. You photograph it or scan it, and it lands in Haven as an image - and an image, to a search engine, is just a wall of pixels. The words in it might as well not exist.

So we built text recognition (OCR) right into Haven, using the open-source Tesseract.js engine, which recognises text in more than 100 languages and, like everything else here, runs right on your device. It reads the text out of scanned images and photos of documents, and then - this is the important design choice - it stores that recognised text once, attached to the file itself. Because it is stored with the document, it syncs to all your devices along with everything else. Recognise the text on one device, and the scanned invoice becomes searchable on your laptop, your tablet and your phone, without any of them having to redo the work. Search for the supplier’s name, and the photo of their invoice shows up in the results like any ordinary document would.

This is what ties the whole post together: full-text search plus OCR means that “search everything” really does mean everything - including the piece of paper that was on your desk five minutes ago.

One tap to turn paper into a document: Quick-Scan

Which raises the obvious question - how does the paper get in? Back in May we shipped a document scanner inside Haven’s apps: point your camera at a page, let Haven find the edges, straighten out the perspective, and save a clean result. It was excellent, but it lived inside the attachment button of individual apps.

Now there is a dedicated Quick-Scan entry right in Haven’s sidebar. One tap opens the scanner from anywhere: take a photo of a document, watch the corners snap into place (nudge them by hand if needed), straighten it into a crisp page, and then save it to your device, hand it to your phone’s photo library, or push it straight into the operating system’s share sheet to send to a colleague. It is the fastest possible path from “a piece of paper exists” to “a clean digital copy exists” - and, combined with the OCR above, from there straight into “and I can search for it later”.

Why it matters

Everyday productivity lives or dies on friction. End-to-end encrypted storage is wonderful, but if you can never find the thing you filed, or if getting a piece of paper into the system means juggling three apps, the system quietly stops getting used. Full-text search makes everything you have written findable; OCR extends that to everything you scanned; and Quick-Scan makes scanning a one-tap habit. And all of it stays true to Haven’s promise - built on your device, kept private, working offline, and finding only what you are actually allowed to see.

Next in the series, we leave the platform plumbing behind and look at how you get apps into Haven in the first place: the new App Store.