# Madaar App Flow — Simple Guide

**What this document is:** One easy guide to the Customer app and the Provider app.  
**Where the prototypes live:** `final-app-flow/` folder  
**Files:**
- `Customer.html` — for truck drivers, owner-operators, and fleet managers  
- `Provide.html` — for repair shops, tow trucks, and roadside technicians  
- `Arabic/Customer.html` and `Arabic/Provide.html` — the same apps with Arabic phone screens  

Open either HTML file in a browser to click through the screens.

---

## 1. What is Madaar?

Madaar is an app marketplace for **truck roadside help**.

When a truck breaks down (flat tire, needs a tow, won’t start, etc.):

1. The **customer** asks for help in the app.  
2. Nearby **providers** send price quotes.  
3. The customer picks one quote.  
4. Money is **held safely** (not charged right away).  
5. The provider comes, fixes the problem, and takes photos.  
6. When the customer says the job is done, the money is released.  
7. Madaar takes a **10% fee**. The rest goes to the provider’s bank.

Think of it like Uber, but for **truck breakdown help** on the road.

---

## 2. The two apps (simple picture)

| | Customer app | Provider app (“Madaar Pro”) |
|---|--------------|-----------------------------|
| **Who uses it** | Drivers, owner-operators, fleet managers | Shops, tow operators, technicians |
| **Main job** | “I need help” | “I can help — here’s my price” |
| **Money** | Put a hold on the card, then pay when done | Get paid to their bank after the job |
| **Tabs** | Home, Jobs, Request, Alerts, Account | Requests, Jobs, Earnings, Ratings, Profile |

Both apps talk about the **same job**. One side requests help; the other side quotes and does the work.

---

## 3. Customer app — who can use it?

There are **three kinds of accounts**:

### A. Owner-operator
- Owns their own truck(s)  
- Pays with their own card  
- Handles everything themselves  

### B. Fleet manager
- Runs a company with several trucks and drivers  
- Can invite drivers, set spending limits, see reports, and approve big jobs  
- Sees a fleet dashboard  

### C. Company driver
- Drives a company truck  
- Uses a company / fleet card  
- Has a spending limit (example: $350 per job)  
- If the quote is over the limit, the **manager must approve** first  

---

## 4. Customer app — main happy path

This is the normal “everything went fine” flow:

1. **Sign up** — phone or email, verify code, set up profile  
2. **Allow location & notifications**  
3. **Add a truck** (plate, VIN, type, etc.)  
4. **Request help**  
   - Share location (GPS or mile marker)  
   - Pick service type (tire, tow, mechanic, jump, fuel, lockout)  
   - Add details and photos  
   - Choose how far to search and when you need help  
5. **Wait while providers are found**  
6. **Compare quotes** — price, time, rating, certified badge  
7. **Authorize payment** — card hold (not a charge yet)  
8. **Funds secured** — now the provider can start driving  
9. **Track live** — see ETA, chat or call  
10. **Provider arrives** — check plate / job code so it’s the right person  
11. **Work happens** — if extra work is needed, customer must approve  
12. **Review and confirm** — check before/after photos  
13. **Payment is captured** — money is taken for the final amount  
14. **Rate the provider**  

---

## 5. Customer app — other important screens

| Topic | What it does |
|-------|----------------|
| **My trucks** | List, add, edit, or remove trucks |
| **My jobs** | Past and current jobs |
| **Alerts** | Notifications about quotes, arrival, payments, etc. |
| **Payment methods** | Add cards (and fleet cards for companies) |
| **Help & support** | FAQ and support tickets |
| **Fleet tools** | Drivers, permissions, invites, reports, invoices (managers only) |

### When things go wrong (also designed)
- **No providers nearby** — expand search, schedule, or call support  
- **Request expired** — no one quoted in time; nothing charged  
- **Card declined** — try another card (quote held a short time)  
- **Cancel** — free before the provider is en route; travel fee may apply after  
- **Dispute** — report a problem, upload proof, get a decision (sometimes partial refund)  
- **Wrong provider** — safety options (including call emergency services if needed)  

---

## 6. Provider app — getting set up

On first launch, after the splash, new providers see **3 short intro slides**:

- **Get jobs near you** — breakdowns in your service area arrive as requests, with location, truck details and photos  
- **Send your price, win the work** — set your own price and arrival time, see your payout first; Madaar takes a flat 10%  
- **Get paid safely** — the customer’s money is secured before you drive and paid to your bank after the job is confirmed  

They can **Skip** at any time; **Get started** opens sign-up, and existing providers can **Sign in** from the slides. Providers who are already signed in skip the slides.

Then providers go through a **setup checklist** before they can take jobs:

