Technology

Built to still be readable in twenty years

A conservation record is only worth making if it outlives the software that made it. That single requirement decides most of what follows: open formats, one database, records written locally first, and AI that is never allowed the last word.

Read the full engineering reportPDF · 4 pages

The stack

What each layer is, and why it is there

The record, on the device

expo-sqlite (WAL) · versioned migrations

A real SQL database on the phone, written as an append-only ledger. Observations, condition reports and corrections are all inserts; a mistake is fixed by a row that supersedes another, never by overwriting it. This is what makes the offline guarantee structural rather than a promise.

The record, in the cloud

Postgres · PostGIS · pgvector · row-level security

One database, three extensions. PostGIS makes "what within 500 m has gone longest without a resurvey" an index rather than a loop, and makes the GeoJSON export a real GIS artefact. pgvector holds the knowledge corpus. Authorisation lives in the database, so the phone, the dashboard and any future integration share one rule set.

Vision, on the phone

ONNX Runtime with XNNPACK · a YOLO-family segmentation model

The damage detector runs on the handset, because the network is not there at the moment it is needed and because a photograph of a monument should not have to leave the country to be looked at. It proposes candidates as dashed outlines. A person confirms severity, and the report records that the AI assisted.

Answers that can be checked

retrieval → synthesis → verification, with a refusal path

The Dhamma engine retrieves passages from a fixed corpus: the Pali canon alongside the ICOMOS Venice and Burra Charters, UNESCO World Heritage records and named Kathmandu Valley archaeology, writes only from those passages, and checks that every claim resolves to one. When it cannot, it refuses. Source text and citations are never machine-translated.

Maps that work without a signal

MapLibre GL Native · vector tiles served from object storage

An open renderer over an open basemap, so a regional extract can be downloaded before a visit and used with no connection at all. And the map bill does not grow with the number of people we most want using it.

On the phone itself

The app is React Native on Expo, with file-based routing, and the New Architecture enabled, which the vision module requires. One codebase covers Android and iOS while still reaching the camera, GPS, compass and two AI runtimes through native modules.

The rules

Five constraints the code actually enforces

These are not aspirations in a document. Several of them are checked automatically, and the build fails when one is broken.

The rule

A measurement is never faked.
An unknown reading is stored as unknown, never as zero. Some records are therefore less complete than they could appear to be: that is the point.
"By eye" is never dressed up as "measured".
A shot framed without a sensor lock is marked, and looks different. Fewer records read as authoritative, and the ones that do can be trusted.
The AI suggests; it never decides.
The detector cannot set severity and the answer engine refuses rather than guesses. The product is slower and says "I do not know" more often than a competitor would.
Nothing is deleted.
Corrections are added, not applied over the top. Storage grows and the history is heavier to read, but it stays auditable.
The device is the source of truth.
Every write lands locally first. Synchronisation is harder to build than a straight API call, and the app keeps working where there is no signal at all.

A sixth rule has no technical cost and is enforced by a linter anyway: no gamification vocabulary. Streaks, XP, levels, badges and points reward volume, and volume is the wrong incentive for evidence. Merit here is puṇya: unscored, unspendable, and untransferable.

Openness

Everything here has an exit

Each managed service in the stack is chosen so that leaving it is a migration rather than a rewrite. Postgres is Postgres. Object storage is a byte copy. SQLite and the map archive are files. MapLibre and the inference runtime are open source, and the whole codebase is public.

That matters more here than in most products. An institution being asked to build a decade of monitoring record on a piece of software is entitled to know what happens to that record if the people who wrote the software move on.