# AI Car Laravel cPanel Deployment

This folder is a Laravel 12 wrapper for the AI Car marketplace frontend. The visual UI is served from `resources/views/app.blade.php` with compiled assets in `public/assets`.

## Upload

1. Zip the contents of `ai-car-laravel`.
2. Upload the zip to cPanel and extract it outside `public_html` when possible.
3. Point the domain document root to `ai-car-laravel/public`.
4. If your host cannot change document root, copy the contents of `public` into `public_html` and keep the rest of Laravel one level above it.

## Required PHP

- PHP 8.2 or newer
- Composer dependencies are already installed in `vendor`

## Environment

1. Copy `.env.example` to `.env`.
2. Set `APP_URL` to your real domain.
3. Keep `APP_DEBUG=false`.
4. If the generated `APP_KEY` is missing, run:

```bash
php artisan key:generate --force
```

## Useful Commands

```bash
php artisan optimize:clear
php artisan optimize
```

## Routes

- `/` serves the AI Car app.
- `/marketplace`, `/admin`, `/vehicle/...` and all frontend routes are handled by Laravel fallback.
- `/api/health` confirms Laravel is running.
- `/api/market/import` returns imported competitor market data.
- `/api/vehicles` returns imported listings.
- `/api/categories` returns imported categories.

## Notes

The current frontend remains the same React/Vite UI, embedded into Laravel for cPanel hosting. No CRM files are used or modified.