1. Create account (OTP sign-up)  
2. Business details (name, EIN, address, etc.)  
3. Choose type: **Regular** or **Certified**  
4. Services & rates (what work they do)  
5. Service area & hours (how far they travel)  
6. Upload documents (license, insurance, W-9, ID)  
7. Certifications (for Certified only — ASE / TIA / etc.)  
8. Review and submit  

Then Madaar reviews the application (about 1–2 days in the prototype story).

- **Approved** → they can go **online** and see requests  
- **Rejected** → fix the documents and resubmit  

**Important:** They cannot go online until they are verified. If insurance expires later, matching can pause until they update documents.

---

## 7. Regular vs Certified providers

| | Regular | Certified |
|---|---------|-----------|
| **Meaning** | Business docs and insurance checked | Same, plus extra training / certificates |
| **Badge** | Regular | Certified (green shield) |
| **Benefit** | Can take jobs | Often ranked higher; customers can filter for Certified only |

The Certified badge is **not automatic**. Madaar must verify it.

---

## 8. Provider app — main happy path

1. Go **online**  
2. See **incoming requests** that match their services and area  
3. Open a request → see location, truck, photos (they do **not** see other providers’ prices)  
4. **Submit a quote** (price + ETA). They can see their amount after Madaar’s 10%  
5. If chosen and payment is held → **Job won**  
6. **Navigate** to the customer  
7. **Confirm arrival** (near the pin)  
8. Take **before photos** (required)  
9. Do the work  
10. If more work is needed → ask the customer to approve in the app  
11. Take **after photos**  
12. Mark job complete  
13. Wait for customer confirmation (or auto-confirm after about 24 hours)  
14. **Payout** goes to their bank  

They can also revise a quote, withdraw a quote, or see when they lost a job.

---

## 9. How money works (easy version)

1. Customer picks a quote.  
2. Their card gets a **hold** (money is reserved).  
3. Only then does the provider start the trip.  
4. If extra work is approved, that can add another hold.  
5. When the customer confirms the job, the hold becomes a real charge.  
6. Madaar keeps **10%**.  
7. The provider gets the rest in their bank.  
8. If there is a **dispute**, the money stays held until the issue is decided.

Madaar does **not** keep a wallet of provider money. Stripe handles the hold and payout.

---

## 10. How both apps work together (same job)

Example job: flat tire on I-35.

| Step | Customer sees | Provider sees |
|------|---------------|---------------|
| 1 | Sends request | Request appears in feed |
| 2 | Compares quotes | Sends quote |
| 3 | Authorizes payment | “Funds secured — you can drive” |
| 4 | Live map + chat | Navigation + chat |
| 5 | Approves extra work (if any) | Requests extra work |
| 6 | Confirms done | Waits for confirm → gets paid |
| 7 | Rates provider | Sees rating / can reply |

Same job ID. Same status steps. Two different views.

---

## 11. Shared job statuses (simple list)

A job usually moves like this:

1. Requested / Searching  
2. Quotes received  
3. Provider selected  
4. Payment pending → **Funds secured**  
5. Provider en route  
6. Arrived  
7. Service in progress  
8. (Optional) Extra work waiting / approved  
9. Work completed  
10. Customer confirmed  
11. Payout pending → Paid out  

Other endings: Cancelled, Expired, Disputed.

---

## 12. Trust and safety (short)

- Verified documents and insurance for providers  
- Certified badge only after review  
- Photos before and after the work  
- Chat and calls can be recorded for disputes  
- Phone numbers are masked  
- Arrival check (plate / job code) so the customer knows it’s the right provider  
- Hazmat loads only go to trained providers  

---

## 13. What’s in the `final-app-flow` folder

| Item | Why it’s there |
|------|----------------|
| `Customer.html` | Full clickable Customer app |
| `Provide.html` | Full clickable Provider app |
| `Arabic/` | Both apps with Arabic (right-to-left) phone screens |
| `assets/fonts.css` + `assets/fonts/` | App fonts (so text looks correct) |
| `assets/madaar-logo.png` | Logo file |
| `assets/madaar-mark.png` | Small logo mark |
| This document | Easy explanation of the whole flow |
| `Madaar-Mobile-Design-Guide.md` | Colors, fonts, spacing, components and motion for mobile developers |

**Tip:** In each prototype you can use the left sidebar tours (happy path, fleet, dispute, signup, etc.) and the Auto-run button to walk through screens automatically.

---

## 14. One-sentence summary

**Madaar connects truck drivers who need roadside help with nearby providers who quote a price, do the work with photo proof, and get paid after the customer confirms — with money held safely in between.**

---

*Document for the final app-flow pack. Written in plain language for product, design, and team review.*
