# Shamba Kiganjani ("Farm in your palm")
Offline-first farm management PWA for AECF-supported smallholders — crop, livestock, and mixed enterprises. See `docs/PRD.md` for the full product requirements.
## Status: working scaffold, ready for stakeholder demo
Everything a farmer would touch is real and functional, fully offline:
- Onboarding (farm profile: crop / livestock / mixed, acreage, owner details)
- Production & farm records — all 11 categories from the scoping notes (expenses, crop production, egg/milk production, fertilizer bought & used, feeding, assets + maintenance, post-harvest losses, veterinary services)
- **Revenue tracking** — sales recorded as cash or credit; a credit sale automatically creates a matching receivable in the ledger. Reports distinguish "revenue booked" (all sales) from "cash collected" (paid sales + settled receivables), and the dashboard shows revenue, expenses, and profit for the month
- Contacts (suppliers, vets, government, buyers) with tap-to-call/SMS
- Market Linkages (supplier/buyer view pulled from contacts + trade history)
- Farm Documents (contracts/invoices/receipts, with photo attachment)
- Payables & Receivables ledger, with SMS/email payment reminders
- Reports (daily/monthly/annual), including a cash-flow ring and a farm snapshot (acreage, crop mix, livestock groups)
- Local file export/import backup (works with zero setup)
Two things are intentionally **stubbed, not faked**, because they depend on decisions outside this app (see PRD §10):
| Feature | Status | What's needed to activate |
|---|---|---|
| **Google Drive backup** | Code complete, inactive | A Google Cloud OAuth Client ID in `js/config.js` |
| **AECF central database sync** | Code complete, inactive | An AECF-operated sync API endpoint in `js/config.js`. Until then, Settings clearly shows "not connected" and queued-but-unsent record counts — it never claims data was sent when it wasn't. |
This was verified end-to-end with an automated smoke test cove …