Back to Field Notes

Kremio: a plan first, then a mobile app in a day

On October 11 we started Kremio, a mobile app for ERPNext v16, and its server companion, Kremio Connect. We checked the brief against Frappe's source and wrote a plan before any code. About twelve hours later both were merged, and nothing had yet run on a phone.

Covers
Written
Repositories
kremio, kremio-connect
Reading time
4 min
#kremio#kremio-connect#testing#process
Contents
from empty repository to both merged
about 12 h
unit and screen tests
258
live tests against a real bench
18
server tests
144
runs on a phone that day
0

What we set out to build

Kremio is our mobile app for ERPNext v16 sites, built with Expo. At the time of writing it’s an Android test build. It talks to a site only through a companion Frappe app, Kremio Connect. The first two phases of the brief were an online core (sign-in, lists and forms built from the site’s metadata, an approvals inbox, barcode scanning) and offline sync.

A plan before any code

Fourteen minutes after the empty repository was created, we committed a plan, marked “draft, waiting for approval. Nothing outside docs/ is built yet.” Before writing it we checked the brief against the Frappe 16.51.0 and ERPNext 16.50.0 source, and several of its assumptions didn’t hold:

  • Expense Claim isn’t in ERPNext v16. It moved to HRMS. The demo data got a custom “Job” DocType with a workflow instead, which also proves that a custom DocType appears in the app without an app update.
  • A DocType’s modified doesn’t change when a Custom Field is added, so it can’t tell a phone that its cached form is stale. The metadata call returns a hash of what it returns instead.
  • Frappe v16 has no (The Model Context Protocol, an open standard that lets AI apps such as Claude call tools on a server. On our sites, the MCP server is how Aria, our agents and connected AI apps read ERPNext and draft in it.) support, and the current MCP spec (2026-07-28) is stateless. Kremio Connect implements it, and also answers the previous revision so older clients keep working.
  • An app can’t serve /.well-known/* in v16, so there are no Universal Links or App Links from the site. Sign-in redirects and deep links use a kremio:// scheme.
  • Pending workflow approvals are stored per role, not per user, so “my approvals” has to be worked out through the site’s own permission rules.

The plan ended with eight questions, each with a recommended answer. Nikolas answered them within about half an hour, and the first milestone landed at 04:01.

One answer was reversed almost at once. The plan kept both codebases in one repository and said Kremio Connect’s own repository could wait until its first release. At 04:22 Nikolas created an empty kremio-connect repository, and seven minutes later Kremio Connect moved into it. The reason recorded: keep the mobile app separate from the Frappe app, and since bench get-app installs straight from that repository, the job that would have split it out at each release isn’t needed.

Eleven milestones

October 11, Denver time
  1. Nikolas creates the empty Kremio repository.
  2. The plan is committed, waiting for approval.
  3. The first milestone lands; the plan reads approved.
  4. An empty kremio-connect repository is created.
  5. Kremio Connect moves into it.
  6. M6: the online core is done.
  7. The app merges, after offline sync (M7 to M10).
  8. Kremio Connect merges and is tagged 0.1.0.

Milestones M0 to M6, the online core, took 3 hours 18 minutes, from the first commit at 03:16 to 06:34. Then came a pause of about seven hours that nothing in the record explains, and M7 to M10, offline sync, took another 1 hour 18 minutes. The two pull requests merged at 15:12 and 15:14, and Kremio Connect was tagged 0.1.0, about twelve hours after the repository was created. The app’s first pull request added 41,689 lines in 234 files; Kremio Connect’s added 12,615 in 128.

One design rule runs through both. Every call the app or an MCP client makes is a registered action with a JSON Schema and a capability: read, draft or commit. Each one runs as the caller, checks permissions itself and writes an Action Log row. MCP clients only ever see read and draft actions, and a test fails if a commit action is listed or callable there.

What the tests caught

A chaos test sends the sync through a proxy that drops connections at random, before, during and after answers. A run sends 34 to 50 requests, and 47 to 65% of them fail. It passed on 12 seeds with every change applied exactly once, and it fails if retries aren’t idempotent.

What we didn’t check

What did run was the app’s own sign-in, sync engine and database code, in Node, against a real Frappe v16 (Frappe's command-line tool, and the folder of apps and sites it manages. It installs apps, builds assets, migrates sites and runs tests.): 258 unit and screen tests, 18 live tests, 24 real forms rendered, and 144 server tests. That afternoon we added an Android build workflow, whose first APK (55 MB) had “not been run on a phone yet”. By early the next morning Nikolas had a test build on his phone and had tried Aria and Share PDF against our own site.

What we’d tell someone else