# iDealers website: WordPress to Laravel rebuild

Outline author: Claude Fable 5.2. Implementation: five Claude Opus 5.5 agents.
Date: 2026-11-17.

## 1. Goal

Replace the WordPress + Elementor site at https://idealers.net with a Laravel site that:

1. Looks and moves the same as the current site, on desktop, tablet and phone.
2. Carries exactly the same text, images, video and links on all 15 pages. No copy edits, no reordering, no "improvements". Typos in the original stay (for example "Test Drive Calender").
3. Has an admin panel so the owner can edit content without touching code.
4. Is at least as strong as the old site for SEO and analytics, and much stronger for security.
5. Needs no plugin updates to stay safe.

Design modernisation is out of scope for this build. Ideas go into `docs/DESIGN_PROPOSALS.md` for the owner to approve later; nothing in that file is implemented now.

## 2. Decisions already made by the owner

| Topic | Decision |
|---|---|
| Domain | https://idealers.net (not idealer.net) |
| Forms | Keep the three embedded idealers.app iframes exactly as they are. No Laravel forms. |
| Payments | Keep the six Stripe payment links unchanged. |
| Admin depth | Edit text, images, menus, pricing plans, testimonials, site settings and SEO. No drag-and-drop page builder. |
| Design | Exact copy first. Changes only after written approval. |
| Priorities | SEO, analytics and security must be excellent. |

## 3. Stack (already installed, do not change)

- Laravel 13.42, PHP 8.5, SQLite for local development (MySQL/MariaDB in production).
- Filament 5.11 admin panel at `/admin` (`app/Providers/Filament/AdminPanelProvider.php`).
- Vite 8. Hand-written CSS and vanilla JavaScript. No Tailwind, no jQuery, no Elementor CSS shipped to visitors.
- No git repository. Do not run `git init` or commit.

## 4. Reference material

| What | Where |
|---|---|
| Original HTML of all 15 pages | `reference/html/{key}.html` (`home.html` for `/`) |
| Original stylesheets (Elementor global + per-page `post-N.css`, The Plus Addons) | `reference/css/` |
| List of original media URLs | `reference/media_urls.txt` |
| All media, same folder structure | `public/media/` (old `wp-content/uploads/2024/01/x.webp` is now `/media/2024/01/x.webp`) |
| Device frame images (laptop, phone, tablet, desktop) | `public/media/devices/` |

The live site can be fetched for anything missing, but its TLS certificate currently does not match the domain, so use `curl -k -A "Mozilla/5.0"`. Never copy WordPress, Elementor or plugin JavaScript into the project; re-implement the behaviour.

`reference/` is build-time material only. It must never be served or deployed.

## 5. Pages

Keys, URLs and groups are defined in `config/site.php`. Canonical URLs keep the WordPress trailing slash.

| Key | URL | Original title |
|---|---|---|
| home | `/` | iDealers - A Modern Dealership Software |
| about | `/about/` | About us |
| pricing | `/pricing/` | Pricing |
| contact | `/contact/` | Contact us |
| idms-idealers-management-system | `/idms-idealers-management-system/` | IDMS - iDealers Management System |
| inventory-management | `/inventory-management/` | Inventory Management |
| leads-center | `/leads-center/` | Leads Center |
| website | `/website/` | Website |
| marketing-tools | `/marketing-tools/` | AI Marketing |
| crm-system | `/crm-system/` | CRM System |
| design-studio-tool | `/design-studio-tool/` | Design Studio Tool |
| request-demo | `/request-demo/` | Request A Demo |
| talk-to-sales | `/talk-to-sales/` | Talk To Sales |
| privacy-policy | `/privacy-policy/` | Privacy Policy |
| terms-condition | `/terms-condition/` | Terms & Condition |

