Inspiration
Growing up in Nigeria, food is everywhere — but so is food insecurity. Walk through any market in Abuja or Lagos and you will find fresh tomatoes, peppers, okra, and moringa. But ask most urban households how to grow even one of those crops in their backyard, or ask a smallholder farmer in Plateau State how to treat the brown patches spreading across her tomato leaves overnight, and you will find the same gap: no access, no diagnosis, no safety net.
Nigeria has over 36 million smallholder farming families producing more than 80% of our national food supply — yet the country loses an estimated 40% of annual crop yield to preventable disease and pest damage. That is approximately ₦4.5 trillion in food we grew but could not save.
We wanted to close that gap. Not just with a reporting tool, but a full system that takes someone from "I want to grow my own food" all the way to "here is what to cook with what I just harvested" — and helps a farmer identify and treat a crop disease before it destroys an entire season's income.
That became Loam.
What It Does
Loam is an AI-powered horticulture Progressive Web App that guides users through the entire journey from seed to plate:
- AI Crop Diagnosis — Photograph a sick plant, add a short description, and Loam's AI (powered by Google Gemini 2.5 Pro) analyses the image and returns a plain-language diagnosis with confidence level, treatment options, and an estimated yield loss percentage if untreated. A result in under 10 seconds — no agronomist required.
- Smart Garden Tracker — Log every plant, care action, and growth milestone. Progress updates automatically based on each crop's real growth cycle, with care actions like watering and feeding adding bonuses on top.
- Real-Time Weather Integration — Personalised watering and care advice based on actual forecasts for the user's location, so the garden tells you when to act before you think to ask.
- Global Meal Planner — Powered by real recipe data with a configurable locality slider, so users control exactly how local or international their feed is. A user in Abuja gets Nigerian recipes alongside Italian pasta and Japanese stir fry — weighted by what they actually want to see.
- Seasonal Planting Calendar — Tailored to tropical and subtropical climate zones across Nigeria and West Africa.
- Community Feed — A live forum where growers share progress, post diagnoses, and ask questions directly from their garden — building the largest peer-knowledge network Nigerian farmers have ever had.
- Grow Cost Tracker — Shows users exactly how much they saved by growing their own food versus buying at current market prices.
How We Built It
| Layer | Technology |
|---|---|
| Frontend | React + TypeScript + Vite |
| Styling | Tailwind CSS + Framer Motion |
| Backend | Supabase (Auth, Database, Realtime, RLS, Edge Functions, Storage) |
| AI — Crop Diagnosis | Google Gemini 2.5 Pro (multimodal: image + text + location) |
| AI — App Builder | Lovable (powered by Claude) |
| Plant Images | Wikimedia Commons API |
| Recipes | TheMealDB API |
| Weather | Open-Meteo API |
| Deployment | Lovable |
The crop diagnosis pipeline runs as a Supabase Edge Function: user photo + symptom description + GPS location are packaged into a single Gemini API call, which returns a structured JSON diagnosis card (disease name, confidence badge, treatment tabs, price impact bar). All diagnosis history is stored in a private Supabase bucket with Row Level Security — accessible only to the authenticated farmer who submitted it.
The meal planner recommendation engine uses a weighted scoring formula:
$$ \text{score} = Q + P + C + \left(\frac{w}{100} \times L\right) + G $$
Where $Q$ = content quality, $P$ = user preference boost, $C$ = data completeness, $w$ = locality weight (0–100, set by the user), $L$ = local relevance score, and $G$ = global quality tier bonus. Location is a signal, not a restriction.
Challenges We Faced
Image quality for African crops was harder than expected. Wikimedia returns great images for well-known plants but struggles with crops like Ugu or Waterleaf. We built an alias system that maps local crop names to scientific names and retries automatically on broken image results.
The recommendation bias problem. Early versions were too aggressive about showing local content — a user in Nigeria would open the meal planner and see only traditional dishes. We rethought the entire system around user agency, replacing preset modes with a continuous slider and an auto-learn mode that adjusts based on what users actually engage with.
Balancing automation with human oversight. Every AI diagnosis carries a confidence badge — High, Medium, or Low — because a farmer deserves to know when to trust the AI and when to seek a second opinion. Loam's chemical treatment recommendations intentionally omit specific dosage amounts. This is a hard design constraint, not an oversight: dosage decisions belong to the farmer and their local agricultural expert. AI informs. It never commands.
Making progress feel real. A progress bar that only moves manually is not motivating. We rebuilt the progress system to be time-based — a plant that takes 80 days to grow automatically sits at roughly 36% after 29 days, with care actions adding bonuses on top.
What We Learned
- User agency beats algorithmic assumptions every time
- The most powerful AI for social good is not the most complex — it is the most contextualised. A yield loss percentage turns a diagnosis into a business decision.
- Building for Africa means building globally first and adding local depth second — not the other way around
- Micro-animations are not decoration, they are feedback — without them users do not know if their action worked
- The best feature is often not a new screen, but making an existing one feel more alive
What's Next
- Offline-first sync so the app works reliably in low-connectivity areas across rural Nigeria and West Africa
- Community grow-alongs where groups plant the same crop together and track collective progress
- Live market price integration so the cost tracker uses real current prices in Nigerian naira
- Expansion to more African climate zones and languages, including Nigerian Pidgin
- A native Android build optimised for lower-end devices common across West Africa
- Partnerships with IITA and NESREA to validate AI diagnosis accuracy against clinical agronomist benchmarks
Loam is live. The AI works. The farmers are waiting.
What's next for Loam
Built With
- edge-functions
- framer-motion
- google-gemini-2.5-pro
- lovable-(claude)
- open-meteo
- postgresql
- react
- realtime
- row-level-security
- storage)
- supabase-(auth
- tailwind-css
- themealdb-api
- typescript
- vite
- wikimedia-commons-api
Log in or sign up for Devpost to join the conversation.