Skip to content

Mobile App · Offline Farm Ledger for Android

Kisaan Hisaab — Offline Farm Labour Ledger

A fully offline Android ledger for a cotton farm in South Punjab: daily picking per worker priced per mann, advances and payments, season finances with real net profit, and PDF ledgers — in English, Roman Urdu and Urdu.

  • Dashboard, worker list and a worker's ledger in one offline app. Demo data.
  • Logging a day's picking with a live Mann and rupee preview, then recording a payment. Demo data.
  • The same screen in English, Roman Urdu and Urdu. Demo data.
  • Period reports per worker and season finances with net profit after labour. Demo data.
  • The exported PDF ledger and the work-type settings behind it. Demo data.
On this page

The Problem

On a cotton farm in South Punjab, picking season (chunai) means a dozen or more workers in the field every day, each paid by the weight they pick. The rate is quoted per mann (40 KG), the cotton is weighed in kilograms, and the record is a notebook: a name, a date and a number, written down at the edge of the field. Weeks later someone has to turn those pages into what each person is owed, subtract the advances already handed over, and settle up in cash.

That notebook was my family's farm ledger, and it failed in predictable ways:

  • The arithmetic is where money leaks. Converting 70 KG at a per-mann rate, across dozens of workers and weeks of entries, is exactly the sum that goes wrong by hand. A mistake either shortchanges someone who worked all day or overpays from a thin margin.
  • Advances get forgotten. Workers take cash during the season. Unless every payment sits next to every day's work, nobody can answer "how much does Allah Ditta still have to get?" without a long argument.
  • Rates change mid-season. When the per-mann rate goes up in October, the old entries must stay priced at the old rate. On paper that means recalculating; in a naive app it means silently re-pricing the whole season.
  • The user is not a typical app user. The person keeping the ledger may read Urdu better than English, or neither comfortably, and will use a cheap Android phone outdoors in bright sun, often with no signal at all.
  • Labour is only half the books. Whether the season actually made money depends on cotton sales against fertilizer, pesticide, diesel, seed and the labour bill together, and that picture never existed in one place.

What I Built

Kisaan Hisaab ("the farmer's accounts") is a fully offline Android ledger built for my family's farm with Expo SDK 56, React Native 0.85 (New Architecture), React 19 and TypeScript. Roughly 16,000 lines across 82 files: five tabs (Dashboard, Workers, Reports, Finance, Settings) plus worker detail, seasons and work-type screens, all in three languages. There is no server and no account. Every record lives on the phone.

Work types and per-unit pricing

Picking cotton is not the only paid work on a farm, so work is modelled generally. Each work type has a rate, the unit the farmer counts in, and an optional larger pricing unit with a conversion. Cotton Picking, Wheat Cutting and Daily Labour are seeded on first launch, with cotton set to 1 Mann = 40 KG, and all of them can be renamed, re-priced, archived or added to.

The amount owed for an entry is (quantity ÷ units per price unit) × rate, and quantities are shown the way a farmer counts them: 70 KG at 40 KG a mann reads "1 Mann 30 KG", never "1.75 Mann".

Entries that never get re-priced

The rate, the conversion and the unit labels are locked onto each entry when it is created, so raising the rate in October cannot change what was owed in September. When an owner does change a rate or unit and entries already exist, the app asks where the change should apply: future entries only, every existing entry, or a chosen date range. The choice is written into that work type's edit history.

Because a "future entries only" unit change can leave one work type holding both KG and acre rows, reports group quantities by work type and by the unit snapshot. Quantities in different units are never added together; only money is.

A ledger that is always derived

Each worker's earned, paid and remaining balances are calculated, never stored, from their entries and payments. That way a total can never drift from the rows behind it. Payments record a method (cash, online, bank or cheque) and an optional note such as "advance for seed". The same aggregation feeds the Reports screen and its PDF, so a downloaded report always matches what was on screen.

Views can be scoped by month, by season (a named date range such as "Cotton 2026") or by work type. Inside a scoped view, payments are deliberately left out of the "remaining" figure, because a payment settles a person's whole account, not one month of it.

