# Requirements

Distilled from `water_king_software_model.pdf` — the Software Requirement
Specification presentation for **Amar Auto Drinking Water**.

## Core objectives

1. **Asset Tracking** — track every 19L jar and dispenser live: location, customer
   assignment, current status, in real time.
2. **Logistics Automation** — automate deliverymen & drivers' daily activity, duty
   hours, fuel cost, trip history.
3. **Financial Transparency** — daily income/expense, customer billing, VAT/tax, and
   dues (Due) tracked accurately.
4. **Role-Based Access** — secured login and panel-specific permissions for each staff
   tier (Admin, Manager, Accountant, Field staff).

## Modules (from the slides)

### 1. Asset — 19L Jar & Supply Chain
- **Unique serial generation** — a unique serial + QR code generated the first time a
  jar enters the system.
- **In/Out scanning** — scan QR on delivery to customer and on empty-jar return.
- **Consumption analytics** — auto-track how many jars a customer takes daily/weekly/monthly.
- **Refill history** — how many times a jar was refilled, and its lifespan.

### 2. Accessory & Inventory
- **Plastic dispensers** — serial-numbered, transfer history per customer.
- **Hand pumps** — serial-generated, customer-wise stock.
- **Hot & cool electric dispensers** — unique serial allocation, return→factory/3rd-party
  servicing when damaged, lifetime servicing history + parts change + maintenance cost.

### 3. Customer Management & Billing
- **Customer CRM** — name, mobile, address, exact geo-location (GPS coordinate).
- **Digital delivery logging** — on-the-spot QR scan, cash or digital payment confirmation.
- **Automated billing** — auto-generate water bill & invoice per customer category/profile
  at day/week/month end.
- **Omnichannel notifications** — auto-send bill + payment link via WhatsApp, SMS, email.

### 4. Field Force & Fleet (Logistics)
- **Deliveryman panel** — profile, active-shift duty-hours tracking, daily delivery
  counter, real-time "who delivered how many jars to which customer when".
- **Driver & vehicle panel** — which driver took which delivery van with whom; meter
  mileage in at duty start and out at end.
- **Fuel log** — vehicle diesel purchase & cost entry.
- **Payroll integration** — auto salary calc from work-hours + duty attendance.

### 5. Corporate HR, Accounts & Taxes
- **HR directory** — central DB of factory, logistics & office staff.
- **Daily ledger** — all income (water + accessory sales, servicing charge) and expense
  (fuel, staff salary, factory utility bills).
- **Compliance management** — automated accounting closing + VAT/Tax calculation reports.

## User roles & access

| Role | Access level |
|------|--------------|
| **Super Admin (Owner)** | Full business dashboard, financial ledger, P&L, VAT/Tax, staff permission control |
| **Manager** | Customer onboarding, route planning, inventory stock tracking, staff duty assignment |
| **Accountant** | Billing entry, daily ledger input, customer due collection, expense tracking |
| **Delivery / Driver** | Mobile-only access: daily delivery route map, customer address, QR scanner panel |

## Dashboard & reports

- **Interactive dashboard** — daily total sales volume, live cash collection, jars
  running in field, overall business overview as graphical charts.
- **Custom reports** — sales & revenue (daily/weekly/monthly), customer due & collection
  efficiency, jar damage & dispenser servicing history, vehicle km mileage vs fuel cost.

## Technical expectations

- **Offline-first** — _(De-scoped by the client — see ROADMAP. App now assumes online.)_
- **Scalability** — DB + code architecture must stay performant even if customer/jar
  count grows 100×.
- **Cross-platform** — central web dashboard for back-office/admin; mobile-friendly for
  field staff. _(Single responsive web app chosen instead of native apps.)_

## Decisions taken (deltas from the PDF)

| Topic | PDF | Decision |
|-------|-----|----------|
| Offline sync | Required | **De-scoped** — online-only (per client) |
| Mobile | Android + iOS native apps | **Responsive web** (Blade), PWA later if needed |
| Frontend | (open) | **Laravel Blade** + Valex theme |
| Database | (open) | **MySQL** (shared server with VMS) |
| Multi-company | (implied single) | **Multi-tenant SaaS** (like VMS) — explicit client ask |
