# Q Advertising — 2026 Redesign

A modernized, redesigned rebuild of the qadvertising.in website, built on the current
stable Laravel + Vue ecosystem. The original Laravel 5.5 project is preserved
untouched; this is a separate, independently-runnable project.

See **[MIGRATION.md](MIGRATION.md)** for the full migration map (old stack → new
stack, what changed, what was preserved, and packages replaced).

## Stack
- **Laravel 13** (PHP 8.3) — backend, Eloquent, routing
- **Vue 3.5** + **Inertia.js 2** — single-page feel with server routing (SSR-ready)
- **Vite 8** — build/dev tooling
- **TypeScript 5.6** + `vue-tsc` — type-safe components & props
- **Tailwind CSS v4** — CSS-first design system (no config file)
- **Laravel Breeze** — auth scaffolding
- **Ziggy** — typed server routes in Vue

## Design system
- Visual language derived from the site's service-navigation reference: light backgrounds,
  strong dark typography (**Inter** throughout, bundled via `@fontsource`), bright green
  (`#16a34a`) as the brand accent / active state, blue (`#2563eb`) for interactive service
  links, thin subtle borders, flat surfaces, generous whitespace.
- Reusable components in `resources/js/Components/` (`UiButton`, `SectionHeading`,
  `CategoryCard`, `ServiceCard`, `AppHeader`, `AppFooter`, `Icon`).
- Tokens defined in `resources/css/app.css` under `@theme`:
  `--color-ink-*` (dark text), `--color-paper-*` (light bg), `--color-accent-*` (green),
  `--color-link-*` (blue).

## Two homepages
- `/` — **Homepage 1**: modernized reimplementation of the original homepage content.
- `/home-2` — **Homepage 2**: a new, alternative editorial/index design direction.
Both use the same real company content and business context.

## Setup

```bash
composer install
npm install
cp .env.example .env
php artisan key:generate
# edit .env: DB_CONNECTION=mysql, DB_DATABASE=qadvertising_2026, ...
php artisan migrate --force
php artisan db:seed
npm run build          # or npm run dev
php artisan serve --port=8001
```

Requires **PHP 8.3+** and **Node 20+**.

### Seeded accounts
- Admin: `admin@qadvertising.in` / `qadvertising2026` → `/admin`
- Demo user: `test@example.com` / `password`

## Architecture

```
app/
  Http/Controllers/   HomeController, CategoryController, ServiceController,
                     PageController, ContactController, AdminController + Breeze Auth
  Models/             Category, Subcategory, Service, Page, ContactMessage, User
  Http/Middleware/    HandleInertiaRequests (shares company/nav/footer), IsAdmin
config/company.php    Single source of truth for company identity (verbatim from original)
database/seeders/    CatalogSeeder (5 pillars, 16 subcats, 51 services),
                     PageSeeder (about/contact/terms/privacy/refund), AdminUserSeeder
resources/js/
  Components/         Design system + AppHeader/AppFooter
  Layouts/           PublicLayout
  Pages/             Home1, Home2, Category/Show, Service/Show, Page/Show,
                     Contact/Show, Admin/Dashboard + Breeze Auth/Profile
  types/             Inertia PageProps + domain models
routes/web.php       Public catalog + static pages + admin + Breeze
```

## Commands
- `npm run dev` — Vite dev server (HMR)
- `npm run build` — `vue-tsc` typecheck + Vite build (client + SSR)
- `npm run typecheck` — TypeScript only
- `php artisan test` — Pest/PHPUnit suite
- `php vendor/bin/pint` — PHP lint/format

## Testing
`php artisan test` — 34 tests covering homepage 1 & 2, category/service/static pages,
the contact form, and admin authorization (guests redirected, non-admins forbidden,
admins allowed).
