Tri-platform agritech app: Flutter (Android/iOS/Web) + Laravel 8 multi-tenant — connecting farmers to loans + harvest buyers
End-to-end multi-tenant agritech platform: Flutter tri-platform monorepo + Laravel 8 backend (474 routes, 7 modules), AI plant analysis (Gemini), Google Maps integration, Cloud Run deploy.

Challenge
Indonesian farmers mostly underserved by financial systems + weak bargaining position when selling harvests to middlemen. Needed agritech platform connecting farmers to loan providers + harvest buyers directly, usable in the field via mobile + tablet, but also requiring desktop dashboard for operations teams. Multi-tenant architecture to handle multiple agribusiness companies as operators. AI plant analysis to assist farmer diagnostics.
Approach
Capital Commerce built a full-stack multi-phase platform:
Mobile (Flutter monorepo, tri-platform):
- Flutter with responsive layout — Phone (<850px), Tablet (850-1099px), Desktop (≥1100px)
- Monorepo
agridesa_core(shared library) +agridesa-app(application) - GetX state management throughout
- Single codebase tri-platform: Android/iOS/Web Desktop/Web Tablet
- Firebase Hosting for web deploy
Backend (Laravel 8 multi-tenant):
- 7 separate modules: User, Farmer, Location, Asset, Workflow, Messaging, Scheduler
- 474+ total routes (57 web routes for Location module alone)
- Multi-tenant via automatic
company_idinjection on every API call - ACL/permission system per role + per module
- JWT auth with Bearer token + auto-injected company_id
- Cloud Run deploy (Dockerfile.cloudrun)
Integrations:
- Gemini AI — plant analysis + farmer chatbot
- Google Maps (4 separate API keys for Android/iOS/Web/Places API)
- Raja Ongkir — shipping integration for harvest delivery
- Firebase — auth + hosting + analytics
- Kode Pos service — Indonesian postal code lookup
Codified patterns:
- HTTP API extension pattern per domain (
api+user.dart,api+farmer.dart, etc) ApiResponsewrapper with error/result split- Multi-tenant company_id injection rules (superadmin bypass, /jobs + /acl/roles bypass, general-settings = 0)
- envied-encrypted secrets (Maps key, Gemini key, Raja Ongkir key) via
obfuscate: true - 11+ runtime pitfalls codified in CLAUDE.md (GetX Obx guard, LocalStorage clearSession trap, deep link handler, BaseTabPageController refresh pattern, etc)
Outcome
Active engagement (Sept 2025 — 2026), platform live:
- Tri-platform Flutter app (Android/iOS + Web Desktop + Web Tablet) — single codebase, responsive layout, persistent sidebar for web ≥850px.
- Laravel 8 backend with 474+ routes + 7 modules, multi-tenant ready for multiple agribusiness operators.
- AI plant analysis via Gemini integration — farmers upload plant photos, get diagnostics.
- Google Maps integration with 4 separate API keys (Android, iOS, Web, Places API).
- Multi-tenant SaaS-ready — automatic
company_idinjection across all API calls. - Cloud Run deploy (Dockerfile.cloudrun) for auto-scale backend.
- Documentation discipline — project-level CLAUDE.md with 500+ lines of patterns + pitfalls + design system reference.
Technology stack
Have a similar project?
Discuss your needs in an initial 30-60 minute consultation.
