T.A Consultant · frontend
AgriTA
A multi-tenant agriculture supply-chain platform, traceable from a QR code to the plot of land.
T.A Consultant · frontend
A multi-tenant agriculture supply-chain platform, traceable from a QR code to the plot of land.
A multi-tenant agriculture supply-chain platform and its farm app. One person can act for the platform and for several tenants, and anyone with a QR code can see the plot of land without logging in.
One user can hold a platform context plus a tenant context per membership, and the app was written as if there were only one. I wrote the spec and the plan, then built the context state, the switch API, a bootstrap gate, the switch mutation, discarding of stale refreshes, the switcher and the wrong-context screens. My final review of that work caught inverted guards. Another developer has since done more on the auth layer.
Sidebar and dashboard entries declare which context they belong to, and scope is checked before entitlement. A route opened in the wrong context lands on a screen that explains the problem. TA-Farm mirrors backend rules and permissions before sending a request. I also built the Platform Console areas for tenants, subscriptions, official codes and seller review.
The public page at /trace/ needs no login and draws the plot boundary from a published snapshot. Imagery comes from VietMap, falling back to Esri on the first failed tile. Tests guard the coordinate swap between GeoJSON and Leaflet, which order latitude and longitude differently.
In TA-Farm I built growing areas, seasons, harvest lots and satellite jobs. Inventory writes carry idempotency keys, so a retried request cannot record a write twice.