Run
npm installThen:
npm run generate-cert{{BASE_URL}}/api
- POST:
/auth/register - POST:
/auth/login
interface User {
firstName string;
lastName: string;
middleName?: string;
phoneNumber: string;
nin: string
}users (collections)
Registers Farmers details and initiate verification
- POST:
/farmers{ status: "pending" | "verified" | "rejected"; }
Action: List produce(quantity,price,harvest date, e.t.c)
- POST:
/farmers/list-produce
Buyers use the marketplace to find and purchase listed produce.
-
- Browsing & Selection: User: Buyer (via Buyer catalog page). Action: Views available produce listings. API Route: GET/produce
-
- Order Placement: User: Buyer (via Cart & checkout). Action: Creates an order. API Route: POST/orders Database Impact: orders tables
The system matches the order with a transporter, initiating the delivery.
-
- Logistics Matching: System Action: Logistics matching system assigns the order to an available Logistics Provider. API Route: POST/logistics/assign Database Impact: logistics table, notifications table.
-
- Delivery Execution: User: Logistics Provider (via Driver delivery - flow). Action: Picks up produce from Farmer and delivers to Buyer.
The system tracks the payment and Admin monitors the entire operation.
-
- Transaction Tracking: System Action: Finalizes the sale and applies the Commission per transaction (3-8%) and Logistics fees. Action: Transaction tracking. Database Impact: transactions table.
-
- Admin Oversight: User: Admin (via Admin dashboard/Admin control center). Action: Monitors all system activity, revenue, and logistics status. API Route: GET/admin/overview