Initial commit: BlackDice site rebuild with integrated CMS

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>
This commit is contained in:
2026-08-12 23:52:44 +05:00
co-authored by Claude Sonnet 5
commit 63a36e0dca
77 changed files with 19487 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import type { DemoSlot } from '../../cms/types'
/**
* A CMS-configured demo clip. Renders nothing until a video has been uploaded in
* /admin → Demos, so a page never shows an empty player.
*/
export default function DemoPlayer({ slot, compact = false }: { slot?: DemoSlot; compact?: boolean }) {
if (!slot || !slot.enabled || !slot.video) return null
return (
<figure className={`bd-demo-clip${compact ? ' compact' : ''}`}>
<div className="dash-frame bd-demo-frame">
<video
controls
playsInline
preload="none"
poster={slot.poster || undefined}
style={{ display: 'block', width: '100%', height: 'auto', background: '#010e14' }}>
<source src={slot.video} />
Your browser cannot play this clip.
</video>
</div>
{slot.title || slot.caption ? (
<figcaption>
{slot.title ? <strong>{slot.title}</strong> : null}
{slot.caption ? <span>{slot.caption}</span> : null}
</figcaption>
) : null}
</figure>
)
}
+74
View File
@@ -0,0 +1,74 @@
import { useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { demoSlotsForPage } from '../../cms/pages'
import { useContent } from '../../cms/store'
import { THREAT_SCENARIOS } from '../../demo/threats/scenarios'
import { ThreatCinematic } from '../../demo/threats/ThreatDemo'
import DemoPlayer from './DemoPlayer'
/**
* "See it in action" for a product page: one tab per demo. A tab plays the clip
* uploaded in the CMS if there is one, and otherwise falls back to the live
* interactive demo built into this project — so the section is never empty and
* clips can be swapped in later without touching code.
*/
export default function DemoSection({ page, eyebrow, heading, blurb }: { page: string; eyebrow: string; heading: string; blurb: string }) {
const content = useContent()
const navigate = useNavigate()
const slots = demoSlotsForPage(page).filter((def) => {
const slot = content.demos[def.key]
if (slot && !slot.enabled) return false
// Keep a tab if it has either a clip or an interactive fallback.
return Boolean(def.scenario || slot?.video)
})
const [active, setActive] = useState(0)
if (!slots.length) return null
const current = slots[Math.min(active, slots.length - 1)]
const slot = content.demos[current.key] || current.defaults
const scenario = current.scenario ? THREAT_SCENARIOS.find((s) => s.id === current.scenario) : undefined
return (
<>
<div className="sect-hd">
<span className="ey">{eyebrow}</span>
<h2 className="h2">{heading}</h2>
<p>{blurb}</p>
</div>
<div className="bd-demo-tabstrip">
{slots.map((def, i) => {
const label = (content.demos[def.key] || def.defaults).title
return (
<button key={def.key} className={`bd-demo-tab${i === active ? ' on' : ''}`} onClick={() => setActive(i)}>
{label}
</button>
)
})}
</div>
<div className={`bd-demo-stage${slot.video ? '' : ' bare'}`}>
{slot.video ? (
<DemoPlayer slot={slot} />
) : scenario ? (
// No frame, no backdrop: the phone mockup sits straight on the page,
// the same way the hero demo reads.
<div className="bd-demo-interactive">
<ThreatCinematic key={scenario.id} scenario={scenario} bare />
</div>
) : null}
<p className="bd-demo-caption">{slot.caption}</p>
</div>
<div className="btn-row" style={{ marginTop: 24 }}>
<button className="btn-g" onClick={() => navigate('/threat-demos')}>
Open the full demo player →
</button>
<button className="btn-p" onClick={() => (window as { showDemo?: () => void }).showDemo?.()}>
Request a demonstration
</button>
</div>
</>
)
}