David H. Simangunsong
Back to Dashboard

PalmTrace, a palm oil traceability workspace

A full stack application that links deliveries, growers, plots, facilities and certificates and reports traceability by volume. Unresolved volume is linked to reasons and follow up records, with ownership tracked explicitly.

Year
2026
Methods
Full-stack developmentData modellingData quality rulesGIS validation
Stack
TypeScriptReactViteTanStackTailwindMapLibreTurfEChartsHonoCloudflare WorkersD1R2DrizzleZodVitestPlaywright
PalmTrace overview screen with volume based traceability figures
  • TtM and TtPTraceability to mill and to plantation, measured by volume, never by supplier count
  • 3 formatsValidated import from CSV, XLSX and GeoJSON with the same rules as manual entry
  • Append onlyAudit log of every change, enforced by the database

Problem

Traceability teams receive deliveries, grower lists, plot boundaries, facility relationships and certificates in separate files with inconsistent identifiers. Counting suppliers overstates traceability: a dealer record can stop short of the plantation, a certificate may not cover the delivery date, and a missing coordinate blocks spatial review. A refinery that reports “90 percent of suppliers traced” may be tracing far less of its oil. Decision makers need a figure by volume that holds up in an audit, and a direct path to every record that is not resolved.

What it does

PalmTrace calculates traceability to mill on the crude palm oil a refinery receives, and traceability to plantation on the fresh fruit bunches each mill receives, at delivery item level, so a dealer load can be partly traceable. Refinery level traceability to plantation weights each mill’s CPO volume by that mill’s result for the selected period, so it can never exceed traceability to mill, and a property test on random datasets checks this. There is no batch link between a CPO shipment and specific fruit deliveries, so this figure is an attribution from each mill’s supply profile over the period, not proof of physical origin, and the screens label it that way.

Volume based traceability with scope, denominator and unresolved volume shown next to every figure.
Volume based traceability with scope, denominator and unresolved volume shown next to every figure.

Every figure shows its scope, numerator, denominator and unresolved volume, with reasons taken from a versioned data policy. Linked volume and verified volume are reported separately, and so are declared certification and certification matched to a registry.

Lineage from one refinery receipt to its mill, the mill's intake by dealer or supplier, and the plots behind it. The receipt's plantation share is attributed from the mill's supply profile for the selected period.
Lineage from one refinery receipt to its mill, the mill's intake by dealer or supplier, and the plots behind it. The receipt's plantation share is attributed from the mill's supply profile for the selected period.

Data quality and follow up

A rule engine with stable issue identifiers finds invalid or out of province coordinates, duplicate and overlapping polygons, area discrepancies, broken relationships, expired or suspended certificates and volumes that do not reconcile. The demonstration data contains deliberate defects, and the tests prove each one is detected. Each issue links to an engagement with the grower, dealer, mill or certificate holder, and a corrective action cannot close without evidence and a named verifier.

Data quality issues with owner, status and reason.
Data quality issues with owner, status and reason.
RSPO mass balance ledger that refuses claims above the certified balance.
RSPO mass balance ledger that refuses claims above the certified balance.

How a team would use it

The unresolved volume is the work plan. Every untraced tonne carries at least one reason, and data quality issues link to follow-up records with an owner field; issues nobody has taken on yet show as Unassigned, so gaps in ownership are visible too. A sustainability team can sort the gap by volume and start with the few dealers or mills that account for most of it, instead of chasing every supplier equally. Progress shows up as tonnes moved from unresolved to traced, which is the number a buyer or an auditor asks for.

The same records feed the next steps a company faces. Plots with valid polygons are ready for deforestation screening of the kind done in the Pelalawan EUDR project, certificates matched to a registry support RSPO and ISPO claims, and the append only audit log shows who changed what and when.

Architecture

The client is React and TypeScript with MapLibre for plots and facilities. Polygons are checked for closure, coordinate range, self intersection, topology and zero area before any area is computed. The server is a Hono API on Cloudflare Workers with D1 and R2, Access authentication, workspace roles and audit events that a database trigger keeps append only. The public demonstration runs entirely in the browser with IndexedDB, so nothing a visitor enters is uploaded.

Interactive

PalmTrace demo workspace

Self contained HTML, served from this site 2.9 MB

Open in a new tab

Limitations

What these results should not be used for.

  1. All demonstration data is synthetic and represents no real company, person, plantation or certificate.
  2. The browser workspace is stored per device. There is no multi user synchronisation yet; the server API covers grower creation and evidence upload.
  3. No environmental or satellite screening is implemented, and no mass balance is modelled between fresh fruit bunches and crude palm oil.
  4. PalmTrace does not grant RSPO or ISPO certification, verify deforestation free status, or make legal compliance determinations.