Skip to content

Latest commit

 

History

History
109 lines (94 loc) · 2.26 KB

TODO.md

File metadata and controls

109 lines (94 loc) · 2.26 KB

Farmer's Dashboard

  1. Manage {Products|Produce|Crops}

    • List with + on bottom and - next to each item

      Items
      Matar (-) {in RED}
      Gajar (-)
      {+Add new}
    • Add new

      • (With an option to search through all categories)
      Categories:
      Fruits
      Vegetables
      Pulses
      Grains
      Spices
    • Units of measurements

      • Quintal (Kg)
      • Ton
      • Kg
  2. View Orders

    • (Two tabs)
    • Past orders
    • Open orders

| Orders | |Past|Open|

  1. Account Settings

On UserSchema Products: [ { category: <Category (String)> item: original units: total quantity: double representing Kg available quantity: double representing Kg price: ₹ per Kg } ]

  1. Endpoints
    • /otp (Rate-limited?) POST: { phone_number: String regex: /+\d{0,3} \d{10}/ } RET: { status: "OK" } else: { status: "Invalid Phone" }

    • /authenticate POST: { phone_number: String, regex: /+\d{0,3} \d{10}/

      otp: String regex: /+\d{4}/ } RET: { status: "OK" + Set Cookie (X-User-Auth-Token) Header } else: { status: "Invalid Phone" | "Invalid OTP" | "Access denied" }

    • /user GET: {} RET: { status: "OK" user: {Authenticated user} } else: { status: "Access denied" }

    • /users/add POST: { farmer/wholesaler

      name regex: /\w{3}/ } RET: { status: "OK" } else: { status: "User already exists" | "Incomplete data" }