How Merv is built
Merv is a field app for HVAC crews: jobs, checklists, photos and estimates on the technician's phone, with AI that turns a photo of an old paper quote into a priced estimate.
I built it as one developer working with Claude Code. I decided what to build and how it should behave, set the architecture and the rules the code has to follow, and tested every change on a real phone before it shipped. Claude wrote most of the code under that direction. The rules, the reviews and the tests are how a one-person project keeps that code trustworthy.
The pieces
TypeScript. Ships on Android first; iOS comes from the same code. Keeps a local copy so jobs open with no signal.
Postgres with row-level security, sign-in, and private file storage for photos.
11 functions: six AI assistants, email, account deletion and three nightly jobs.
Reads photos, PDFs and price sheets. Called only from the server, only when someone taps.
- Resend · email
- Cloudflare · bot check, site, off-site photo copy
- Sentry · crash reports
- GitHub Actions · keep-awake ping
How your data is protected
This is a plain summary. The privacy policy is the full version and wins if the two ever differ.
- Each shop's data is walled off in the database itself The database checks every read and write against the signed-in person's company. The app cannot ask for another shop's rows, because the server decides which company you belong to.
- Technicians see their jobs; managers see the company Price lists and money figures can be hidden from technicians by a manager.
- Photos are private They are only reachable through short-lived signed links, and a nightly copy is kept off site.
- AI runs only when you tap The content you choose is sent to Anthropic, which does not train its models on it under its commercial terms. Nothing is sent in the background, and nothing is saved until you accept it.
- Deleting your account really deletes it From inside the app, or by email. The policy lists exactly what stays behind, such as backups for 90 days, and why.
Teaching the AI not to invent work
A photo of an old quote is a hard input. A total isn't a line item, an optional upgrade isn't part of the job, and a customer's address must never end up in the estimate. Merv is tested against eight made-up quotes, each built around one of those traps.
| Quote | The trap | Right answer |
|---|---|---|
| System replacement | Tax, total and a 50% deposit sit beside the lines | $10,420.00 |
| Typewriter service call | A PAID stamp that must not become a line | skip the stamp |
| Ductwork letter | Duct per foot and insulation per square foot on one page | keep both units |
| Commercial maintenance | 15 rows, a negative discount, two labour rates | 15 rows |
| Handwritten field quote | 4 @ 18.50 = 74.00, and a "quote separately" note | $18.50 each |
| Two systems, optional upgrades | Upgrades priced but left out of the total | leave them out |
| Credits and a rebate | Negative lines and $0 lines. It caught a real bug: the AI swapped in price-book prices | $784.50 |
| Good / Better / Best | Three alternatives for one job, plus a $214/mo financing figure | $11,670 |
Rules the code follows
Each of these came from a real bug, and each is now written down so it doesn't happen twice.
- A save that changed nothing is a failure A blocked database write can come back with no error and no rows. Every write now asks for the saved row back and treats an empty answer as an error.
- An empty file is a failed upload A photo that reads as zero bytes is reported, not stored as a blank.
- The app decides, not the prompt When the AI kept dropping quoted lines it had been told to keep, the app took over tracking them. Instructions in a prompt are a request; code is a guarantee.
- Test it on the phone Nothing is called done until it has worked on a real device. Where something hasn't been tested yet, the docs say so.
Merv is in a closed beta. To see it working, take the tour or watch the two-minute video.