# HATEM AUTO RENTAL — Project Understanding & Design Discovery (for owner review)

> **⚠️ SUPERSEDED ON BRAND MATTERS (2026-11-30).** Any mention below of a shield logo, blue/silver colours, or the teal/copper palette being "not the brand" is out of date. The approved brand is Horizon H: see `BRAND_GUIDELINES.md`. The rest of this document (business, workflow, audit findings) remains valid unless another document says otherwise.

Status: **ALIGNMENT PHASE.** Nothing is being designed, coded or changed. Prepared 2026-11-30.
Markers: **[FACT]** = you confirmed it, or I read it in a real file · **[RECOVERED]** = exact value taken from the prototype file · **[MISSING]** = not found anywhere I can access · **[PROPOSAL]** = my recommendation, needs your decision.

---

## ✅ Owner decisions recorded (2026-11-30, 10:4x)
1. **Brand: Horizon H is final.** Shield / blue-silver is retired. The blue/silver draft canvas is kept untouched as a superseded reference; I won't build on it.
2. **Brand-tab assets:** the owner will send the link or files. No brand rules are reconstructed until then.
3. **In v1:** Compare 2–3 vehicles · Staff-created requests (needs a small DB addition, to be designed and tested before approval) · WhatsApp quick replies for staff. **Postponed:** guest lookup by reference + phone, Smart Match.
4. **Copper is an accent only.** Teal does all buttons and links; copper is for the arc, dividers, large headings and highlights. Palette unchanged.
5. ~~**Pending correction:** CLAUDE.md and DESIGN_SYSTEM.md still describe blue/silver.~~ **Done 2026-11-30:** both now follow BRAND_GUIDELINES.md.

---

## ⚠️ 0. A contradiction to resolve first (resolved: see decisions above)
- Earlier today you wrote: *"Original shield logo · Blue and silver identity"*. I followed that. I recorded teal/copper as "not the brand" in DESIGN_SYSTEM.md and CLAUDE.md, and started a **draft blue/silver design canvas** ("HATEM AUTO RENTAL — Web & Admin Design v1 (draft)": design-system board, header/footer/sidebar, Home, Fleet, Vehicle details, Request form, Request submitted, Sign-in). It was stopped when you interrupted.
- Today's brief says the identity is **Horizon H** (teal / copper / sand, Fraunces / Manrope / Tajawal). **That matches the prototype file exactly** (§D).
- **Until you confirm,** I'm treating Horizon H as the brand and the blue/silver canvas as **superseded but not deleted**. I haven't edited CLAUDE.md or DESIGN_SYSTEM.md, because you asked for no file edits in this phase. Both need correcting once you confirm.

---

## A. Business understanding
- **[FACT]** Individually owned car rental business in **Tripoli, Lebanon**; fleet of **10–30 vehicles**; most users are on **mobile**; **Arabic + English**; channels are the **website + WhatsApp**.
- **[FACT]** It needs a working **rental platform**, not just a marketing site. Two audiences:
  - **Customers:** discover, browse/filter, **compare**, view details, submit requests, contact via WhatsApp, track requests.
  - **Owner / staff:** vehicles, incoming requests, customers, calendar, availability and conflicts, statuses, business settings.
- **[FACT]** No online payments and no instant booking. Prices and availability are **not yet verified**, so nothing is invented.
- **Operational reality:**
  - One small team handles everything, often from a phone.
  - Many conversations happen on WhatsApp.
  - The system must be **the record of truth**, with WhatsApp only as the conversation channel.

