# Master Production Verification Checklist
For: Admin Panel, User Panel, Franchise Panel, MLM Engine, Payments, Security, Performance, Financial Integrity.
This is the final go-live validation sheet. Nothing should be skipped.

## Section 1 - Core System Verification
### Installation and Environment
- [ ] Installer works on fresh hosting
- [ ] Installer blocks reinstallation after completion
- [ ] .env file properly written
- [ ] Storage linked correctly
- [ ] Cron command runs via cPanel
- [ ] No Redis dependency
- [ ] Queue driver = database
- [ ] App works without SSH

## Section 2 - Ledger and Financial Integrity (Critical)
### Ledger Safety
- [ ] No ledger record ever deleted
- [ ] No UPDATE on ledger amounts
- [ ] All wallet credits come from ledger only
- [ ] Ledger indexed on (user_id, created_at)
- [ ] Matching only processes unprocessed entries

### Wallet Integrity
- [ ] All wallet changes wrapped in DB::transaction
- [ ] No direct balance editing
- [ ] No negative balance possible
- [ ] Wallet recalculation tool matches ledger
- [ ] 100 random credits/debits test = exact balance

### Matching Engine
- [ ] Joining matching only once
- [ ] Repurchase matching lifetime
- [ ] Capping applied before credit
- [ ] Carry forward correct
- [ ] No full tree recalculation
- [ ] Batch processing implemented
- [ ] Cron job logs execution

### Rank Engine
- [ ] Rank upgrade works
- [ ] Rank downgrade works
- [ ] Rank history stored
- [ ] Capping linked to rank
- [ ] Daily rank cron tested

## Section 3 - Admin Panel Verification
### Dashboard
- [ ] All numbers match ledger
- [ ] Cards clickable
- [ ] Charts correct
- [ ] No fake values

### Member Management
- [ ] Search by ID/mobile/PAN/bank
- [ ] Change sponsor safely
- [ ] Change placement safely
- [ ] Secret login works
- [ ] Block user prevents login
- [ ] Merge IDs safe and transaction-wrapped

### Identity Limit Logic
- [ ] Limit enforced at registration
- [ ] Limit enforced at KYC
- [ ] Limit enforced at joining
- [ ] Admin override possible
- [ ] Test 5 IDs limit breach blocked

### Tree Management
- [ ] Binary tree loads fast
- [ ] Weak leg highlighted
- [ ] Search works
- [ ] Rebuild tool works
- [ ] No infinite loop possible

### Wallet Control
- [ ] Admin credit creates ledger entry
- [ ] Admin debit creates ledger entry
- [ ] Freeze wallet blocks withdrawal
- [ ] No silent balance edit

### Withdrawal
- [ ] OTP required
- [ ] Wallet locked before payout
- [ ] Double request prevented
- [ ] Failed payout retried
- [ ] TDS calculation correct

### Ecommerce
- [ ] Order approval credits BV
- [ ] Cancel reverses BV
- [ ] Refund reverses income
- [ ] Duplicate order approval blocked

### UPI and Gateway
- [ ] Webhook signature verified
- [ ] Redirect URL ignored
- [ ] UTR unique constraint
- [ ] Amount tolerance applied
- [ ] Duplicate callback blocked
- [ ] Screenshot watermark works

### Reports
- [ ] Joining report correct
- [ ] BV report correct
- [ ] Income report matches ledger
- [ ] Payout report correct
- [ ] Excel export works
- [ ] PDF export works

### Repair Tools
- [ ] Recalculate wallet works
- [ ] Rebuild carry forward works
- [ ] Fix orphan nodes works
- [ ] Retry payout works
- [ ] Retry webhook works
- [ ] Maintenance mode blocks access

## Section 4 - User Panel Verification
### Dashboard
- [ ] Wallet balance accurate
- [ ] Today income accurate
- [ ] Carry forward accurate
- [ ] Rank accurate
- [ ] Active team count correct

### Referral
- [ ] Left link works
- [ ] Right link works
- [ ] Auto placement works
- [ ] QR generates correctly

### Binary Tree
- [ ] Zoom works
- [ ] Popup details correct
- [ ] Weak leg correct
- [ ] Large tree loads efficiently

### Income Page
- [ ] Matching income correct
- [ ] Direct income correct
- [ ] Rank income correct
- [ ] Ledger view matches wallet

### Wallet Transfer
- [ ] Transfer logged
- [ ] Negative balance blocked
- [ ] Transaction rollback tested

### Withdrawal
- [ ] OTP required
- [ ] KYC required
- [ ] Charge preview correct
- [ ] Status updates correctly

### Shop
- [ ] BV credited only after approval
- [ ] Invoice downloadable
- [ ] Cancel reverses ledger
- [ ] Payment verification secure

### Rank
- [ ] Progress bar accurate
- [ ] Rank history visible

## Section 5 - Franchise Panel Verification
### Dashboard
- [ ] Stock value accurate
- [ ] Today sales accurate
- [ ] Commission wallet accurate

### Create Member
- [ ] OTP verified
- [ ] Identity limit enforced
- [ ] Ledger inserted on join

### Stock
- [ ] No negative stock
- [ ] All stock movements logged
- [ ] Transfer recorded

### Sales
- [ ] Invoice generated
- [ ] BV credited properly
- [ ] Payment modes working

### Commission
- [ ] Commission credited correctly
- [ ] Withdrawal request logged

## Section 6 - Homepage Verification
- [ ] Preloader works
- [ ] Push notification registers
- [ ] Service worker active
- [ ] Lead form stores data
- [ ] Announcement popup once
- [ ] Calculator works
- [ ] SEO meta present
- [ ] Lighthouse score 90+

## Section 7 - Security Verification
- [ ] Password hashed
- [ ] CSRF enabled
- [ ] Rate limiting login
- [ ] OTP expiry enforced
- [ ] Max OTP attempts enforced
- [ ] IP logging works
- [ ] Device tracking works
- [ ] SQL injection tested
- [ ] XSS tested
- [ ] Duplicate webhook attack tested

## Section 8 - Load and Stress Test
### Simulate
- [ ] 10,000 users
- [ ] 50,000 orders
- [ ] 5,000 withdrawals
- [ ] 500 refund cases
- [ ] Cron failure simulation
- [ ] Payment retry simulation

### Check
- [ ] Wallet = ledger
- [ ] No negative balances
- [ ] No duplicate incomes
- [ ] Tree intact

## Final Go-Live Approval Criteria
System is production-ready only if:
- [ ] Installer locked
- [ ] Identity limit enforced
- [ ] Matching accurate
- [ ] Wallet never mismatches
- [ ] UPI fraud prevented
- [ ] No ledger deletion possible
- [ ] Cron stable
- [ ] Mobile fully usable
- [ ] Stress test passed

## Section 9 - Detailed Feature Matrix Baseline
- [ ] Full Admin/User/Franchise feature matrix reviewed against implementation scope
- [ ] Missing modules mapped to sprint backlog
- [ ] Feature ownership assigned per module
- [ ] UAT checklist derived from detailed matrix

Reference file:
- `docs/COMPLETE_FEATURES_LIST_ADMIN_USER_FRANCHISE.md`
- `docs/FEATURE_DELIVERY_TRACKER_ADMIN_USER_FRANCHISE.md`
- `docs/FEATURE_DELIVERY_TRACKER_ADMIN_USER_FRANCHISE_ATOMIC.csv`
