# iDrv4 → iDrv5 Carryover Feature Map (Diagram Pack)

Presentation-ready diagrams of the carryover features. Complexity legend:
**🟢 Port** (translate) · **🟡 Rework** (redesign logic) · **🔴 Hard rebuild** (deep/regulatory/financial/native).

---

## 1. Big-picture mindmap — every carryover feature grouped by domain

```mermaid
mindmap
  root((iDrv4 → iDrv5<br/>Carryover))
    Commercial / FMS
      Public instant quote 🟡
      Self-service booking 🔴
      Operator booking form 🔴
      Customer booking 🔴
      Booking templates 🟢
      Rate engine 5 methods 🔴
      Charge engine surcharges 🔴
      Demurrage calc 🔴
      Dyspach quote integ 🟡
    Transport / TMS
      Connote management 🔴
      Connote list + export 🟡
      Dispatch editor 🔴🔴
      Run planning 🔴
      Linehaul + Local 🔴
      15 dispatch validators 🔴
      Manifests + runsheets 🟡
      Pre-dispatch gates 🔴
      Geofence + breach 🔴
    Driver App
      Job workflow + events 🟡
      Background GPS 🔴🔴
      POD signature + photos 🟡
      Work diary / fatigue 🔴
      Vehicle inspection 🟡
      Damage reports 🟡
      Fuel capture 🟡
      Push notifications 🟡
      Offline awareness 🟡
    Fleet & Drivers
      Fleet + assets 🟡
      Insurance / rego / tyres 🟡
      Maintenance / repairs 🟡
      Driver records 🟡
      Licence classes 🟡
      Truck pairing 🟡
    Compliance
      NCR management 🔴
      Safe Driving Plan 🔴
      Fatigue / breach 🔴
      Incident reports 🟡
      Induction engine 🔴
      Alert / expiry engine 🔴
      NHVAS / WAHVAS 🟡
    Fuel
      Fuel entries 🟡
      Fuel cards 🟡
      Fuel levy 🟡
      Receipt OCR 🔴
    Finance / FinSM
      Invoicing 🔴
      Credit notes 🟡
      Xero sync 🔴
      Payroll 🔴
      Billing release gates 🟡
    Platform
      Documents 57 PDFs 🔴
      Notifications 3-tier 🟡
      Tasks + reminders 🟡
      Live map tracking 🔴
      Multi-tenancy + IAM 🔴
      Third-party OAuth API 🟡
      Dashboards + DIFOT 🟡
      Settings 22 areas 🟡
```

---

## 2. The "where the schedule lives" view — 9 hardest carryovers

```mermaid
flowchart TB
  classDef hard fill:#b3261e,stroke:#7a1812,color:#fff,font-weight:bold
  classDef med  fill:#e8a33d,stroke:#a9741f,color:#1a1a1a
  classDef note fill:#1f2937,stroke:#0b1220,color:#fff

  T["🔴 TOP 9 CARRYOVERS — these decide the timeline"]:::note

  T --> D1["1 · Dispatch editor & run planning<br/>5.5k LOC UI + 38.9k LOC service + 15 validators"]:::hard
  T --> D2["2 · Driver mobile app<br/>60+ screens · Ionic 5 uplift"]:::hard
  T --> D3["3 · Background GPS / geofence / demurrage<br/>commercial native plugin (BLOCKER)"]:::hard
  T --> D4["4 · Induction & competency engine<br/>9,920 LOC — largest file"]:::hard
  T --> D5["5 · Rate + Charge engine<br/>cubic weight + many surcharge rules ($)"]:::hard
  T --> D6["6 · Invoicing + Xero sync<br/>3.4k LOC + 35-file integration ($)"]:::hard
  T --> D7["7 · Compliance: SDP / fatigue / NCR / alerts<br/>regulatory (NHVR / CoR)"]:::hard
  T --> D8["8 · Document service<br/>57 branded/legal PDF templates"]:::hard
  T --> D9["9 · Multi-tenancy & IAM<br/>per-domain → Row-Level Security"]:::hard
```

---

## 3. iDrv4 systems → iDrv5 experience layer (what moves where)

```mermaid
flowchart LR
  classDef be fill:#0f766e,stroke:#0b544e,color:#fff
  classDef app fill:#7c3aed,stroke:#5b21b6,color:#fff
  classDef web fill:#2563eb,stroke:#1d4ed8,color:#fff
  classDef v5 fill:#1f2937,stroke:#0b1220,color:#fff

  subgraph iDrv4["iDrv4 — 5 codebases"]
    CERES["ceres (Laravel 8)<br/>146 ctrls · 283 models · 205 tables · 57 PDFs"]:::be
    NADJA["nadja (Ionic 5)<br/>Driver app · 60+ screens"]:::app
    NICOLA["nicola (Angular 11)<br/>Admin / Operations · 130k LOC"]:::web
    NARWHAL["narwhal (Angular 11)<br/>Customer Portal"]:::web
    NEBULA["nebula (Angular 11)<br/>Public Quote/Booking"]:::web
  end

  subgraph iDrv5["iDrv5 LOS — Experience Layer"]
    OPS["Operations Portal"]:::v5
    ADMIN["Admin Portal"]:::v5
    FIN["Finance Portal"]:::v5
    DRV["Driver App"]:::v5
    CUST["Customer Portal"]:::v5
  end

  CERES --> OPS & ADMIN & FIN & DRV & CUST
  NADJA --> DRV
  NICOLA --> OPS & ADMIN & FIN
  NARWHAL --> CUST
  NEBULA --> CUST
```

---

## 4. Business flow spine (every feature sits on this)

```mermaid
flowchart LR
  classDef stage fill:#16a34a,stroke:#15803d,color:#fff,font-weight:bold
  B["BOOKING<br/>quote · web · phone/email"]:::stage -->
  J["JOB CREATION<br/>accept/reject · connote"]:::stage -->
  D["DISPATCH<br/>run plan · driver+fleet"]:::stage -->
  P["PROCESSING<br/>live track · POD · events"]:::stage -->
  T["POST-TRIP<br/>invoice · payroll · payslip"]:::stage
```

> Tip: GitHub, GitLab, Notion, Obsidian, and most slide tools render Mermaid directly. To export images, paste into <https://mermaid.live> and download SVG/PNG.