## B. Product architecture
```
PUBLIC WEBSITE (AR/EN, mobile-first)              ADMIN SYSTEM (AR/EN, desktop-first, usable on phone)
 Home ─► Fleet (filter, compare) ─► Vehicle ─┐     Overview (today's pickups/returns, new requests, conflicts)
                                            ▼     Rental requests ─► Request detail (review · quote · approve · modify · close)
                     Rental request form ─► Submitted ─► WhatsApp continuation   │
                                            │                              ▼
 My requests (guest device / signed-in) ◄───┘     Availability calendar (confirmed reservations + maintenance blocks)
                                                  Vehicles ─► Add/Edit (owner verifies → publish)
            ─────────── ONE DATABASE (Supabase) ───────────   Customers ─► Customer detail (requests, notes, block)
            requests · statuses · vehicles · blocks · customers   Business settings (WhatsApp no., contacts, …)
                                                  Staff & access (owner manages staff)
```
**How the parts connect:**
- Every request, from the website *or* entered by staff after a WhatsApp/phone conversation, is stored as one **rental request** record.
- **Only confirmation creates a vehicle block.**
- The calendar shows blocks.
- The public site only reads published vehicles plus a "known conflict" hint.
- WhatsApp is reached through prepared links in both directions: customer → business, and staff → customer.

## C. Rental workflow (as already designed and tested in DB proposal v1.1)
1. **Submitted.** The customer sends the vehicle (or category), pickup and return date/time, name, phone, optional email and message, preferred contact and language. **Nothing is reserved.**
2. **In review.** Staff check the person, the vehicle and the dates. **Nothing is reserved.**
3. **Awaiting customer.** Staff sent terms (vehicle, dates, agreed price) and are waiting for an answer. **Nothing is reserved.**
4. **Confirmed (`approved`).** Requires a specific vehicle, the agreed price, an agreement note and no conflict. It **creates exactly one vehicle block** in a single atomic step; overlapping confirmed reservations are impossible at database level.
5. **Changes to a confirmed reservation** (vehicle or dates) move its block atomically. A conflict changes nothing.
6. **Completed** (the rental happened; the block is kept as history) / **Declined** · **Cancelled** · **Expired** (any block is released).

This is tested locally (184 tests); Supabase-specific tests are pending. **Not invented:** cancellation policy, expiry window, duration and extra-hour pricing, grace period, cleaning gap, documents, payment methods.

## D. Brand identity: Horizon H (what I could recover)
### D1. Recovered exactly from the prototype file (SHA-256 `39b36112…2d1c`)
**Logo mark [RECOVERED]**, SVG, viewBox 120×120:
- Two **forward-leaning pillars** (parallelograms) forming an H, in Petrol Teal: `20,104 40,104 58,16 38,16` and `62,104 82,104 100,16 80,16`.
- A **copper horizon arc** `M20 78 Q60 40 100 66`, 6 px stroke with round caps, crossing both pillars.
- A **15 px masked gap** cut through the pillars along the arc, so the arc reads as passing *through* the H.
- **No car silhouette.**
- Wordmark beside it: "HATEM" in Fraunces 600, letter-spacing 0.08em.

**Hero motif [RECOVERED]:** concentric **copper horizon rings** (r 150 / 230 / 320, copper at 55% opacity), large translucent **pillars**, and a thick copper **arc** (10 px).

**Palette [RECOVERED]:**

| Name | HEX | Role in prototype |
|---|---|---|
| Petrol Teal | `#0F5C63` | Primary (buttons, logo pillars) |
| Copper | `#B87333` | Accent: arc, prices, highlights, accent buttons |
| Sand | `#E6D8C3` | Chips, photo placeholders |
| Night | `#0E1A1F` | Text; dark sections, footer |
| Ivory background | `#F7F4EE` | Page background (light) |
| Card | `#FFFFFF` (dark: `#15262D`) | Surfaces |
| Muted | `#5B676B` (dark: `#A9B6B9`) | Secondary text |
| Line | `#E3DCCF` (dark: `#26393F`) | Borders |
| OK / Error | `#2F7D4F` / `#B3382C` | Status |

A **dark theme** exists in the prototype (night background).

**Typography [RECOVERED]:**
- **Fraunces** 600 for English headings.
- **Manrope** 400/600/700 for English body.
- **Tajawal** 400/500/700 for **all** Arabic text (headings and body).

**Measured contrast (from my earlier audit):**
- Teal on white: 7.7:1 ✅
- Copper on white: 3.8:1, which **fails for normal-size text**. White text on copper buttons fails too.
- Copper is safe for large text, the arc and decoration.