Shared on every page: top bar ("CALL US: (844) 444-9363"), logo, Products and Company dropdowns, "Dealership Login" (https://idealers.app/) and "Request A Demo" buttons, mobile menu, the pre-footer call-to-action block, four-column footer, social icons, copyright line with the eTouts Agency credit, cookie notice.

## 6. Architecture

### 6.1 Request flow

`routes/web.php` registers one route per entry in `config/site.php`. `PageController` renders `resources/views/pages/{key}.blade.php` and passes:

- `$pageKey`, `$page` (config entry)
- `$c`: content of this page (`App\Support\Content\PageContent`)
- `$g`: shared content from `resources/content/_global.php`

### 6.2 Content contract (front end and back end both depend on this)

Every page has a content file `resources/content/{key}.php`. It is the single source of structure and default values. The admin panel reads the same file to build its edit form and stores only overrides in the database.

```php
<?php
return [
    'meta' => [
        'title' => 'About us - iDealers A Modern Dealership Software', // exact original <title>
        'description' => '...',            // exact original meta description, '' if none
        'og_image' => '/media/2024/01/ids.webp',
    ],
    'fields' => [
        'hero.title' => ['type' => 'text',     'label' => 'Hero title', 'value' => 'A Modern Dealership Software'],
        'hero.body'  => ['type' => 'richtext', 'label' => 'Hero text',  'value' => '<p>...</p>'],
        'hero.image' => ['type' => 'image',    'label' => 'Hero image', 'value' => '/media/2024/01/x.webp'],
        'hero.cta_url' => ['type' => 'url',    'label' => 'Button link', 'value' => '/request-demo/'],
        'features' => [
            'type' => 'list', 'label' => 'Features',
            'schema' => [
                'title' => ['type' => 'text', 'label' => 'Title'],
                'text'  => ['type' => 'textarea', 'label' => 'Text'],
                'icon'  => ['type' => 'image', 'label' => 'Icon'],
            ],
            'value' => [
                ['title' => '24/7 Support', 'text' => '...', 'icon' => '/media/...'],
            ],
        ],
    ],
];
```

Rules:

- Field types: `text`, `textarea`, `richtext`, `image`, `video`, `url`, `list`. Nothing else.
- Field keys are `section.name`, lowercase with dots and underscores. The part before the first dot is the section; the admin groups fields by it.
- A `list` has a flat `schema` (no nested lists) and a `value` that is an array of rows.
- Every visible string, image, video and link on a page comes from its content file, including alt texts. Nothing is hard-coded in Blade except structure.
- In Blade: `{{ $c('hero.title') }}` for text, `{!! $c('hero.body') !!}` for richtext, `$c->list('features')`, `$c->has('x')`, `{{ media($c('hero.image')) }}`.
- Menus, footer columns, phone number, social links, cookie text, pre-footer call-to-action: `_global.php`, read through `$g`.
- Pricing plans and testimonials are `list` fields on their pages.
- Internal links use `page_url('about')`. Media uses `media()`.

### 6.3 Technical settings

`setting('analytics.ga4_id')` and friends. Keys and file defaults are in `config/site.php` under `settings`; the admin overrides them from the database. Any new key must be added to `config/site.php` first.

### 6.4 Assets

| Entry | Owner | Loaded |
|---|---|---|
| `resources/css/site.css`, `resources/js/site.js` | Frontend 1 | Every page, from the layout |
| `resources/css/products.css`, `resources/js/products.js` | Frontend 2 | `@push('head')` / `@push('scripts')` on its pages |

CSS can be split into partials under `resources/css/site/` and `resources/css/products/` and `@import`ed. Fonts are self-hosted in `public/fonts/` (woff2, only the families and weights the original really renders; no Google Fonts requests at runtime).

Class naming: Frontend 1 uses plain BEM names (`.site-header`, `.btn`, `.heading`, `.section`). Frontend 2 prefixes everything with `p-` (`.p-device`, `.p-pricing`) so the two stylesheets cannot clash.

### 6.5 Shared Blade components (owned by Frontend 1, used by both)

Frontend 1 creates these first, with exactly these names and props, so Frontend 2 can code against them immediately:

| Component | Props | Replaces Elementor widget |
|---|---|---|
| `<x-ui.section>` | `id`, `class`, `width` (`boxed`\|`full`) | section/container |
| `<x-ui.heading>` | `title`, `subtitle`, `tag` (default `h2`), `align`, `class` | `tp-heading-title`, `heading` |
| `<x-ui.button>` | `href`, `label`, `variant` (`primary`\|`outline`\|`light`), `target`, `class` | `tp-button`, `button` |
| `<x-ui.info-box>` | `title`, `text`, `icon`, `href`, `linkLabel`, `number` | `tp-info-box` |
| `<x-ui.check-list>` | `items` (array of strings) | `icon-list`, `tp-style-list` |
| `<x-ui.video>` | `src`, `poster` | `tp-video-player` |
| `<x-ui.form-embed>` | `src`, `minHeight`, `title` | the idealers.app iframes |

Scroll animation contract (Frontend 1 implements in `site.js`, both use): add `data-reveal="fade-up|fade-left|fade-right|fade-in|zoom-in"` and optional `data-reveal-delay="200"` to any element. It is driven by `IntersectionObserver`, and disabled under `prefers-reduced-motion`. Content must be visible without JavaScript.

Frontend 2 owns product-side components under `resources/views/components/product/` (device mockup, feature row, pricing table, testimonial carousel, counter, cascading image).

## 7. Team and file ownership

Five agents work in the same folder at the same time. Edit only the files you own. If you need a change in someone else's file, write the request in `docs/handoff/{your-role}.md` and work around it.

| Role | Owns |
|---|---|
| **Frontend 1** (layout, design system, core pages) | `resources/views/layouts/**`, `resources/views/components/ui/**`, `resources/views/components/site/**`, `resources/css/site.css`, `resources/css/site/**`, `resources/js/site.js`, `resources/js/site/**`, `public/fonts/**`, `package.json`, `vite.config.js`; views and content files for `home`, `about`, `contact`, `request-demo`, `talk-to-sales`, `privacy-policy`, `terms-condition`, `_global`; `resources/views/errors/**` |
| **Frontend 2** (product pages) | `resources/views/components/product/**`, `resources/css/products.css`, `resources/css/products/**`, `resources/js/products.js`, `resources/js/products/**`; views and content files for the seven product pages and `pricing` |
| **Backend 1** (content system, admin panel) | `app/Models/**`, `database/**`, `app/Filament/**`, `app/Providers/Filament/**`, `app/Support/Content/**`, `app/Support/helpers.php`, `app/Policies/**`, `app/Console/**`, `app/Providers/AppServiceProvider.php`, `composer.json` (only this role runs `composer require` and `php artisan migrate`), `tests/Feature/Admin/**`, `tests/Feature/Content/**` |
| **Backend 2** (SEO, analytics, security, performance) | `routes/**`, `app/Http/**`, `bootstrap/app.php`, `resources/views/components/seo/**`, `resources/views/components/analytics/**`, `app/Support/Seo/**`, `app/Support/Security/**`, `config/site.php`, `config/security.php`, `public/.htaccess`, `public/robots.txt`, `.env.example`, `tests/Feature/Seo/**`, `tests/Feature/Security/**` |
| **Project manager** (quality, parity, delivery) | `docs/**` (except this file), `scripts/**`, `tests/Feature/Parity/**`, `README.md` |

Ports for `php artisan serve`: Frontend 1 `8101`, Frontend 2 `8102`, Backend 1 `8103`, Backend 2 `8104`, PM `8105`. Stop your own server when done (find it by port; never kill every `php.exe`).

`npm run build` writes to a shared folder. If it fails because someone else is building, wait a few seconds and retry.

## 8. Work packages

### Frontend 1

1. Design tokens from the original CSS: colours, fonts, sizes, spacing, radii, shadows, breakpoints (Elementor: tablet 1024px, mobile 767px). Record them as CSS custom properties.
2. Shared components (section 6.5) and the reveal animation system. Do this first.
3. Layout: top bar, sticky header with dropdowns, mobile menu, pre-footer call-to-action, footer, cookie notice (stores the choice, exposes it to analytics through the `idealers:consent` contract in section 8, Backend 2).
4. Pages: home (including the promo video, device mockups, process steps, Lottie or equivalent animation, custom mouse-cursor effect, animated row background), about, contact, request-demo, talk-to-sales, privacy-policy, terms-condition.
5. Error pages 404, 419, 500, 503 in the site design.
6. Accessibility: one `h1` per page as in the original, focus states, keyboard-operable menus, alt text from the original, colour contrast not worse than the original.

### Frontend 2

1. Product components: device mockup with screen image (and scrolling screenshot where the original scrolls), feature rows, pricing table, counter, testimonial carousel, cascading images, mouse-cursor and row-background effects where the original pages use them.
2. Pages: idms-idealers-management-system, inventory-management, leads-center, website, marketing-tools, crm-system, design-studio-tool, pricing.
3. Pricing and Design Studio: plans as `list` fields, each with its exact Stripe link.
4. Same accessibility rules as Frontend 1.

### Backend 1

1. Extend `ContentRepository` to overlay database values on the file defaults, cached, with cache cleared on save. Public API stays as is.
2. Database: `content_values` (page_key, field_key, value JSON), `page_meta` (page_key, title, description, og_image, robots, canonical override), `settings` (key, value), `redirects` (from_path, to_url, status_code, is_active, hits), `media` library records, activity log. Register a `site.settings` service so `setting()` reads the database.
3. Filament admin:
   - Pages: list of the 15 pages plus "Global"; an edit form generated from the content file, grouped by section; `list` fields as repeaters; images through a media picker/upload; a "reset to default" action per field; SEO tab per page.
   - Site settings: analytics IDs, verification codes, SEO defaults, form and app URLs.
   - Redirects, media library, users, activity log.
4. Admin security: only users with an admin flag can enter; strong password rule; login throttling; two-factor authentication (app based) available and enforceable; session timeout; every content change logged with user and time; uploads restricted to safe image and video types with size limits, SVG sanitised or refused; rich text sanitised on save.
5. `php artisan site:create-admin` command. No default password in seeders.
6. Tests for content overlay, admin access control, and upload rules.

### Backend 2

1. **URLs**: trailing-slash canonical URLs exactly as on WordPress. The non-slash form 301-redirects to the slash form (and never the reverse). Uppercase and `index.php` variants redirect. Redirect middleware reading `App\Models\Redirect` (falls back cleanly if the table does not exist yet). Old WordPress paths (`/wp-admin`, `/wp-login.php`, `/xmlrpc.php`, `/feed/`, `/wp-json/*`, `?p=`) return 410 or redirect home, and are never logged as errors.
2. **SEO head** (`<x-seo.head>`): exact original title and description per page from content meta (admin override wins), canonical, robots, Open Graph, Twitter card, favicon set, JSON-LD (`Organization`, `WebSite`, `SoftwareApplication` on product pages, `BreadcrumbList`, `WebPage`/`AboutPage`/`ContactPage`), verification metas.
3. `sitemap.xml` (and `/sitemap_index.xml`, `/page-sitemap.xml` 301 to it) with lastmod; `robots.txt` that blocks `/admin` and points at the sitemap; staging switch `seo.noindex_site`.
4. **Analytics**: GA4 and optional GTM from settings, loaded only when an ID is set, with Google Consent Mode v2. Default is denied; the cookie notice grants it. Contract with Frontend 1: the cookie notice dispatches `window.dispatchEvent(new CustomEvent('idealers:consent', {detail: {analytics: true|false}}))` and stores `idealers_consent` in `localStorage`. Event tracking through `data-track="event_name"` attributes: demo request, talk to sales, dealership login, Stripe plan click (with plan name), phone click, video play, outbound link, scroll depth. No analytics in the admin.
5. **Security**: headers middleware (CSP with nonces that allows the idealers.app iframes, Stripe links, GA/GTM and self-hosted fonts and nothing else; HSTS; `X-Content-Type-Options`; `Referrer-Policy`; `Permissions-Policy`; frame-ancestors self), secure cookie and session config for production, `APP_DEBUG=false` guard, rate limiting, trusted proxies, hidden framework fingerprints, `.htaccess` hardening (no directory listing, block dotfiles and `reference/`), `security.txt`.
6. **Performance**: cache headers for built assets and media, full-page cache for anonymous GET requests cleared on content save, preload of the hero image and main font, lazy loading and explicit width/height on images, `fetchpriority`, compression.
7. Tests for all of the above.

### Project manager

Phase 1 (while the others build):
1. `scripts/parity/`: a script that extracts the visible text, links, images, title and meta description of each original page from `reference/html/`, does the same for the rebuilt page served locally, and reports every difference.
2. `docs/SEO_BASELINE.md`: title, description, canonical, OG tags, heading outline of every original page.
3. `docs/DEPLOYMENT.md`: hosting requirements, production `.env`, MySQL switch, build steps, DNS/TLS cut-over checklist, rollback, post-launch Search Console and analytics checks.
4. `docs/ADMIN_GUIDE.md`: plain-language guide for the owner.
5. `docs/DESIGN_PROPOSALS.md`: optional modernisation ideas for owner approval. Not to be implemented.

Phase 2 (after the four builders report done): run the parity script on all 15 pages, the full test suite, a link check, a headers and SEO check, responsive screenshots against the original; fix small defects directly, list anything larger in `docs/QA_REPORT.md` with file and line.

## 9. Definition of done

- All 15 URLs return 200 with a trailing slash and the non-slash form redirects with 301.
- Parity script reports no missing or changed text, links, images or meta on any page.
- Animations present on the original are present and equivalent; nothing breaks with JavaScript off or reduced motion on.
- All three idealers.app forms load inside the page; all six Stripe links are identical to the original.
- Admin: every field of every page is editable and the change shows on the site; non-admins cannot enter.
- `php artisan test` passes; `npm run build` passes; no errors in `storage/logs/laravel.log` from normal browsing.
- No request from a public page goes to WordPress, Google Fonts, or any third party other than idealers.app, and (only after consent and only if configured) Google Analytics/Tag Manager.

## 10. Reporting

Each agent ends with a short report: what was built, what was verified and how, what is not finished, and any request for another role. Report failures plainly.
