# DukanMotors — Egyptian Car Marketplace

Car listing/selling marketplace (hatla2ee.com-style). Arabic-first, RTL.

## Stack
- **Laravel 13**, **Livewire 4** (single-file components — `⚡name.blade.php` in `resources/views/components/`, embedded as `<livewire:name />`), **Filament 5** admin at `/admin`, **Tailwind 4** (Vite), Cairo font.
- DB: MySQL `dukanmotors` (utf8mb4). Locale `ar` (fallback `en`).

## Run (Windows / Git Bash)
```bash
PHP="/c/xampp/php00/php.exe"        # PHP 8.3.33 — NOT the one on PATH
COMPOSER="/c/ProgramData/ComposerSetup/bin/composer.phar"
export COMPOSER_MEMORY_LIMIT=-1
cd /c/xampp_lite_8_3/www/dukanmotors
"$PHP" artisan serve --port=8055    # app
npm run dev                          # or: npm run build
```
MySQL: `/c/xampp_lite_8_3/apps/mysql/bin/mysql.exe -u root` (no password).

## Domain models
`CarMake` → `CarModel` (make_id); `BodyType`; `Governorate`; `CarListing` (core, belongs to user/make/carModel/bodyType/governorate, has many `ListingImage`); `User` (+phone, +role user|dealer|admin).
- Bilingual: models expose a `name` accessor picking `name_ar`/`name_en` by locale. Keep `name_ar` + `name_en` in sync when seeding.
- `CarListing` auto-generates `slug` on create; new frontend listings start `status = 'pending'`.

## Key files
- Public pages: `routes/web.php`, `HomeController`, `ListingController`, views under `resources/views/{home,listings,auth,dashboard}`.
- Livewire: `resources/views/components/⚡listings-browser.blade.php` (search/filter), `⚡create-listing.blade.php` (post ad).
- Admin: `app/Filament/Resources/*` — CarListing has approve/reject record actions + pending badge.

## Conventions
- All UI copy in Arabic; layout is `dir="rtl"`. Use `x-listing-card` for listing cards.
- Filament resources carry Arabic `$navigationLabel` / `$modelLabel` and a `$navigationGroup`.

## Seeded accounts
- admin@dukanmotors.test / `password` (admin — Filament)
- seller@dukanmotors.test / `password` (40 demo listings)

Reseed: `"$PHP" artisan migrate:fresh --seed`.
