Replaces the open calculator with the intended flow: visitors register
(name, company, title, business email, region, device count) to unlock
a 15-slide Strategy Deck viewer and the ROI Calculator. Both the deck
and a personalised ROI report now download as real PowerPoint files,
built client-side with JSZip by patching the deck template's XML.
Registration and report downloads are captured as enquiries via the
existing /api/leads endpoint. Drops the old PNG results-slide export
(html2canvas) in favour of the PPTX report.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Lazy-loads html2canvas (separate chunk, only fetched on click) to export
the card as a PNG. The button floats on the card's top-right corner,
outside the captured element, so it never ends up in the exported image.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fixes the two High-severity findings from Isaac Hague's 19/08/2026 review
(F-01, F-02) plus F-03 through F-09:
- F-01: content writes are now sanitised server-side (sanitize-html) as the
real security boundary — the browser-side sanitiser is UX, not enforcement,
and a direct API write bypassed it entirely. Also closes the javascript:
href gap in sanitiseInline().
- F-02: refusing the factory admin password no longer depends on NODE_ENV;
it's the unconditional default now, with an explicit ALLOW_DEV_PASSWORD=1
opt-in for local dev.
- F-03: adds CSP (report-only — the legacy inline onclick="" handlers would
break under enforcement) and HSTS, in both server/index.mjs and vercel.json.
- F-04/F-05: rate-limits /api/leads and rotates leads.jsonl past 5MB; CSV
export neutralises leading =+-@ so exports can't carry live formulas.
- F-06: sessions drop from 12h to 4h and are tied to a per-boot random epoch,
so a restart now actually revokes outstanding tokens.
- F-07/F-08/F-09: generic messages on 5xx, fixed-length password comparison
(no more length disclosure via the short-circuit), periodic throttle-map
cleanup.
F-10 (dependency advisories): applied the two non-breaking patches (nanoid,
postcss); the vite/react-router-dom major bumps are left for a separate pass,
per the report's own recommendation. F-11 (PDF Content-Disposition) and a
CAPTCHA/honeypot on the enquiry form are deliberately left open — both are
product/UX calls, not pure security fixes.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Server: refuse to start in production with the default admin password,
drop SVG from the upload allow-list (stored-XSS risk), add baseline
security headers, make the login rate limiter proxy-aware via TRUST_PROXY,
and auto-load .env.local/.env in dev.
Admin: sanitise post bodies on content import/snapshot restore (previously
bypassed sanitiseBody), confirm before discarding a draft, drop back to the
login screen on a mid-session 401 instead of a stuck error, add hero-image
alt text and a title/excerpt search to the articles panel.
Site: replace the soft-404-to-homepage fallback with a real noindex 404
page, add a focus trap/Escape handling/aria-modal to the enquiry modal,
aria-expanded on the mobile nav toggle, ItemList/breadcrumb structured data
for the newsroom and articles, and wire sitemap generation into the build
so it can't go stale. Extract the duplicated NewsGrid/ArticlePage card
markup into a shared PostCard component.
Content: 13 of 18 seed articles shipped with no hero image (one pointed at
a dead WordPress URL); the live blackdice.ai site turned out to still be
the old blackdice-studio.html export, so recovering the originals wasn't
feasible. Filled the gap with freely-licensed Unsplash placeholders,
credited in the author field, until real photography is ready.
Also adds a Gitea Actions CI workflow (typecheck + build).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rebuilds content management around a single admin route (/admin —
"BlackDice Studio"), replacing blackdice-studio.html. Publishing writes
one JSON content document instead of regenerating HTML files, so it can
no longer overwrite hand-made site changes the way the old tool did.
- /admin: click-to-edit copy/images, article CRUD with a Word-safe rich
text editor, demo clip management, per-page SEO, enquiry log, publish
history with rollback
- Real per-page URLs for all pages and articles, each with its own
meta/canonical/OG/JSON-LD
- Newsroom + article pages driven by the CMS post library, seeded from
the old studio's export (17 articles) plus a drafted GSMA Open Gateway
press release awaiting approval
- Demo sections on Mobile SDK and Halo CPE, interactive by default and
upgradable to an uploaded clip per slot
- Dependency-free Node API server (auth, publish, uploads, snapshots,
leads, live sitemap)
- Deployment configs for Node/nginx/IIS, Vercel and Netlify
See docs/ARCHITECTURE.md, docs/PROJECT-STRUCTURE.md, docs/CMS-GUIDE.md
and docs/DEPLOYMENT.md.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>