Product · 2025 — Present
Pro E-Farmer
AI-powered livestock and crop management with social commerce, on mobile, desktop and web.
Pro E-Farmer helps smallholder and commercial farmers run their farms. It tracks animals, crop cycles, feed, medication and expenses, forecasts breeding and laying, sells produce on a marketplace and answers questions about the farm through an AI assistant grounded in the farm's own records. I designed and built the whole system: the backend, the AI service, the mobile, desktop and web apps, and the data pipeline in between.
Visit e-farmer.app ↗

Architecture
- NestJS API (v1): about 30 domain modules (animals, crops, plots, eggs, wallets, marketplace, vets, chatbot, notifications, Telegram bot) built from use cases, services and adapters.
- Django + DRF AI service: RAG question answering over ChromaDB, structure-aware re-indexing, and Gemini vision helpers that turn a product photo into a listing.
- Expo mobile app with two storage modes: a local mode on expo-sqlite (54 tables) and a cloud mode on the API, with OTA updates and RevenueCat.
- Electron + Angular 22 desktop app: sandboxed renderer, typed IPC, local API in the main process, and a shared farm-science library.
- Next.js business panel with next-intl in 7 locales and RTL, plus a Next.js marketing site.
Flows I’ve written up
How specific parts of Pro E-Farmer work under the hood, with code you can reuse.
Variety-aware crop timelines: a farm-science engine as pure, offline TypeScript
A maize field planted with a 90-day hybrid shouldn't get the same phase dates as a 120-day local composite. Here's the small, dependency-free library behind E-Farmer's crop timelines, how it scales stages per variety and re-plans from what actually happened, and why one copy of the data beats three.
Offline farm jobs and native alerts without a server: idempotent, debounced and deduped
With no backend cron in offline mode, the app itself has to age the animals, open heat windows and remind farmers to log their eggs. Here's how I run those jobs in Electron's main process and in an Expo background task, so they're safe to run any number of times and never nag twice.
A locked-down Electron app with a typed IPC bridge and a transactional local API
An offline farm app needs SQLite, a keychain and native notifications, but the page that renders it should touch none of them. Here's how I split E-Farmer desktop into a sandboxed Angular renderer, a whitelisted preload and a main process that validates every call and runs it in a transaction.
From relational tables to a RAG knowledge base: render markdown, chunk by shape, rebuild on a schedule
Vector stores don't understand foreign keys, so an assistant over farm data needs its records turned into text first. Here's the pipeline in Pro E-Farmer: a NestJS cron renders one markdown document per animal and crop cycle, and a disposable Django/Chroma index chunks them by document shape.
A farm-scoped RAG assistant: tenant filters, capped retrieval and prompts that refuse to guess
A farming assistant that answers from the wrong farm's records, or from the whole corpus, is worse than no assistant. Here's how Sora in Pro E-Farmer routes questions through canned actions, intent detection and a multi-tenant RAG service that only sees the farmer's own data.
QLoRA on a 133-sample domain dataset: what fine-tuning Phi-3-mini taught me about when not to
I tried fine-tuning Phi-3-mini-4k-instruct with QLoRA so Pro E-Farmer's assistant could run on a small local model. Here's the setup, the bugs a small dataset hides, and why RAG is what's live while the adapter stays an experiment.