### D2. [MISSING] Not found in any file I can access
- The **Brand tab** (the accessible prototype has tabs Home / Fleet / My account / Admin only).
- Logo **variations** (reversed, mono, app icon, clear-space and minimum-size rules).
- The written **brand strategy**.
- The **diagonal pattern** derived from the pillars (the prototype only has the hero pillars and rings).
- **Icon, photography and motion** principles.
- **Brand mockups / applications.**

**I will not recreate these from assumption.** Please send the version with the Brand tab (possibly the link from your first message) or any exported assets.

## E. Existing prototype audit
**What exists:**
- Public: Home with search, Fleet with filters and sort, Vehicle detail with a 5-shot gallery placeholder, a 4-step booking, simulated sign-in/sign-up/reset, My bookings.
- Admin: Overview KPIs, Bookings with status actions, Vehicles with add/edit, Calendar (month/week/day), Customers with profiles, Settings.
- Language and layout: EN/AR with RTL, light/dark theme, mobile layouts.

**What works well (keep):**
- The Horizon H identity.
- The calm ivory/teal/copper feel.
- Clear page structure.
- An honest "prototype" banner.
- The overlap rule.
- Calendar views.
- Logical CSS for RTL.
- The 5-shot photo plan.

**What is simulated:**
- All data (in browser memory).
- Authentication.
- Saving, which is lost on reload.
- Notifications.
- WhatsApp: the link is broken and has no number.

**What is incomplete or wrong:** 14 issues in ENGINEERING_LESSONS.md, the most important being:
- the admin area is open to anyone;
- stored XSS;
- availability and price are calculated only in the browser;
- times show 2 hours early in Beirut;
- an admin figure is mislabelled.

**Mismatched with the agreed workflow:**
- It says "booking" and "Reserve" where it should say "Rental request".
- There's no "awaiting customer" status, no agreement step and no "modify confirmed reservation" flow.
- Pending requests are counted as blocking availability. **Agreed rule: they must not.**

**Visual improvements needed:**
- Copper text and buttons fail contrast.
- Photography is placeholder-only.
- Admin tables are dense on mobile.
- Several clickable elements aren't real buttons or links (accessibility).

## F. Recommended website structure [PROPOSAL]
Pages:
- **Home** (hero with the Horizon motif, quick search, how a request works, featured vehicles, trust points)
- **Fleet** (filters, sort, **compare** tray)
- **Compare** (2–3 vehicles side by side)
- **Vehicle details**
- **Rental request** (one page, two sections, sticky summary)
- **Request submitted** (reference, "not a confirmed reservation", WhatsApp continuation)
- **My requests** (guest on this device / signed-in)
- **Sign-in**
- **Contact & location**
- **Terms placeholder** (until policies are decided)

Navigation: Home · Fleet · My requests · language switch · "Request a car".

Key components:
- vehicle card
- filters and compare tray
- date-time range picker (Beirut time)
- E.164 phone field
- status badge
- prepared-WhatsApp block
- empty, loading and error states

## G. Recommended admin structure [PROPOSAL]
| Module | Responsibility |
|---|---|
| Overview | Today's/tomorrow's pickups and returns, new requests, awaiting-customer list, conflicts. Real counts only. |
| Rental requests | List with status filters; **staff can create a request** for WhatsApp/phone customers (see gap below) |
| Request detail | Review, quote (agreed price), approve with agreement note, modify vehicle/dates, decline/cancel/complete, history, WhatsApp quick reply |
| Availability calendar | Timeline per vehicle (confirmed reservations + maintenance/owner-use blocks); unconfirmed requests shown as a non-blocking overlay |
| Vehicles | List, add/edit, photos, private details (plate), **owner verifies → publish**, maintenance blocks |
| Customers | List, detail, link guest requests after verification, internal notes, block |
| Business settings | Names, WhatsApp number, phone, email, address. Opening hours and policies once decided. |
| Staff & access | Owner adds, deactivates and assigns roles to staff |

