Farmers Complete Assistant

Mobile marketplace architecture turning produce offers into agreed orders, payment records and delivery tracking.

2024

Architecture stack

React Native / TypeScriptNode.js / ExpressPostgreSQLRedis

SIH 2024 · Farmer, consumer and retailer workflows.

Smart India Hackathon

A market journey from produce to fulfilment

Farmers Complete Assistant connects farmers, consumers and retailers through produce discovery, negotiated terms and tracked transactions. Farmers publish price, quantity and quality; buyers compare available supply and make offers. Accepted terms become an order that retains the price and quantity agreed at that point.

The reference architecture uses React Native and TypeScript for the mobile client, Node.js/Express for application services and PostgreSQL for market records. Redis supports short-lived browsing caches. JWT/RBAC constrains farmer, consumer and retailer operations. Razorpay is the proposed payment adapter, with GCP/container hosting as the reference deployment boundary.

Architecture stack and responsibilities

Scroll horizontally to compare.

Architecture stack and responsibilities
ComponentDesign responsibility
React Native · TypeScriptRole-specific listing, discovery, offer, order and tracking screens with local-language strings and clear produce-entry forms.
Node.js · Express · JWT/RBACValidate listing ownership, offer transitions, accepted terms and order access before calling payment or delivery adapters.
PostgreSQLProfiles, produce listings, offer revisions, accepted-order items, payment references, invoices and delivery events linked through stable identifiers.
RedisShort-lived produce search and market-information caches. Order quantities and payment states remain authoritative in PostgreSQL.
Razorpay adapterReference design for provider order creation, signed callback verification and reconciliation of payment references against the local order.
GCP · containersReference hosting for application services with external configuration, protected provider credentials and separate client distribution.

Market records and ownership

Scroll horizontally to compare.

Market records and ownership
RecordFields and relationship
Produce listingFarmer owner, produce type, quality description, available quantity, asking price and location. Only the owner changes stock and listing terms.
Offer revisionBuyer, listing, offered price, requested quantity and pending/accepted/rejected/withdrawn status. Counter-offers retain their own revision identity.
Order and itemsBuyer and seller identities, accepted-offer reference, agreed unit price, quantity and fulfilment terms copied into an order record.
Payment and invoiceProvider transaction reference, amount, verification status and order association. The invoice reflects the agreed terms and verified payment state.
Delivery eventOrder association, local logistics reference, status and timestamp. Delivery progress is independent of payment confirmation.

Listing, negotiation and order transitions

  • Discovery filters produce by type, location, quality and available quantity. Consumer views support individual purchases; retailer views support larger sourcing requirements.
  • A buyer submits an offer and the farmer accepts, rejects or counters it. An offer revision invalidates its previous terms for acceptance; withdrawal prevents a later acceptance.
  • Acceptance checks the offer state and available stock in a database transaction, reserves the agreed quantity and creates one order for that accepted revision. Retrying acceptance returns the existing order.
  • Order state follows accepted, awaiting payment, confirmed, preparing, dispatched and delivered, with cancellation/refund paths kept explicit. Payment and delivery have separate state records.
  • Farmer access is scoped to owned listings and incoming orders; consumers and retailers can view their own offers, payments and delivery progress.

Payment, invoices and delivery boundaries

  • The Razorpay reference adapter creates a provider payment order from the stored order amount. Client-side payment feedback alone cannot mark the local order as paid.
  • A verified callback checks signature, provider reference, amount and local order identity. A unique provider-event reference makes repeated callbacks idempotent and prevents duplicate invoice or fulfilment events.
  • Payment reconciliation resolves delayed callbacks against provider status. Failed or abandoned payment attempts remain separate from a successfully confirmed transaction.
  • An invoice preserves order identity and accepted price/quantity. The delivery adapter translates logistics updates into timestamped order events without changing the commercial agreement.
  • Local transport options provide delivery coordination. The client displays tracking progress from stored delivery events rather than assuming that successful checkout means delivery is complete.

Localisation and agricultural support

  • Local-language resources and straightforward forms support produce entry, negotiation and tracking. Listing ownership and access rules stay consistent across languages.
  • Cooperative selling associates contributions from multiple farmers with a bulk order while retaining each contribution’s quantity and seller identity.
  • Market analytics aggregates price and transaction context for selling decisions. Cached trends are distinct from the live price agreed for a specific order.
  • Agricultural extension and advisory modules deliver best-practice information through separate adapters. Advisory availability does not block core produce listing or order access.
↑ ↓ Browse · Enter Open · Esc Close