# Digital Aura Business Suite — Implementation Roadmap (Phases 9–24)

## Overview
This roadmap tracks the completion of remaining phases (9–24) from the master PLAN.md.
Each phase is completed 100% before moving to the next.

---

## Phase Progress Tracker

| Phase | Module | Priority | Status | Commit |
|-------|--------|----------|--------|--------|
| 9 | Inventory (Stock/Transfers UI) | HIGH | ✅ Complete | 8a5b9f8 |
| 10 | Vehicle Management (GPS, Fuel, Assignment) | CRITICAL | ✅ Complete | 9b1d027 |
| 11 | Vehicle Sales (Vehicle POS flow) | CRITICAL | ✅ Complete | cdbe276 |
| 12 | Credit Management (Aging, Reminders) | CRITICAL | ✅ Complete | f3cd908 |
| 13 | Purchasing (PO, GRN UI) | MEDIUM | ✅ Complete | 2075a3e |
| 15 | Accounting (COA, Journal, Bank UI) | MEDIUM | ✅ Complete | e8713c8 |
| 18 | Settings (Full settings UI) | MEDIUM | ✅ Complete | — |
| 19 | Communications (SMS/WhatsApp/Email) | HIGH | ✅ Complete | — |
| 20 | Reports (Cash, Vehicle, Credit Aging, Sales) | MEDIUM | ✅ Complete | — |
| 21 | REST API + Sync Endpoint | MEDIUM | ✅ Complete | 1182979 |
| 23 | Testing (More coverage) | MEDIUM | ✅ Complete | d800212 |
| 24 | Deployment & Documentation | LOW | ✅ Complete | — |

---

## Questions / Open Items

| # | Question | Status |
|---|----------|--------|
| 1 | Report pages use `AuthenticatedLayout` instead of `AppLayout` — should they be migrated for consistency? | Open |
| 2 | `Sale` model uses `created_at` for timestamps but `ReportController::salesReport()` queries `sale_date` — which is correct? | Open |
| 3 | `PurchaseOrder` status enum doesn't include `received` but `PurchaseOrderController::receive()` sets it — should the enum be updated? | Open |
| 4 | `VehicleTrip` migration may not exist for `TripController` routes — needs verification | Open |
| 5 | `CreditReminder` references `invoice_id` but controller creates with `customer_id` — schema mismatch? | Resolved (Phase 12) |
| 6 | Should we add a dedicated `SaleFactory` for more comprehensive sales testing? | Open |
| 7 | The `SyncController::syncSale()` queries by `uuid` column — should the `sales` model use `HasUuidColumn` for this? | Open |
| 8 | API rate limiting should be added for production (currently none) | Open |

### Phase 9: Inventory (Stock/Transfers UI)
**Goal:** Complete stock management UI with adjustments, transfers, and movement history.
- [ ] Stock Adjustment UI (create adjustment, enter counted quantities, approve)
- [ ] Stock Transfer UI enhancements (track transfer status, receive confirmation)
- [ ] Stock Movement history page with filters
- [ ] Product stock overview per store with low-stock alerts
- [ ] Barcode-based stock lookup

### Phase 10: Vehicle Management
**Goal:** Complete vehicle fleet management with GPS, fuel, and assignments.
- [ ] Vehicle stock loading/offloading UI
- [ ] GPS tracking dashboard with map view
- [ ] Geofence management with alerts
- [ ] Fuel record management with cost tracking
- [ ] Maintenance scheduling and history
- [ ] Vehicle trip tracking

### Phase 11: Vehicle Sales
**Goal:** Enable POS transactions from vehicles with stock deduction.
- [ ] Vehicle POS interface (tablet/mobile friendly)
- [ ] Vehicle stock sync with store
- [ ] Sales recording from vehicle with stock deduction
- [ ] End-of-day vehicle sales reconciliation
- [ ] Vehicle sales reports

### Phase 12: Credit Management
**Goal:** Complete credit system with aging reports and auto-reminders.
- [ ] Credit sale creation flow
- [ ] Credit payment recording
- [ ] Credit aging report with 30/60/90/120+ day buckets
- [ ] Auto-reminder scheduling (SMS/WhatsApp/Email)
- [ ] Credit limit management
- [ ] Write-off functionality

### Phase 13: Purchasing
**Goal:** Complete purchase order and goods receiving workflow.
- [ ] Purchase order creation with product selection
- [ ] PO approval workflow
- [ ] Goods Received Note (GRN) creation
- [ ] GRN stock increment
- [ ] Supplier return management
- [ ] PO status tracking

### Phase 15: Accounting
**Goal:** Complete chart of accounts, journal entries, and bank management.
- [ ] Chart of Accounts management (add/edit/toggle accounts)
- [ ] Journal entry creation with double-entry validation
- [ ] General Ledger view
- [ ] Bank account management
- [ ] Bank reconciliation
- [ ] Trial balance report

### Phase 18: Settings
**Goal:** Complete system settings management.
- [ ] Company profile settings (name, address, logo, tax number)
- [ ] Tax configuration (add/edit tax rates)
- [ ] Currency settings
- [ ] Role & permission management
- [ ] Notification settings
- [ ] Store-specific settings

### Phase 19: Communications
**Goal:** Complete multi-provider notification system.
- [ ] SMS provider configuration (Twilio)
- [ ] WhatsApp provider configuration (Meta API)
- [ ] Email configuration
- [ ] Notification template management
- [ ] Test message sending
- [ ] Notification log viewer

### Phase 20: Reports
**Goal:** Complete report generation with PDF/Excel export.
- [ ] Sales report with date range and store filters
- [ ] Product performance report
- [ ] Inventory valuation report
- [ ] Financial summary report
- [ ] Customer outstanding report
- [ ] Fleet utilization report
- [ ] PDF/Excel export for all reports

### Phase 21: REST API + Sync
**Goal:** Complete API endpoints for mobile/offline sync.
- [ ] Full product API (CRUD, stock)
- [ ] Sales API (create, list, show)
- [ ] Customer API (CRUD)
- [ ] Stock sync endpoint
- [ ] Offline sync conflict resolution
- [ ] API documentation

### Phase 23: Testing
**Goal:** Achieve comprehensive test coverage.
- [ ] Unit tests for all models
- [ ] Feature tests for POS workflows
- [ ] Feature tests for inventory operations
- [ ] Feature tests for credit management
- [ ] Feature tests for purchasing
- [ ] API endpoint tests

### Phase 24: Deployment & Documentation
**Goal:** Production deployment and documentation.
- [ ] Deployment guide (DigitalOcean/Vercel/Docker)
- [ ] Environment configuration guide
- [ ] User manual
- [ ] API documentation
- [ ] Contributing guidelines

---

## Notes
- Each phase is committed separately with a descriptive message
- All changes follow existing code conventions (React + Inertia.js + Tailwind)
- Backend follows Laravel patterns (Controllers, Services, Actions)
- Frontend uses Shadcn UI components and Lucide icons