Fast entry in the field

  • The dashboard entry form shows a live preview of the amount before saving, remembers the last work type, and after saving clears the weight but keeps the worker selected, because the next entry is usually the same person's second weighing
  • A bulk-entry sheet logs one work type and date for the whole crew at once
  • Edits are kept in a per-record history, so "who changed this weight?" has an answer
  • A daily in-app reminder appears on the dashboard when the day is still empty in the evening, with an optional OS notification as a bonus. The banner needs no permission and cannot be killed by an aggressive battery optimiser, which on the phone brands common in Pakistan the notification often is

Three languages, including Urdu script

English, Roman Urdu and Urdu script, switchable at any time. About 400 interface strings exist in all three languages, and every piece of text goes through a single text component that picks the Naskh font and right-to-left handling for Urdu, while keeping numbers, money and dates left-to-right so they still read correctly. Dates are localised as well: Urdu shows Urdu month names, and Roman Urdu keeps English months, because that is what is actually written and read. Money uses Pakistani lakh grouping (Rs. 1,50,000) through a hand-written formatter, because the Intl support in the phone's JavaScript engine (Hermes) is unreliable across devices.

Designed for a cheap phone in bright sun

  • Every touch target is at least 52 px and readable text is at least 15 px
  • Labels instead of bare icons for anything destructive
  • Haptic buzzes on save, delete and validation errors, so a user who cannot read the red error text can still feel that something went wrong
  • A guided first-run tour points arrows at the real controls

The rule throughout is that nothing fails silently. Every save shows a confirmation, and every delete asks first and then offers Undo, which puts the record back at its exact position in the list. Deleting a worker removes their entries and payments too, and Undo restores all of them.

Finance and net profit

Income such as cotton sales, subsidies and loans is tracked against expenses for fertilizer, pesticide, tube-well, seed and transport, each with its own icon, plus custom categories. Records can be attributed to a season. Net profit is income minus expenses minus the labour bill, which is pulled straight from the workers' ledger, so the farm sees its true margin rather than one that forgets the largest cost.

PDF ledgers, offline

One tap produces a professional ledger PDF for the whole crew or a single worker, or a period report for a day, a month or a custom range. It is rendered in the user's chosen language, Urdu included, using the phone's built-in Urdu fonts so no internet is needed, and goes straight to the share sheet, ready to send on WhatsApp.

Privacy, backup and recovery

  • Optional app lock with a 4-digit PIN or fingerprint. The PIN is stored only as a salted SHA-256 hash in the phone's secure storage, and wrong guesses trigger an escalating lockout (30 seconds, doubling, capped at 30 minutes). The app re-locks after 5 minutes in the background.
  • A forgotten PIN can be reset by proving ownership with the phone's own screen lock
  • A separate unlock can be required before "Clear All Data", which already asks for confirmation twice
  • JSON backup through the share sheet, and a restore that merges instead of overwriting. Records are combined by id, and the same worker coming from a second phone is matched by name and folded into one record, with their history re-attached. Restoring the same backup twice changes nothing.

Outcomes

  • The notebook is retired. My family's farm runs its picking season from the app: daily weights, advances and settlement for the whole crew in one place.
  • Settlement is a lookup, not an argument. Each worker's earned, paid and remaining balance is always up to date, and a one-page PDF ledger can be sent to them on WhatsApp.
  • Mid-season rate changes are safe. Entries keep the price they were recorded at, and the owner chooses explicitly whether a change should reach back in time.
  • Usable by the person who actually keeps the books. Full Urdu and Roman Urdu, large targets, haptic feedback and undo on every delete make it workable for a semi-literate user on a budget phone.
  • Works with no signal. Entry, reports, PDF export and backup all run offline. There is no server, no account and no data leaving the phone.
  • Real farm profit. Sales, inputs and the labour bill finally sit in one calculation, per season.
  • Built solo, from first commit to production build, in about ten weeks (June to August 2026), with Android APK builds through EAS. The signed APK is available to download and install.
All projects

Have a project in mind?

Whether it's an MVP, a dashboard, or a rescue mission on an existing codebase — let's talk about it.

Prefer to talk first? Book a free 30-min call (opens in a new tab)