# What you need to provide

The platform works without any of the items below, but each one switches on a feature. Nothing here is guessed or simulated in production: when something is missing, the screens say "Not connected" or "Unavailable".

## 1. Hosting (atcomart.com or VPS)

| Item | Why | Where |
|---|---|---|
| PHP 8.3+ with `proc_open` allowed | The scheduler starts every background task through it | Ask the host; cPanel → MultiPHP |
| Cron every minute (or tell us if only 5/15 min) | Uptime, alerts, crawls, reports | cPanel → Cron Jobs; then set Settings → Monitoring → "Scheduler considered down after" to 20 if cron runs every 15 min |
| No hard kill of PHP CLI processes under ~5 min | Crawl batches and reports | Ask the host |
| MySQL database + user | Data | cPanel → MySQL Databases |
| SMTP mailbox (e.g. seo-alerts@atcomart.com) with SPF/DKIM | Alerts and reports | cPanel → Email Accounts; values into `.env` |

## 2. Google (one service account for every client)

1. Google Cloud project → enable **Google Search Console API** and **Google Analytics Data API**.
2. Create a service account → JSON key → paste in **Settings → Integrations**.
3. For **each client**:
   - Search Console → property → Settings → Users → add the service-account e-mail (*Restricted* is enough; URL Inspection also works with Restricted).
   - GA4 → Admin → Property access management → add the same e-mail as **Viewer**.
   - In the platform, website settings: GSC property (`sc-domain:example.com`) and the numeric GA4 property ID.
4. Optional: a PageSpeed Insights API key (raises the free quota).

If a client removes access or the key is revoked, the System page shows the integration as **failing — authorisation** and you are e-mailed.

## 3. Each client website (your developers)

- Paste the conversion snippet and wire up the successful-submission call: see **CONVERSION-TRACKING.md**.
- Optional: product id meta tag on product pages.
- In GA4: mark `generate_lead` as a key event; add the custom dimensions.
- Blog tracking works best when posts publish `datePublished` in Article/BlogPosting JSON-LD or the `article:published_time` meta tag (most SEO plugins and Laravel blog packages can do this). Posts without a reliable date are flagged for review rather than guessed.

## 4. External watchdog (strongly recommended)

The platform cannot e-mail you if the whole server, cron or e-mail is down. Set up **at least one** of these:

1. **Healthchecks.io** (free): create a check with period 5 min and grace 15 min, add your e-mail/WhatsApp/SMS as integrations, and paste the ping URL in **Settings → Monitoring & alerts**. When a component fails the platform reports "/fail"; when pings stop, Healthchecks alerts you itself.
2. **UptimeRobot / Better Stack** keyword monitor on the secret **Status URL** shown in Settings → Monitoring (expects `OK`; returns 503 when the scheduler or a queue is stale), plus a plain monitor on `https://seo.atcomart.com/up`.

## 5. Per website in the platform

- Blog target, deadline day, timezone and responsible person (website settings → Blog publishing target). The first crawl records existing posts as the **baseline**, so they are never counted as new.
- Product URL patterns and meaningful query parameters (e.g. `variant`), if product variants should be reported separately.
- Tracked keywords and monthly targets.

## 6. Phase 3 checks (per website, in Website → Settings and Site checks)

| Item | Why |
|---|---|
| Approved phone, WhatsApp and e-mail details; which link types are required | Contact links are compared with these. Without them only the link format is checked. |
| Important inquiry forms (page URL, optional selector, thank-you text, test values) | Availability is checked daily. Without the thank-you text a test can only be "unconfirmed". |
| **An Admin's approval per form**, after telling the client | Only then are labelled test inquiries sent (default at most every 30 days, never twice in 24 h). CAPTCHA/OTP forms stay manual. |
| Staging exceptions (e.g. a real `demo@` address) and extra patterns | Avoid false alarms / catch site-specific leftovers. |
| Pages for mobile checks (optional) and the mobile worker (VPS: `npm ci` in `deploy/mobile-worker`; shared hosting: external worker) | Without a browser the check is shown as unsupported. |
| CMS URL export (optional) | Finds published pages the crawler cannot reach by links or the sitemap. |
| Manual domain expiry date for domains without RDAP (e.g. most .ae) | Otherwise shown as "Unavailable". |
| Keyword → page mapping with intent, language and country | Overlap review; Search Console evidence once GSC is connected. |

No paid service is used: SSL from the certificate, domain data from the free RDAP service, mobile rendering from your own Chromium. If you ever want WHOIS for TLDs without RDAP or a hosted browser service, that would be a paid add-on and is not required.

## Status of each integration at delivery

| Integration | Verified how | Live-account verification |
|---|---|---|
| Crawler, audit (67 rules), change detection, images, hreflang/Arabic, critical watch | Real HTTP against a local test site + automated tests | Not needed |
| Blog tracking (baseline, new vs updated, review) | Real crawler against a test blog + automated tests | Not needed |
| Issue workflow, re-check, approval, history, attachments | Automated tests + browser | Not needed |
| System health, alerts, recovery, status URL | Automated tests; live scheduler/queue heartbeats | Healthchecks.io ping **not yet tested against the real service** |
| Conversion snippet | Real browser (Chromium) | Install on one client site and confirm in GA4 DebugView |
| GA4 sync (events, page metrics), Realtime test | Simulated GA4 API responses | **Awaiting your service account + one GA4 property** |
| Search Console (pages, queries, URL Inspection) | Simulated API responses | **Awaiting your service account + one property** |
| PageSpeed | Code review only | Runs keyless on first sync |
| E-mail | Log transport + failure logging | **Awaiting SMTP details**: use System → Send test e-mail |
| Contact links, staging content, structured data, CMS orphans, link suggestions (phase 3) | Real crawl of the local test site + automated tests | Not needed |
| Inquiry form availability + approved test submission | Real HTTP submission to the local test site (CSRF, labelling, success text) + tests | Run once on a real client form after the client agrees |
| Mobile checks | Real headless Chromium against the local test site and fixtures | Install the worker on the server (VPS) or external worker (cPanel) |
| Domain expiry (RDAP) | Simulated RDAP responses (success, 404, missing date) | **Not run against rdap.org** — the build sandbox blocks it; confirmed on first server run |
| Keyword overlap with Search Console evidence; URL-level before/after | Simulated GSC/GA4 responses | **Awaiting your service account + one property** |
| Content reviews, client dependencies, work evidence & approval, before/after (site-wide) | Automated tests + browser | Not needed |
