AdPilot · Corpus
T-036 — Demo-mode console + Hostinger deployment (adpilot.zealve.com)
T-036 — Demo-mode console + Hostinger deployment (adpilot.zealve.com)
Frozen spec for the T-036 change set (base f3ed239 → head cb44a3f). Purpose: let the
owner try the AdPilot operator console live under the Zealve Hostinger account without a
Go API host, honestly labeled, with zero real-money surface.
Decisions
- Scope (Q1): the deployment covers the entire console UX against the in-memory demo
engine (
NEXT_PUBLIC_DEMO_MODE=1static export). No Go API host — real-data mode ships when a VPS exists (owner decision, documented in HANDOFF gotcha 11). - Behaviour (Q2): without a backend the user sees the same UI hydrated from seeded in-memory data; the sidebar footer reads "Demo data" instead of "Sandbox mode"; state resets on page reload. Clearly labeled, sandbox-grade.
- Implementer — swap location: in
apps/web-next/lib/api.tsthe real client is renamedrealApiand the export isapi = DEMO ? demoApi : realApi, annotatedtypeof realApi, soapps/web-next/lib/demo.tsis compile-time-checked against the real API surface. - Implementer — packaging: static export (BUILD_MODE=export, no basePath) plus the
existing static gateway script in one zip, uploaded via the Hostinger JS-app deploy;
domain adpilot.zealve.com provisioned by
scripts/provision-adpilot-demo.mjs(verify-ownership → create website → DNS A-record check; prints no secrets).
Surface-area deltas
apps/web-next/lib/demo.ts— new in-memory engine: 3 seeded plans, 6 templates, 3 pending approvals, keyword policy linter, dry-run runs; same method surface as the real client; per-page-load state.apps/web-next/lib/api.ts— demo swap as above; no route or payload changes for the real path.apps/web-next/app/layout.tsx— sidebar footer label flips on the build-timeNEXT_PUBLIC_DEMO_MODEconstant.scripts/provision-adpilot-demo.mjs— new, idempotent, token read from env, never printed.CHANGELOG.md(0.10.0 entry),HANDOFF.md(gotcha 11), and the closed board cardtasks/90-done/T-036-demo-mode-hostinger-deployment.mdare documentation-only deltas.
Verification (what "done" meant here)
- Demo export builds clean under the strict gate (tsc + static generation).
- Compile-time shape compatibility between the demo engine and the real client.
- Live checks against https://adpilot.zealve.com: all five routes 200 over HTTPS, demo data hydrates in a real browser, dry-run renders the run card, approval decide flips the queue count. All verified in the built-in browser on the live origin.
Out of scope
Real ad-platform calls (never — sandbox rule), the Go API on Hostinger (cannot exec binaries on shared Node hosting; VPS card pending), sign-in/auth (demo is unauthenticated by design and clearly labeled).