Logo Lanfrica

2MS9INE/REMBI

Domain:

agriculturedigital infrastructure

Record type:

software
Creator:
2MS
Host:
🐏 An online Algerian agricultural marketplace that connects local farmers directly with customers, restaurants, wholesalers, and potential business clients across Algeria. # Rembi β€” Ψ±Ω…Ψ¨ΩŠ Rembi is a mobile marketplace connecting Algerian farmers and artisans with buyers across the country. Sellers register, post listings with photos, and receive direct contact via phone or WhatsApp. Buyers browse, search, and filter by category and wilaya. --- ## Tech Stack | Layer | Technology | Why | |---|---|---| | UI | Flutter 3.x | Single codebase for Android & iOS | | State Management | flutter_riverpod ^3.x | Compile-safe providers, testable | | Navigation | go_router ^17.x | Declarative routing, ShellRoute for tab nav | | Backend | Supabase (PostgreSQL + Storage + Auth) | Open-source, SQL power, free tier | | Localization | Flutter Intl / ARB | AR (RTL), FR, EN, Tamazight | | Local Notifications | flutter_local_notifications | No paid service, scheduled expiry alerts | | Maps | flutter_map + OpenStreetMap | Free, no API key required | | Image Handling | image_picker + flutter_image_compress | Local compress before upload | --- ## Architecture Decisions ### Feature-based Folder Structure Code organized by business feature (not layer): `home/`, `listing/`, `auth/`, `farmer/`, `admin/`, `notifications/`, `settings/`. All data, domain, and presentation code for a feature lives together. ### Why Riverpod - No `BuildContext` in business logic - `FutureProvider` / `AsyncNotifier` β€” automatic loading/error/data states - Compile-safe provider types - `autoDispose` prevents memory leaks ### JSONB Dynamic Fields β€” The Key Design Decision Different categories need completely different attributes: livestock needs breed, age, vaccination status; crops need variety, harvest date, quantity; artisan products need allergen info. Traditional solutions are: - **Multiple category tables** (rejected) β€” rigid schema, complex joins, migrations per new category - **Wide nullable columns** (rejected) β€” 50+ nulls per row, confusing data layer - **JSONB + schema-driven UI** (chosen) β€” one `dynamic_fields JSONB` column plus a `category_schemas` table storing fi …