## Evaluation of earlier ideas [PROPOSAL]
| Idea | Verdict | Why |
|---|---|---|
| **Live availability timeline** | **v1 for admin** (as the calendar's main view); **not public** | Staff need to see the fleet × dates at a glance. Publicly we must not claim availability that isn't confirmed. |
| **WhatsApp quick replies for admins** | **v1, lightweight** | Prepared `wa.me` messages per situation (received / need info / terms / confirmed / declined) in AR and EN. No WhatsApp Business API, no cost, nothing claimed as "sent". |
| **Smart Match discovery** | **Postpone** | With 10–30 cars, good filters and compare do the job. Revisit when the fleet or traffic grows. |
| **Compare vehicles** (in your brief) | **v1, simple** (2–3 cars) | Low complexity, real customer value. **Needs your OK.** |

## Missing workflows / usability risks found
1. **Staff-created requests** (a WhatsApp/phone customer has no web request). The DB supports a `channel` field but has **no staff "create request" function yet**. Needs a small DB addition.
2. **Guest tracking** only works on the same device. Should a guest look up a request by reference + phone? This is a security trade-off.
3. **Handover** (pickup/return checks, fuel, mileage, damage): not in scope. Postpone or confirm.
4. **Request expiry, reminders, notifications:** depend on decisions.
5. **Arabic numerals:** Western (0–9) or Eastern Arabic (٠–٩) digits for prices, dates and references in the Arabic UI. A brand decision.
6. **Copper contrast:** text and buttons need a darker copper tone or teal. A brand decision.

## H. Design direction: "Clean Luxury" with Horizon H [PROPOSAL]
- **Calm ivory ground** (`#F7F4EE`), **Petrol Teal** as the single action colour, and **Copper only as accent**: the horizon arc, dividers, highlight numbers, large headings. Never small text, and never white-on-copper buttons unless a darker copper is approved.
- **Night** (`#0E1A1F`) for the hero, footer and admin sidebar. Sand for soft surfaces.
- **Fraunces** headings give the premium editorial tone in English. **Manrope** keeps the interface clean.
- **Arabic:** Tajawal throughout, one size step larger, taller line height, no letter-spacing. Layouts are re-composed, not just mirrored: hero text block aligned right, arc motif mirrored deliberately, numbers and references kept LTR.
- **Motifs:** the horizon rings and arc in the hero, empty states and confirmation screens; the pillar diagonal as a subtle texture **only after** the original pattern is recovered.
- **Admin** uses the same tokens with denser spacing: one brand, two densities.

## I. Missing information (decisions and assets only)
- **Brand:**
  1. Confirm Horizon H and retire shield/blue-silver.
  2. The Brand-tab version or exported brand assets.
  3. Copper contrast solution.
  4. Arabic digit style.
- **Business:** decisions D-01…D-19 from the DB proposal. The most relevant to design: what counts as "agreement" (D-17), who may approve (D-18), cancellation policy (D-04), documents (D-06).
- **Product:**
  1. Compare in v1?
  2. Staff-created requests?
  3. Guest lookup by reference + phone?
  4. Handover records later?
- **Content:** WhatsApp number, phone, email, address, opening hours, verified fleet and prices, photos.
- **Tooling:** Figma is Starter plan with a View seat, so writing designs through the AI tools is likely unavailable. Choose: upgrade, Claude design canvas, or another route.

## J. Design roadmap [PROPOSAL]
1. **Align:** you correct this document.
2. **Brand recovery:** you send the Brand-tab version/assets; I extract the exact rules. No reinvention.
3. **Foundations:**
   - tokens: Horizon palette, accessible copper tone, dark theme;
   - type scale EN/AR;
   - logo usage;
   - motifs.
4. **Components:** buttons, fields, badges, cards, tables, calendar bars, modals, states.
5. **Public core flow**, mobile first, AR + EN: Home → Fleet → Vehicle → Request → Submitted → **review**.
6. **Customer:** My requests, Sign-in, Compare, Contact.
7. **Admin core:** Requests list, Request detail (approve/modify/conflict), Calendar → **review**.
8. **Admin rest:** Overview, Vehicles, Add/Edit, Customers, Customer detail, Settings, Staff.
9. **QA:** desktop/tablet/mobile, RTL, contrast, states.
10. **Hand-off** for implementation, only after your final approval.
