03 / The Build Log / Professional Services Platform
VA Practice Site
A host-mapped Next.js page with durable enquiry capture and a QA book that records what was not tested.
A Next.js App Router landing page served from a VA subdomain and a path alias, with a server action that stores enquiries in Supabase before sending a Resend notification, plus a 78-case QA/UAT workbook covering routing, accessibility, responsiveness and form states.
- Role
- Frontend Development — QA
- Category
- Professional Services Platform
- Status
- Live
- Year
- 2026

[build: va-practice-build-log] — Live
01 / The brief
One page, two entry points, no lost enquiries.
The VA presence had to live on its own host without becoming a second application. The same Next.js route serves `va.helsagrace.site` and the `/va` path on the main site, with the VA host rewriting its clean root to the route.
The enquiry path had to be more reliable than an email notification. A lead that only exists in a Resend response is a lead that disappears when the provider rejects a sender, a quota runs out or a network call fails.
The third requirement was evidence. A working page is not a tested page, so the release includes a QA/UAT workbook with stable IDs, executed evidence, defect links and honest `NOT STARTED` rows.
- VA subdomain plus `/va` path alias
- Clean 307 from `/va` to `/` on the VA host
- Supabase persistence alongside the Resend notification
- 78 cases and 87 executable steps in the QA book
02 / Request path
A host rewrite, one route, two downstream services.
Browser
va.helsagrace.site or /va
Edge middleware
Host classification · clean redirect
App Router /va
Static page · server action
Supabase
Durable contact_messages row
Resend
Owner notification · reply-to visitor
The action treats email and storage as independent outcomes. Success is returned when either one succeeds.
03 / Host routing
The URL is clean; the route is explicit.
The middleware classifies the host. On `va.helsagrace.site`, `/` is rewritten to `/va` and `/va` redirects to `/` with a 307, so the visitor never sees two URLs for the same page. On the main host, `/va` serves the route directly.
Canonical metadata points at the VA host from both entry points, so a search engine sees one canonical page rather than two competing copies.
The shared 404 stays inside the VA experience. Its action says “Back to home” and returns to the VA root on the VA host; it no longer promises a portfolio that the host does not serve.
04 / Enquiry pipeline
Notify the owner, keep the lead.
Both paths are attempted independently; either one succeeding is enough to keep the enquiry.
- 01
Validate
Trim the fields, require name, email and support area, and reject a malformed address before any provider call.
- 02
Notify
Render the branded HTML and text, send through Resend to the configured recipients, and keep the visitor's address as reply-to.
- 03
Persist
Insert the name, email, subject, message and an `emailed` flag into `contact_messages` through the public-key client.
- 04
Report
Return success when either path worked; return the direct-email fallback only when both failed.
05 / The anchor defect
The first fix passed on the alias and failed on the host.
The original production page changed `location.hash` but left `scrollY` at zero. Every in-page link was broken because the global Lenis instance captured the scroll surface while the VA page relied on native anchors.
The first fix excluded `/va` and `/va/*` from Lenis. It passed on the path alias and looked complete. On the VA host, the middleware rewrite leaves the browser pathname at `/`, so `usePathname()` never matched and Lenis still initialised.
The retest caught it. The fix now also checks for the page's own `.va-page` marker, which survives the rewrite, so the host root keeps native scrolling. The QA book records the defect and the retest rather than quietly moving on.
06 / What the QA book records
A status is evidence, not optimism.
The workbook uses the same seven-sheet structure as the other CraftCode QA book: README, journey register, test execution, defects, definitions, dashboard and history. Every step has a stable ID in the form `ROLE.JOURNEY.PAGE.CASE.STEP`.
The run distinguishes code inspection, runtime verification, planned tests and completed UAT. Sixty-three steps pass; eleven still fail, eleven were not started, one is in progress and one does not apply. Several passes were only reached after the production-build retest, which the history sheet records rather than presenting a clean first attempt.
The failures are not hidden in a summary. Each one links to a defect with a repro, evidence, root cause and target date. The open list includes the missing abuse controls, field-level errors, security headers, host-specific discovery metadata, the social preview image and the logged-out LinkedIn destination.
Real email delivery and real Supabase writes remain `NOT STARTED` because the run did not send a valid production enquiry. The unit suite mocks both and covers the payload, recipients, escaping, persistence, failure handling and validation.
07 / Selected screens
The shipped surface.



08 / Reflection
The retest was the most useful part of the release.
The alias test was green. The host test was not. That gap is the argument for testing the deployment surface rather than the route name: a rewrite can preserve the page and change the pathname the client sees.
The second lesson is that “email failed” is not the same as “enquiry failed.” Separating notification from storage turns a provider outage into a delayed notification instead of a lost lead. The failure message is reserved for the case where both paths are gone.
The part I would change is the amount of hardening deferred to the backlog. The page is live, but the enquiry action is not yet resistant to a determined bot. That belongs in the next release, not in a future redesign.
Two entry points
Host rewrite and path alias share one route and one canonical URL.
Durable first
Supabase row before success; email is the notification.
Retest the surface
The host root exposed a defect the alias could not.
Honest QA
63 pass, 11 fail, 11 not started, 1 in progress.
09 / What is next
Harden the endpoint, then close the discovery gap.
The next engineering pass is the abuse surface: a honeypot, a per-address rate limit, server-side length caps, an idempotency key and CR/LF stripping before the name reaches the subject line. The main `/api/contact` route already has a version of these controls; the VA action should not be the weaker path.
After that, the work is accessibility and discovery: field-level error associations, a VA-specific robots/sitemap decision, a social preview image and a public LinkedIn destination.
The release gate stays the same: mocked tests first, a production build, a host-and-alias retest, then the workbook updated with the observed result.
- Add honeypot, rate limit, length caps and idempotency
- Associate errors with fields and move focus to the first error
- Decide the canonical discovery URL and update robots/sitemap
- Add the 1200 × 630 preview image
- Verify the public LinkedIn profile or replace the link