Files
helvoirtgevelreiniging.nl/GO-LIVE.md
T

105 lines
5.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Go-live checklist — Helvoirt Gevelreiniging
Concrete, kant-en-klare stappen om de site live te zetten op `helvoirtgevelreiniging.nl`.
De **code-laag is af + gedeployed** (preview: `https://helvoirt-gevelreiniging.mike-197.workers.dev`);
hieronder staat alleen wat nog **externe input/toegang** vereist. Achtergrond: `newsite.md` §12.
> **Windows/corporate, elke `astro`/`wrangler`-call:** zet eerst
> `$env:NODE_OPTIONS="--use-system-ca"` (+ `$env:CLOUDFLARE_ACCOUNT_ID="41972f4905f2c83f51111b80283e030b"`
> voor wrangler). Tools via `node node_modules/<tool>/bin/...`.
---
## Vooraf aanleveren (collega / klant)
- **Mailbox** `info@helvoirtgevelreiniging.nl`: wachtwoord + SMTP-host (bv. `mail.helvoirtgevelreiniging.nl`,
poort 465) + DKIM-record uit DirectAdmin. (Collega maakt het account aan.)
- **DNS-toegang**: nameservers naar Cloudflare (collega) → de zone `helvoirtgevelreiniging.nl`
verschijnt in het account. Voor DNS-records: dashboard of een API-token met **Zone.DNS:Edit**.
- **SEO-partij e-mailadres(sen)** voor de CMS-login.
- **Klantcontent**: echte e-mail/KvK/BTW/openingstijden, Google-reviews + URL + score, FAQ-teksten,
foto's, evt. GTM-container-ID en eigen logo.
---
## 1. Mail-secret zetten (na mailbox)
Het wachtwoord is het **enige** geheim. **Via bash `printf`**, nooit via PowerShell-pipe (BOM → 535).
```bash
printf '%s' '<mailbox-wachtwoord>' | NODE_OPTIONS=--use-system-ca \
node node_modules/wrangler/bin/wrangler.js secret put CONTACT_SMTP_PASS
```
Wijkt host/gebruiker/inbox af van de defaults (`mail.helvoirtgevelreiniging.nl`,
`info@helvoirtgevelreiniging.nl`)? Zet dan ook `CONTACT_SMTP_HOST` / `CONTACT_SMTP_USER` /
`CONTACT_EMAIL_TO` als secret/var. **Testen** (na deploy): doe een test-aanvraag op `/contact` en kijk
in `wrangler tail` naar `[contact] mail-sent melding-klant` + `bevestiging-aanvrager`. Ruim de testrij
op uit `contact_submissions`.
## 2. CMS-gebruiker SEO-partij aanmaken
```powershell
$ulid = node --input-type=module -e "import {ulid} from 'ulidx'; console.log(ulid())"
node node_modules/wrangler/bin/wrangler.js d1 execute helvoirt-db --remote --command `
"INSERT INTO users (id, email, role, email_verified, disabled, created_at, updated_at) VALUES `
('$ulid','<email-lowercase>',40,1,0,strftime('%Y-%m-%dT%H:%M:%fZ','now'),strftime('%Y-%m-%dT%H:%M:%fZ','now'))"
```
Rol 40 = EDITOR (content + SEO, geen gebruikers/instellingen), 50 = ADMIN. Inloggen daarna via
`/_emdash/admin/login` → "Sign in with email link" (magic-link werkt zodra stap 1 gezet is).
## 3. Domein koppelen ✅ GEDAAN (17-06-2026) — site live op https://helvoirtgevelreiniging.nl
> Zone actief, `routes` toegevoegd + rebuild + deploy gedaan; apex+www live, www→apex + http→https werken.
> Hieronder ter referentie wat er is gebeurd:
Voeg dit blok toe aan **`wrangler.jsonc`** (naast `main`/`compatibility_date`):
```jsonc
"routes": [
{ "pattern": "helvoirtgevelreiniging.nl", "custom_domain": true },
{ "pattern": "www.helvoirtgevelreiniging.nl", "custom_domain": true }
],
```
**Daarna VERPLICHT rebuilden** (de adapter genereert `dist/server/wrangler.json`; zonder rebuild
deployt wrangler stale config):
```powershell
$env:NODE_OPTIONS="--use-system-ca"; $env:CLOUDFLARE_ACCOUNT_ID="41972f4905f2c83f51111b80283e030b"
node node_modules/astro/bin/astro.mjs build
node node_modules/wrangler/bin/wrangler.js deploy
```
> ⚠️ Voeg de routes pas toe **als de zone bestaat**, anders faalt de deploy. Tot dan blijft
> `wrangler.jsonc` zonder `routes` (preview op `*.workers.dev`).
## 4. Mail-DNS (dashboard of Zone.DNS:Edit-token)
| Type | Naam | Waarde | Prio |
|---|---|---|---|
| MX | `@` | `<smtp-host, bv. mail.helvoirtgevelreiniging.nl>` | 10 |
| TXT (SPF) | `@` | `v=spf1 mx ~all` (of het SPF-record van de hoster) | — |
| TXT (DMARC) | `_dmarc` | `v=DMARC1; p=none; rua=mailto:info@helvoirtgevelreiniging.nl` | — |
| TXT (DKIM) | `<selector>._domainkey` | public key uit DirectAdmin | — |
MX = **DNS-only** (geen Cloudflare-proxy). Verifieer via DoH (corporate-DNS blokkeert poort 53):
`curl -sk "https://dns.google/resolve?name=helvoirtgevelreiniging.nl&type=MX"`.
## 5. HTTPS / security (dashboard)
- **SSL/TLS → Edge Certificates → Always Use HTTPS** aan, daarna **HSTS** aan.
- **SSL-modus** op **Full (strict)** (niet Flexible → redirect-loop).
- `src/middleware.ts` doet al http→https + www→apex (301); security-headers staan in `public/_headers`.
## 6. Verifiëren (corporate-DNS resolvet het nieuwe domein niet → forceer CF-IP)
```powershell
$ip = (Invoke-RestMethod "https://dns.google/resolve?name=helvoirtgevelreiniging.nl&type=A").Answer[0].data
curl.exe -sk --resolve helvoirtgevelreiniging.nl:443:$ip https://helvoirtgevelreiniging.nl/
```
Checklist: homepage 200 · `/sitemap.xml` (root-URL's, incl. CMS-locaties) · `/robots.txt` ·
`www` → apex 301 · `http` → `https` 301 · JSON-LD in de head · contactformulier → 2× mail.
## 7. Klantcontent in het CMS (Instellingen)
Echte e-mail/KvK/BTW/openingstijden, Google-reviews + URL + score, **GTM-container-ID** (wordt
automatisch in de `<head>` gezet), evt. OG-image/logo. Daarna: Search Console + sitemap indienen +
PageSpeed-meting.
---
### Status van de code-laag (af, 17-06-2026, deploy ná OG/JSON-LD-pass)
✅ robots.txt · sitemap.xml (vaste routes + live CMS-`paginas`/`locaties`) · `site:` in config ·
JSON-LD `HomeAndConstructionBusiness` (site-breed) + `Service`/`BreadcrumbList` (dienstpagina's) ·
GTM-renderblok · gebrande 1200×630 OG-image · privacy/voorwaarden + footer-links ·
mail (`lib/smtp.ts` + `contact.ts` → D1 `contact_submissions` + 2 mails) · magic-link-plugin ·
middleware (http→https/www→apex) · `_headers` (caching + security).
**Open = alleen bovenstaande externe stappen + optioneel: CMS-migratie Wave 3/2b, self-hosted fonts,
Lighthouse-meting, checklist.xlsx.**