The Nandini admin panel is a Next.js web dashboard used by the operations team to run the whole
platform: customer & B2B orders, catalog, distributor network, delivery fleet, zones & slots,
pricing & coupons, support, billing and system configuration. Admins sign in with
email + password; every page sits behind JWT role-gated APIs (admin role).
This page is the functional reference for each module.
The landing page after login and the operational heart of the panel. Shows every order on the platform in a searchable, filterable table, split into Customer orders (B2C) and B2B orders (distributor stock purchases) tabs.
Search & filters — free-text search (order ID, customer name, phone) plus status filter: Placed, Confirmed, Preparing, Out for delivery, Delivered, Cancelled, Failed.
Auto-assignment visibility — when the engine auto-assigns the nearest distributor (3-tier: GPS distance → territory keyword → fallback), the row shows the distributor with an AUTO badge so ops can tell automatic from manual routing.
Manual distributor assignment — for unassigned or rejected orders, a modal lists the nearest distributors (with distance and a map preview) so the admin can route the order by hand.
Order detail — items, quantities, variant, amounts, payment mode (Razorpay / COD / wallet), delivery address with lat/lng, delivery OTP, assigned distributor and rider, and the full status timeline.
Status overrides — admins can advance or cancel an order when a distributor or rider cannot (refund handling is manual for now).
2 · Product management core
/dashboard/products
Catalog CRUD for everything sold in the consumer app — milk, curd, ghee, paneer, sweets, ice-cream and the rest of the Nandini range.
Create / edit product — name, description, category & sub-category, images, MRP, selling price, tax, unit and variants (e.g. 500 ml / 1 L) each with its own price and stock flag.
Categories — the 8-tile category grid and the home-screen rails on the app are driven entirely from this catalog; rail placement follows category + tags.
Sponsor / featured configuration — mark products as sponsored so they carry the sponsor badge and surface higher in rails and search.
Availability — toggle a product (or a single variant) off without deleting it; it disappears from the app instantly.
3 · Shop management
/dashboard/shops
Manages depot/shop entities and which products each shop carries.
Product assignment — attach catalog products to a shop so serviceability and stock are evaluated per-shop.
Shops are what the nearest-distributor engine measures distance against when auto-assigning an order.
4 · Distributor management core
/dashboard/distributors
The B2B side of the network — every depot owner who buys stock and fulfils customer orders in their territory.
Onboarding queue — applications from the “Become a distributor” flow arrive here for review.
KYC review — uploaded documents (Aadhaar, PAN, GST, FSSAI, shop photos via ImageKit) are approved or rejected with a reason; rejection prompts re-upload in the distributor app.
Approve / suspend — controls whether the distributor can receive orders and buy stock.
Document verification — driving licence, RC, insurance, PUC, Aadhaar; approve or reject each with a reason (rider re-uploads from the app).
Availability & assignment — see who is online (live isAvailable from the app toggle), current load, and manually assign a rider to an order.
Earnings & settlements — per-rider delivery earnings, tips, COD collected and cash-out (settlement) history.
Leave requests — approve / reject leave submitted from the rider app.
6 · Zone management
/dashboard/zones
Defines the serviceable areas of the platform.
Zone CRUD — name, pin codes / boundary, linked depot(s), active toggle.
The consumer checkout runs a serviceability check (nearest distributor within the configured max radius) against these zones — out-of-zone addresses see the “Out of delivery zone” screen.
7 · Delivery slot management
/dashboard/delivery-slots
CRUD for the delivery windows shown at checkout (e.g. Tomorrow 6:00–8:00 AM).
Slot definition — label, start/end time, cut-off time for ordering, capacity, active days.
Subscription slots — morning routine slots used by daily-milk subscriptions are managed from the same list.
8 · Delivery system configuration
/dashboard/delivery-system
Tuning for the auto-assignment and delivery engine (stored in SystemConfig).
Max assignment radius — how far (km) the engine searches for the nearest distributor.
Assignment mode toggles — enable/disable GPS-distance tier, territory-keyword tier and the fallback distributor.
Order alert window — seconds a rider has to accept a new order before it re-queues (18 s default in the app design).
9 · Subscription management
/dashboard/subscriptions
Oversight of daily/weekly milk routines created in the consumer app.
Subscription list — customer, product & quantity, frequency, slot, status (active / paused / ended), next delivery date.
Wallet linkage — each delivery auto-deducts from the customer’s subscription wallet; admins can see balance and deduction history, and pause routines that go into low balance.
Plan templates — the fixed plans offered in the app (e.g. 30-day 1 L daily) are configured here.
10 · Coupon management
/dashboard/coupons
Promotional pricing for B2C and B2B audiences.
Coupon CRUD — code, type (flat / percentage), value, min cart, max discount, start & end dates, usage caps.
Role targeting — restrict a coupon to customers, distributors or delivery partners.
Coupons appear automatically in the consumer app’s Coupons screen and validate at checkout.
11 · Stock & inventory
/dashboard/stocks
Platform-level stock view across depots.
Per-depot inventory — on-hand quantity by SKU, fed by B2B purchases and decremented by customer orders.
Low-stock alerts — thresholds that also drive the distributor app’s inventory warnings.
B2B dispatch — mark distributor stock orders as dispatched (vehicle details) and verify depot receipt with the B2B receipt OTP.
12 · Invoices & billing
/dashboard/invoices
Financial paper-trail for the B2B side.
Invoice list — every distributor stock purchase generates an invoice: number, depot, amount, tax, due date, paid/unpaid status.
Payment reconciliation — record wallet, Razorpay or offline payments against an invoice.
13 · Revenue reports
/dashboard/revenue
Money dashboards for management.
Sales overview — GMV, order counts and average order value over day / week / month, split B2C vs B2B.
Breakdowns — by category, by zone, by distributor; payment-mode split (prepaid / COD / wallet).
14 · Settlements
/dashboard/settlements
Processing of money owed to the field — rider cash-outs and distributor payouts.
Rider cash-outs — withdraw requests from the rider app (instant UPI) arrive here for approval; settlement history shows period, amount and status (Paid / Processing / Failed).
COD reconciliation — cash collected by riders against what they have deposited.
15 · Complaint queue
/dashboard/complaints
Customer complaints submitted from the app’s Help section.
Queue — complaint text, customer, related order, created date.
Status workflow — Open → In progress → Resolved, with internal notes.
16 · Support helpdesk chat
/dashboard/chat
Live agent view of the in-app support chat (used today by distributors; bot triage first, then human takeover).
Thread list — open conversations with unread counts; each thread shows the full message history.
Agent actions — reply in real time (Socket.io), mark resolved; the app then prompts the user for a rating.
17 · System settings
/dashboard/settings
Global platform switches stored in SystemConfig.
Service parameters — max delivery distance, default depot, feature toggles.
Admin account — change password; additional admin users are provisioned at the database level for now.
Platform foundation (for reference)
Everything above runs on a shared backend: Express + MongoDB with 19 data models and 100+ REST endpoints, JWT role-based auth (customer / distributor / delivery_boy / admin), Socket.io for real-time order events, Razorpay for payments, ImageKit for KYC uploads, and Google Maps / Nominatim for geocoding, directions and the nearest-distributor engine. The admin panel is the Next.js frontend of that same API.