# Shavhani Attorneys — Laravel CMS

Law firm website built with Laravel 12, Jetstream/Livewire, and Tailwind CSS.

**Tagline:** Think Is Practical  
**Website:** www.shavhaniattorneys.co.za

## Features

- SEO: JSON-LD (`LegalService`, `Attorney`, `FAQPage`, `Article`)
- WCAG 2.1 AA: UserWay widget (middle-right), semantic HTML, skip links
- Consultation request system with time slots
- Admin CMS: practice areas, blog, FAQs, testimonials, consultation requests, settings
- POPIA-compliant legal pages

## Stack

- Laravel 12 + Jetstream (Livewire)
- Tailwind CSS (DM Sans + Source Serif 4)
- MySQL

## Local setup

```bash
composer install
npm install
cp .env.example .env   # or configure .env manually
php artisan key:generate
```

Configure `.env`:

```env
APP_NAME="Shavhani Attorneys"
APP_URL=http://localhost/shavhani-attorneys/public
DB_CONNECTION=mysql
DB_DATABASE=shavhani_attorneys
DB_USERNAME=root
DB_PASSWORD=
```

```bash
php artisan migrate:fresh --seed --force
npm run build
php artisan serve
```

**Admin login (after seed):** `admin@example.com` / `password`

## Production deploy checklist

1. **Environment**
   - `APP_ENV=production`
   - `APP_DEBUG=false`
   - Correct `APP_URL` (e.g. `https://www.shavhaniattorneys.co.za`)

2. **Frontend assets**
   - Run `npm run build` locally or on server
   - Upload entire `public/build/` folder after every frontend change
   - On shared hosting if `vite: Permission denied`:
     ```bash
     chmod -R +x node_modules/.bin
     node node_modules/vite/bin/vite.js build
     ```

3. **Database**
   ```bash
   php artisan migrate --force
   ```

4. **Cache**
   ```bash
   php artisan optimize:clear
   ```
   Run after env changes, view/layout uploads, or build deploys.

5. **Verify**
   - Admin login works (no `$slot` errors)
   - Public pages styled (CSS loading)
   - Page source has **no** `:5173` Vite dev URLs
   - Consultation request form submits

## Admin routes

- `/admin` — Dashboard
- `/admin/services` — Practice areas
- `/admin/bookings` — Consultation requests
- `/admin/settings` — Site settings

## Public routes

- `/` — Home
- `/about` — About
- `/services` — Practice areas
- `/book` — Request consultation
- `/contact` — Contact
- `/faq` — FAQs

## License

Proprietary — All rights reserved
