539 lines
23 KiB
Markdown
539 lines
23 KiB
Markdown
---
|
||
id: DESIGN
|
||
version: 1.1.0
|
||
status: Reviewed
|
||
last_cr: CR-001
|
||
---
|
||
|
||
# Design.md — IndiaAgriTrade (RamDayal Agri Commodities) Wholesale Trading Desk
|
||
|
||
A comprehensive UI/UX, Component Architecture, and Visual Design Specification for building the **IndiaAgriTrade RamDayal BackOffice & Wholesale Trading Desk** using **Vue 3 (Composition API / <script setup>)** and **Tailwind CSS**.
|
||
|
||
---
|
||
|
||
## 1. Executive Summary & Domain Architecture
|
||
|
||
### 1.1 Business Context
|
||
**IndiaAgriTrade (RamDayal)** represents an enterprise-grade wholesale agricultural commodity trading and back-office desk operating across major Indian Mandis (APMC markets), grain corridors, oilseed hubs, and pulse processing centers.
|
||
|
||
Key functional pillars:
|
||
1. **Trading Desk / Live Mandi Book**: Real-time bid/ask order book across spot Mandi contracts, futures arbitrage, forward booking (Wheat, Chana, Mustard, Soyabean, Paddy/Basmati, Cotton, Maize, Tur/Arhar).
|
||
2. **Trader Blotter & Position Management**: Net physical exposure (metric tons), warehouse stock receipts (WSR/e-NWR), and daily MTM (Mark-to-Market) P&L.
|
||
3. **Mandi Settlement & Procurement (APMC)**: Farmer/FPO/Arhatiya settlement, mandi cess, loading/unloading (Hamali), moisture and foreign matter deduction (Karda/Quality Assay).
|
||
4. **Logistics & Dispatch Tracking**: Rake movements, fleet truck dispatches, e-Way bills, gate-in/gate-out weighbridge sync.
|
||
5. **Quality Assay & Lab Inspection**: Lab certificates, moisture %, admixture %, damaged grain %, protein/oil content, Fair Average Quality (FAQ) standards.
|
||
6. **Financial Ledger & Khata (Vyapar Bahi)**: GST compliant invoices, TDS (194Q / 206C), trader advance vouchers, credit aging, payment netting.
|
||
|
||
---
|
||
|
||
## 2. Brand Identity & Visual Design System
|
||
|
||
### 2.1 Color Palette (Tailwind Tokens)
|
||
Designed specifically for high-density agricultural trade execution — combining earthy reliability with financial clarity.
|
||
|
||
```javascript
|
||
// tailwind.config.js theme extension
|
||
module.exports = {
|
||
theme: {
|
||
extend: {
|
||
colors: {
|
||
// Agri Brand Greens (Growth, Agriculture, APMC Trust)
|
||
agri: {
|
||
50: '#f0fdf4',
|
||
100: '#dcfce7',
|
||
200: '#bbf7d0',
|
||
500: '#15803d',
|
||
600: '#166534',
|
||
700: '#14532d',
|
||
800: '#0f3f22',
|
||
900: '#0a2a17',
|
||
},
|
||
// Grain / Earth Warm Neutrals (Wheat, Mustard, Mandi)
|
||
grain: {
|
||
50: '#fffbeb',
|
||
100: '#fef3c7',
|
||
200: '#fde68a',
|
||
400: '#f59e0b',
|
||
600: '#d97706',
|
||
700: '#b45309',
|
||
900: '#78350f',
|
||
},
|
||
// Trading Finance Semantic Signals
|
||
trade: {
|
||
bid: '#059669', // Buy / Green
|
||
bidBg: '#ecfdf5',
|
||
ask: '#dc2626', // Sell / Red
|
||
askBg: '#fef2f2',
|
||
neutral: '#475569',
|
||
hold: '#d97706',
|
||
arbitrage: '#6366f1'
|
||
},
|
||
// High-Density Data Backgrounds & Surfaces
|
||
surface: {
|
||
base: '#f8fafc',
|
||
card: '#ffffff',
|
||
subtle: '#f1f5f9',
|
||
border: '#e2e8f0',
|
||
darkBg: '#0f172a',
|
||
darkCard: '#1e293b',
|
||
darkBorder: '#334155'
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
```
|
||
|
||
### 2.2 Typography
|
||
- **Primary Interface Font**: `Inter` or `Plus Jakarta Sans` for clean tabular numbers and compact labeling.
|
||
- **Numbers & Rates**: Monospaced font family `JetBrains Mono` or tabular numerals (`tabular-nums font-mono`) for rates per quintal (₹/Qtl), weights (MT), and ledger figures.
|
||
- **Scale**:
|
||
- Micro Badges: `text-[10px] font-semibold tracking-wider uppercase`
|
||
- Compact Data Table: `text-xs leading-4 font-normal text-slate-700`
|
||
- Table Headers & Metric Labels: `text-[11px] font-bold text-slate-500 uppercase tracking-wide`
|
||
- Primary Field Values: `text-sm font-semibold text-slate-900 font-mono tabular-nums`
|
||
- Large Trading Figures / P&L: `text-xl md:text-2xl font-bold font-mono tracking-tight`
|
||
|
||
### 2.3 Layout Structure & Grid
|
||
- **Global Frame**:
|
||
- Persistent Header: Mandi clock (IST / Market Open/Close countdown), global ticker marquee (Wheat, Chana, Mustard, Soyabean, Paddy rates), quick search (`CMD+K`), active terminal profile ("RamDayal Traders - Indore Hub").
|
||
- Left Collapsible Navigation: Categorized into **Trading Desk**, **Procurement & Mandi**, **Warehouse & Logistics**, **Lab & Quality Assay**, **Financials & Ledgers**, and **Reports & Compliance**.
|
||
- Responsive Viewport: Fluid responsive container (`max-w-7xl mx-auto px-4 sm:px-6 lg:px-8`) with dense mode toggles for dual-monitor trading screens or mobile responsive drawer.
|
||
|
||
---
|
||
|
||
## 3. Site Map & Detailed Page Blueprints
|
||
|
||
### Page 1: Trading Desk & Live Mandi Terminal (`/trading-desk`)
|
||
*The command center for live commodity deals, bids, offers, and broker communications.*
|
||
- **Header Metric Strip**:
|
||
- Today's Turnover (₹ Cr & MT)
|
||
- Open Contract Value
|
||
- Net Physical Inventory (MT across Indore, Kota, Bikaner, Akola, Hapur warehouses)
|
||
- Realized Day MTM (₹ Lacs)
|
||
- **Live Commodity Ticker & APMC Board**:
|
||
- Commodity tabs: Chana Desi, Wheat Sharbati/Mill Quality, Mustard Seed (42% Oil), Soyabean Yellow, Tur Maharashtra, Basmati 1121 Pusa.
|
||
- Metrics: Spot Mandi Price (₹/Qtl), Day Change (₹ & %), Daily Arrivals (Bags/Boras), Major Mandi comparisons (e.g., Indore vs. Akola vs. Latur).
|
||
- **Quick Order Entry (Sauda Slip)**:
|
||
- Deal Type: Spot Buy (Kharid) / Spot Sell (Bikri) / Forward Sauda / Delivery Contract.
|
||
- Fields: Counterparty (Vyapari/Mill/Arhatiya), Mandi/Location, Commodity & Grade, Quantity (Qtl/MT), Rate (₹/Qtl), Delivery Terms (Ex-Mandi, FOR Mill, Loaded on Truck), Payment Terms (CAD, Advance, 7-day Khata).
|
||
- **Active Blotter (Sauda Book)**:
|
||
- Real-time list of deals executed today with statuses: `Confirmed`, `Awaiting Gate-In`, `Under Quality Assay`, `Settled`.
|
||
|
||
### Page 2: APMC Mandi Procurement & Farmer/Arhatiya Settlement (`/procurement-apmc`)
|
||
*Back-office management of mandi auction lots, weigh slips, and karda deductions.*
|
||
- **Auction Lot Intake**:
|
||
- Farmer / Arhatiya Code & Name, APMC Lot ID.
|
||
- Weighbridge Gross / Tare / Net Weight (Dharam Kanta Sync).
|
||
- **Quality & Deduction Calculation Engine**:
|
||
- Moisture Deduction (`Moisture % > 12%` automatic formula trigger).
|
||
- Foreign Matter / Admixture (`Dust/Stone %` deduction).
|
||
- Damaged/Discolored Seed Deduction (Karda rulebook).
|
||
- Net Billable Weight calculation.
|
||
- **Mandi Charges & Expense Slip**:
|
||
- APMC Mandi Fee / Cess (e.g., 1.5%), Krishi Kalyan Cess, Labour/Hamali Charges (₹/bag), Stitching/Bagging charges (Bardana charges).
|
||
- **Settlement Vouchers (J-Form / K-Form Generation)**:
|
||
- Instant generation and printing of standardized Mandi J-Form receipt with QR code verification.
|
||
|
||
### Page 3: Warehouse & Stock Receipts (e-NWR) (`/warehouse-inventory`)
|
||
*Physical stock oversight across owned godowns, CWC/SWC warehouses, and cold storages.*
|
||
- **Facility Overview Matrix**:
|
||
- Total Capacity vs Occupied (Metric Tons & Bags).
|
||
- Storage locations: Indore Central Godown, Kota Grain Silo, Bikaner Mustard Depot, Latur Pulse Facility.
|
||
- **Batch & Stack Management (Chhatta / Stack Cards)**:
|
||
- Commodity, Variety, Crop Year (e.g., Rabi 2024), Fumigation Status, Insurance Expiry.
|
||
- Electronic Negotiable Warehouse Receipt (e-NWR / WDRA) tracking for pledged bank credit limits.
|
||
- **Stock Movement Log**:
|
||
- Gate-In (Inward from Mandi/Farmer), Gate-Out (Outward dispatch to Flour/Oil Mills), Internal Stack Transfers.
|
||
|
||
### Page 4: Quality Assay & Laboratory Certification (`/quality-assay`)
|
||
*Inspection workflows for trade verification and dispute resolution.*
|
||
- **Sample Testing Workflow**:
|
||
- Sample Barcode ID, Commodity Lot link, Inspector Name, Inspection Date.
|
||
- **Parameter Analysis Form & Sliders**:
|
||
- Moisture Content (`%`), Oil Content (`%` for Mustard/Soybean), Protein (`%` for Wheat/Chana), Foreign Matter (`%`), Immature/Shriveled Grain (`%`), Weeviled/Damaged (`%`).
|
||
- **Grade Classification**:
|
||
- Auto-categorization: `Super Premium (Sharbati)`, `Grade A (FAQ)`, `Grade B (Feed Quality)`, `Rejection Criteria Exceeded`.
|
||
- **Assay Certificate Export**:
|
||
- Direct PDF/Print preview with digital stamp and trade reference.
|
||
|
||
### Page 5: Logistics, Fleet & E-Way Bill Dispatch (`/logistics-dispatch`)
|
||
*Transit execution between warehouses, processing plants, and port rakes.*
|
||
- **Dispatch Scheduling**:
|
||
- Truck Number, Driver Mobile, Transporter Name, Bilty (LR) Number.
|
||
- Rake Allocation (Goods Train wagon dispatch for bulk grain movements).
|
||
- **Compliance Integration**:
|
||
- E-Way Bill Number, E-Invoice IRN, Validity Countdown, Destination Geo-fencing.
|
||
- **Live Transit Status**:
|
||
- Route checkpoint tracking: Loaded -> Weighbridge Verified -> In-Transit -> Gate-In at Mill -> Unloaded & Weight Reconciled.
|
||
|
||
### Page 6: Financial Ledger & Counterparty Khata (Vyapar Bahi) (`/financials-khata`)
|
||
*Agricultural mercantile accounting, commission agent balances, and tax compliance.*
|
||
- **Counterparty Directory & Aging**:
|
||
- Millers, Wholesalers, Arhatiyas, Transporters, Bardana Suppliers.
|
||
- Credit Limit, Current Balance (Debit/Credit ₹), Aging Brackets (0-15d, 16-30d, 31-60d, 60d+).
|
||
- **Voucher Entry**:
|
||
- Payment Advice, Receipt, Commission (Dalali) Note, Interest Calculation for overdue payment terms.
|
||
- **Tax & Compliance Sub-Module**:
|
||
- Section 194Q TDS on purchase of goods (>₹50 Lakhs threshold monitor).
|
||
- TCS under 206C(1H), GST E-Invoicing status.
|
||
|
||
---
|
||
|
||
## 4. Vue 3 Architecture & State Management
|
||
|
||
### 4.1 Component Tree & File Organization
|
||
```
|
||
src/
|
||
├── assets/
|
||
│ └── css/
|
||
│ └── tailwind.css
|
||
├── components/
|
||
│ ├── common/
|
||
│ │ ├── BaseBadge.vue
|
||
│ │ ├── BaseButton.vue
|
||
│ │ ├── BaseCard.vue
|
||
│ │ ├── BaseInput.vue
|
||
│ │ ├── BaseSelect.vue
|
||
│ │ ├── BaseModal.vue
|
||
│ │ ├── MetricTile.vue
|
||
│ │ └── TabularNumber.vue
|
||
│ ├── layout/
|
||
│ │ ├── AppHeader.vue
|
||
│ │ ├── AppSidebar.vue
|
||
│ │ ├── MandiTickerMarquee.vue
|
||
│ │ └── QuickActionFloatingBar.vue
|
||
│ ├── trading/
|
||
│ │ ├── SaudaEntryModal.vue
|
||
│ │ ├── LiveMandiPriceGrid.vue
|
||
│ │ ├── BlotterTable.vue
|
||
│ │ └── CommodityRateChart.vue
|
||
│ ├── procurement/
|
||
│ │ ├── WeighbridgeCalculator.vue
|
||
│ │ ├── QualityDeductionPanel.vue
|
||
│ │ └── JFormReceiptModal.vue
|
||
│ ├── warehouse/
|
||
│ │ ├── StackCardGrid.vue
|
||
│ │ └── StockTransferDialog.vue
|
||
│ └── financials/
|
||
│ ├── KhataSummaryCard.vue
|
||
│ └── LedgerTransactionTable.vue
|
||
├── composables/
|
||
│ ├── useMandiTicker.js // Real-time rates & calculations
|
||
│ ├── useTradeBlotter.js // Sauda entries, filtering, MTM
|
||
│ ├── useAssayCalculator.js // Karda, moisture & deduction math
|
||
│ └── useCurrencyFormatter.js // Indian number system (Lakhs/Crores)
|
||
├── stores/
|
||
│ ├── useAuthStore.js
|
||
│ ├── useMarketDataStore.js
|
||
│ └── useTradingDeskStore.js
|
||
├── router/
|
||
│ └── index.js
|
||
└── views/
|
||
├── TradingDeskView.vue
|
||
├── ProcurementView.vue
|
||
├── WarehouseView.vue
|
||
├── QualityAssayView.vue
|
||
├── LogisticsView.vue
|
||
└── FinancialsKhataView.vue
|
||
```
|
||
|
||
### 4.2 Reusable Composables Example
|
||
|
||
#### A. Indian Currency & Agricultural Metric Formatter (`useAgriFormatters.js`)
|
||
```javascript
|
||
export function useAgriFormatters() {
|
||
// Formats to Indian Rupee notation (₹ 1,25,000)
|
||
const formatINR = (value) => {
|
||
if (value === null || value === undefined) return '₹0';
|
||
return new Intl.NumberFormat('en-IN', {
|
||
style: 'currency',
|
||
currency: 'INR',
|
||
maximumFractionDigits: 0
|
||
}).format(value);
|
||
};
|
||
|
||
// Formats rate per quintal (₹ 2,450 / Qtl)
|
||
const formatRatePerQtl = (rate) => {
|
||
return `${formatINR(rate)}/Qtl`;
|
||
};
|
||
|
||
// Formats weight in Metric Tons and Bags (50kg std)
|
||
const formatWeight = (tons) => {
|
||
const bags = Math.round((tons * 1000) / 50);
|
||
return `${tons.toLocaleString('en-IN')} MT (${bags.toLocaleString('en-IN')} Bags)`;
|
||
};
|
||
|
||
return { formatINR, formatRatePerQtl, formatWeight };
|
||
}
|
||
```
|
||
|
||
#### B. Mandi Deduction & Karda Calculation (`useAssayCalculator.js`)
|
||
```javascript
|
||
export function useAssayCalculator() {
|
||
const calculateNetPayable = ({ grossWeight, tareWeight, ratePerQtl, moisturePct, foreignMatterPct, mandiCessPct = 1.5 }) => {
|
||
const rawNetWeightKg = grossWeight - tareWeight;
|
||
|
||
// Standard tolerances: Moisture 12%, Foreign Matter 1%
|
||
const excessMoisture = Math.max(0, moisturePct - 12);
|
||
const excessForeign = Math.max(0, foreignMatterPct - 1);
|
||
|
||
const deductionPct = excessMoisture + excessForeign;
|
||
const deductionKg = (rawNetWeightKg * deductionPct) / 100;
|
||
const billableWeightKg = rawNetWeightKg - deductionKg;
|
||
const billableQtl = billableWeightKg / 100;
|
||
|
||
const grossCommodityAmount = billableQtl * ratePerQtl;
|
||
const mandiCess = (grossCommodityAmount * mandiCessPct) / 100;
|
||
const netPayable = grossCommodityAmount - mandiCess;
|
||
|
||
return {
|
||
rawNetWeightKg,
|
||
deductionKg,
|
||
billableWeightKg,
|
||
billableQtl,
|
||
grossCommodityAmount,
|
||
mandiCess,
|
||
netPayable
|
||
};
|
||
};
|
||
|
||
return { calculateNetPayable };
|
||
}
|
||
```
|
||
|
||
---
|
||
|
||
## 5. UI Component Specifications & Code Templates (Vue 3 + Tailwind)
|
||
|
||
### 5.1 Trading Metric Card Component (`MetricTile.vue`)
|
||
```vue
|
||
<script setup>
|
||
defineProps({
|
||
title: String,
|
||
value: [String, Number],
|
||
subtitle: String,
|
||
trend: Number, // positive or negative
|
||
iconBg: { type: String, default: 'bg-agri-50 text-agri-700' }
|
||
});
|
||
</script>
|
||
|
||
<template>
|
||
<div class="bg-white rounded-xl border border-slate-200 p-4 shadow-sm hover:shadow transition-shadow">
|
||
<div class="flex items-center justify-between">
|
||
<span class="text-xs font-semibold uppercase tracking-wider text-slate-500">{{ title }}</span>
|
||
<div v-if="trend !== undefined" :class="[
|
||
'flex items-center text-xs font-mono font-medium px-2 py-0.5 rounded-full',
|
||
trend >= 0 ? 'bg-emerald-50 text-emerald-700' : 'bg-rose-50 text-rose-700'
|
||
]">
|
||
<span>{{ trend >= 0 ? '▲ +' : '▼ ' }}{{ trend }}%</span>
|
||
</div>
|
||
</div>
|
||
<div class="mt-2 flex items-baseline gap-2">
|
||
<div class="text-2xl font-bold font-mono tracking-tight text-slate-900">{{ value }}</div>
|
||
</div>
|
||
<div v-if="subtitle" class="mt-1 text-xs text-slate-500 font-medium">{{ subtitle }}</div>
|
||
</div>
|
||
</template>
|
||
```
|
||
|
||
### 5.2 Live Mandi Commodity Ticker (`MandiTickerMarquee.vue`)
|
||
```vue
|
||
<script setup>
|
||
const tickerItems = [
|
||
{ commodity: 'Chana Desi (Indore)', rate: 5850, change: 45, unit: '₹/Qtl' },
|
||
{ commodity: 'Wheat Sharbati (Sehore)', rate: 3620, change: -15, unit: '₹/Qtl' },
|
||
{ commodity: 'Mustard 42% (Kota)', rate: 5410, change: 80, unit: '₹/Qtl' },
|
||
{ commodity: 'Soyabean Yellow (Ujjain)', rate: 4680, change: 10, unit: '₹/Qtl' },
|
||
{ commodity: 'Tur Maharashtra (Akola)', rate: 10250, change: -110, unit: '₹/Qtl' },
|
||
{ commodity: 'Basmati 1121 Paddy (Karnal)', rate: 4200, change: 25, unit: '₹/Qtl' }
|
||
];
|
||
</script>
|
||
|
||
<template>
|
||
<div class="bg-slate-900 border-b border-slate-800 text-slate-200 py-1.5 px-4 overflow-hidden">
|
||
<div class="flex items-center gap-6 overflow-x-auto no-scrollbar whitespace-nowrap text-xs">
|
||
<div class="flex items-center gap-1.5 font-bold text-amber-400 uppercase tracking-wider text-[11px] shrink-0">
|
||
<span class="relative flex h-2 w-2">
|
||
<span class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
|
||
<span class="relative inline-flex rounded-full h-2 w-2 bg-emerald-500"></span>
|
||
</span>
|
||
Live Mandi Rates
|
||
</div>
|
||
<div class="flex items-center gap-6">
|
||
<div
|
||
v-for="item in tickerItems"
|
||
:key="item.commodity"
|
||
class="flex items-center gap-2 border-r border-slate-700/80 pr-6"
|
||
>
|
||
<span class="font-medium text-slate-300">{{ item.commodity }}</span>
|
||
<span class="font-mono font-bold text-white tabular-nums">₹{{ item.rate.toLocaleString('en-IN') }}</span>
|
||
<span
|
||
:class="item.change >= 0 ? 'text-emerald-400' : 'text-rose-400'"
|
||
class="font-mono text-[11px] font-semibold tabular-nums"
|
||
>
|
||
{{ item.change >= 0 ? '+' : '' }}{{ item.change }}
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
```
|
||
|
||
### 5.3 Sauda Entry Form Dialog (`SaudaSlipModal.vue`)
|
||
```vue
|
||
<script setup>
|
||
import { reactive } from 'vue';
|
||
|
||
const props = defineProps({
|
||
isOpen: Boolean
|
||
});
|
||
const emit = defineEmits(['close', 'submit']);
|
||
|
||
const form = reactive({
|
||
dealType: 'BUY',
|
||
commodity: 'Chana Desi',
|
||
mandi: 'Indore Mandi',
|
||
counterparty: '',
|
||
quantityMt: 50,
|
||
ratePerQtl: 5850,
|
||
deliveryTerms: 'EX_MANDI',
|
||
paymentDays: 7
|
||
});
|
||
|
||
const calculateTotal = () => {
|
||
const qtl = form.quantityMt * 10;
|
||
return qtl * form.ratePerQtl;
|
||
};
|
||
</script>
|
||
|
||
<template>
|
||
<div v-if="isOpen" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/60 backdrop-blur-sm">
|
||
<div class="bg-white rounded-2xl shadow-2xl max-w-lg w-full border border-slate-200 overflow-hidden">
|
||
<div class="bg-agri-700 text-white px-6 py-4 flex items-center justify-between">
|
||
<div>
|
||
<h3 class="font-bold text-lg">New Sauda Slip (Trade Booking)</h3>
|
||
<p class="text-xs text-agri-100">RamDayal Wholesale Trading Desk</p>
|
||
</div>
|
||
<button @click="emit('close')" class="text-agri-200 hover:text-white text-xl leading-none">×</button>
|
||
</div>
|
||
|
||
<form @submit.prevent="emit('submit', { ...form, totalAmount: calculateTotal() })" class="p-6 space-y-4">
|
||
<!-- Deal Type Toggle -->
|
||
<div class="grid grid-cols-2 gap-2 p-1 bg-slate-100 rounded-lg">
|
||
<button
|
||
type="button"
|
||
@click="form.dealType = 'BUY'"
|
||
:class="form.dealType === 'BUY' ? 'bg-emerald-600 text-white shadow' : 'text-slate-600'"
|
||
class="py-2 text-xs font-bold uppercase rounded-md transition"
|
||
>
|
||
Kharid (Buy)
|
||
</button>
|
||
<button
|
||
type="button"
|
||
@click="form.dealType = 'SELL'"
|
||
:class="form.dealType === 'SELL' ? 'bg-rose-600 text-white shadow' : 'text-slate-600'"
|
||
class="py-2 text-xs font-bold uppercase rounded-md transition"
|
||
>
|
||
Bikri (Sell)
|
||
</button>
|
||
</div>
|
||
|
||
<div class="grid grid-cols-2 gap-4">
|
||
<div>
|
||
<label class="block text-xs font-bold uppercase text-slate-500 mb-1">Commodity</label>
|
||
<select v-model="form.commodity" class="w-full text-sm border-slate-200 rounded-lg focus:ring-agri-600">
|
||
<option>Chana Desi</option>
|
||
<option>Wheat Sharbati</option>
|
||
<option>Mustard Seed</option>
|
||
<option>Soyabean Yellow</option>
|
||
<option>Tur Whole</option>
|
||
</select>
|
||
</div>
|
||
<div>
|
||
<label class="block text-xs font-bold uppercase text-slate-500 mb-1">Mandi / Hub</label>
|
||
<select v-model="form.mandi" class="w-full text-sm border-slate-200 rounded-lg">
|
||
<option>Indore Mandi</option>
|
||
<option>Kota APMC</option>
|
||
<option>Bikaner Grain Market</option>
|
||
<option>Akola APMC</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div>
|
||
<label class="block text-xs font-bold uppercase text-slate-500 mb-1">Counterparty (Vyapari / Mill)</label>
|
||
<input
|
||
v-model="form.counterparty"
|
||
placeholder="e.g. Shrinath Agro Industries, Ujjain"
|
||
class="w-full text-sm border-slate-200 rounded-lg"
|
||
required
|
||
/>
|
||
</div>
|
||
|
||
<div class="grid grid-cols-2 gap-4">
|
||
<div>
|
||
<label class="block text-xs font-bold uppercase text-slate-500 mb-1">Quantity (MT)</label>
|
||
<input type="number" v-model.number="form.quantityMt" class="w-full font-mono text-sm border-slate-200 rounded-lg" />
|
||
<span class="text-[11px] text-slate-400">{{ form.quantityMt * 10 }} Quintals ({{ form.quantityMt * 20 }} Bags)</span>
|
||
</div>
|
||
<div>
|
||
<label class="block text-xs font-bold uppercase text-slate-500 mb-1">Rate (₹ / Qtl)</label>
|
||
<input type="number" v-model.number="form.ratePerQtl" class="w-full font-mono text-sm border-slate-200 rounded-lg" />
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Real-time calculation badge -->
|
||
<div class="bg-amber-50 border border-amber-200 rounded-xl p-3 flex justify-between items-center">
|
||
<span class="text-xs font-semibold text-amber-900">Total Contract Value:</span>
|
||
<span class="text-base font-bold font-mono text-amber-950">₹ {{ calculateTotal().toLocaleString('en-IN') }}</span>
|
||
</div>
|
||
|
||
<div class="pt-2 flex justify-end gap-3">
|
||
<button type="button" @click="emit('close')" class="px-4 py-2 border border-slate-200 text-xs font-semibold text-slate-600 rounded-lg">Cancel</button>
|
||
<button type="submit" class="px-6 py-2 bg-agri-600 hover:bg-agri-700 text-xs font-bold text-white rounded-lg shadow">Confirm Sauda</button>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
```
|
||
|
||
---
|
||
|
||
## 6. Responsive Strategy & Mobile Mandi Trader UX
|
||
|
||
Agricultural trading operators frequently shift between desktop multi-column screens at the trading desk and smartphone screens while in the field at APMC yards or godowns.
|
||
|
||
1. **Card-Based Row Collapsing**:
|
||
- On desktop, view dense data grids (`table` layout with 10+ columns: Sauda No, Time, Commodity, Counterparty, Qty, Rate, Total, Status, Action).
|
||
- On mobile (`< 768px`), automatically collapse tables into high-contrast swipeable cards showing Commodity badge, Net Qtl, Rate in large mono font, and quick call/WhatsApp buttons for counterparties.
|
||
2. **Offline Resilience & Touch Targets**:
|
||
- Touch targets for trade execution buttons ≥ 44px × 44px.
|
||
- PWA ready design with local cache for mandi price sheets when network in rural APMC yards drops.
|
||
3. **Hindi / Bilingual Terminology Support**:
|
||
- Labels pair formal English with conversational Mandi Hindi terms (e.g., *Kharid/Buy*, *Bikri/Sell*, *Bora/Bag*, *Bardana/Packaging*, *Karda/Deduction*, *Hamali/Labor*).
|
||
|
||
---
|
||
|
||
## 7. Implementation Roadmap & Quickstart
|
||
|
||
```bash
|
||
# 1. Initialize Vue 3 project with Vite & Tailwind CSS
|
||
npm create vite@latest india-agri-trade -- --template vue
|
||
cd india-agri-trade
|
||
npm install -D tailwindcss postcss autoprefixer @tailwindcss/forms
|
||
npx tailwindcss init -p
|
||
|
||
# 2. Key recommended libraries
|
||
npm install pinia vue-router lucide-vue-next
|
||
```
|
||
|
||
This specification provides the full architectural, functional, and aesthetic blueprint to implement the **IndiaAgriTrade RamDayal BackOffice & Wholesale Trading Desk** in Vue 3 with Tailwind CSS.
|
||
|
||
|
||
## CR-001 — Authentication UI Boundary
|
||
|
||
This design specification does not define the UC-001 login, authorization-denial, or logout screens and flows. The `useAuthStore.js` project-tree reference is not a screen or session contract. Those portal routes and states remain pending the UC-001 wireframe specification; tenant selection and membership screens belong to UC-019. Do not infer token lifetime, signing algorithm, revocation mechanism, or cross-tenant role behavior from this document.
|