// landing.jsx — public marketing surface: the company overview and the docs page. // Loaded from index.html as an ordered `text/babel` classic script (position 3 of 8). // Classic scripts share one global scope — see docs/engineering/Patterns.md §9. function LandingPage({ siteConfig }) { const nav = siteConfig?.nav || []; const hero = siteConfig?.sections?.hero || {}; const mdmUrl = siteConfig?.mdm_url || MDM_URL_FALLBACK; // Hero defaults — used when no admin config exists. const heroBadge = hero.badge || "ZenMDM now available"; const heroTitle = hero.title || "Infrastructure tools for"; const heroTitleAccent = hero.title_accent || "modern IT"; const heroSubtitle = hero.subtitle || "The open, declarative-first Apple-only MDM that scales from indie start-ups to MSPs, delivers instant OS support, privacy-safe BYOD, and deep telemetry you own, all at half the cost of incumbents."; const heroCTAPrimary = hero.cta_primary || "Explore ZenMDM →"; const heroCTAPrimaryHref = hero.cta_primary_href || mdmUrl; const heroCTASecondary = hero.cta_secondary || "View all products"; const heroCTASecondaryHref = hero.cta_secondary_href || "#products"; const [hoveredProduct, setHoveredProduct] = useState(null); const [apiProducts, setApiProducts] = useState(null); useEffect(() => { fetch(`${API_BASE}/community/products`) .then(r => { if (!r.ok) throw new Error(r.status); return r.json(); }) .then(d => { if (d.products && d.products.length > 0) setApiProducts(d.products); }) .catch(err => console.warn("fetch failed:", err)); }, []); const rawProducts = apiProducts || DEFAULT_PRODUCTS; const products = rawProducts.map(p => ({ ...p, id: p.slug, desc: p.description, href: productHref(p, mdmUrl), features: productFeatures(p), })); return (
{/* Nav */} {/* Hero */}
{/* Radial glow */}
{/* Grid */}
{heroBadge}

{heroTitle}{" "} {heroTitleAccent}

{heroSubtitle}

{/* Scroll indicator */}
Scroll
{/* Products */}
Products

One platform,{" "} the tools for you

{products.map((p) => { const isAvailable = p.status === "available"; const isHovered = hoveredProduct === p.id; // An available product card is one link over the whole card — the // same pattern DocsPage uses. It replaced a
that // wrapped a second onClick handler on "See features", so a click // there used to navigate twice. A card with no destination stays // an inert
. const Card = p.href ? "a" : "div"; return ( setHoveredProduct(p.id)} onMouseLeave={() => setHoveredProduct(null)} style={{ display: "block", textDecoration: "none", color: "inherit", padding: 36, borderRadius: 16, border: isHovered && isAvailable ? `1px solid ${p.color}40` : "1px solid #e8e8e8", background: "#fff", cursor: isAvailable ? "pointer" : "default", transition: "all 0.3s ease", transform: isHovered && isAvailable ? "translateY(-4px)" : "none", boxShadow: isHovered && isAvailable ? `0 12px 40px ${p.color}12` : "none", opacity: isAvailable ? 1 : 0.65, position: "relative", overflow: "hidden", }} > {/* Top accent line */}

{p.name}

{p.tagline}
{productStatusLabel(p.status)}

{p.desc}

{p.features.map((f, i) => ( {f} ))}
{isAvailable && (
From €3/mo See features →
)} ); })}
{/* Stats / trust bar */}
{[ { value: "< 60s", label: "Instance provisioning" }, { value: "€3", label: "Starting price / month" }, { value: "200+", label: "Osquery data points" }, { value: "5", label: "IdP providers supported" }, ].map((s, i) => (
{s.value}
{s.label}
))}
{/* CTA */}

Ready to manage your fleet?

Free for up to 5 devices — forever. No credit card. No trial expiry. Scale to unlimited when you're ready.

Signups are disabled currently

{/* Footer */}
); } // ─── Documentation Page ────────────────────────────────────────────────────── function DocsPage() { const sections = [ { title: "MDM Server API", description: "Endpoint reference for devices, profiles, packages, device groups, DDM, IdP, osquery, and security events. Interactive Swagger UI is available on your MDM instance at /api/v1/docs.", icon: "📡", href: "/api/v1/docs/mdm-api", external: true, }, { title: "Platform API", description: "Authentication, billing, instance management, and Mollie webhooks for the Zensys platform.", icon: "🌐", href: "/api/v1/docs/platform-api", external: true, }, { title: "Terraform Provider", description: "Manage your MDM configuration as infrastructure-as-code. All resources, data sources, and attributes documented.", icon: "🏗️", href: "/api/v1/docs/terraform-reference", external: true, }, ]; return (
{/* Header */}
Home Docs Dashboard
{/* Hero */}

Documentation

Everything you need to deploy, configure, and automate ZenMDM.

{/* Cards */}
{sections.map((s) => ( { e.currentTarget.style.boxShadow = "0 4px 16px rgba(0,0,0,0.08)"; e.currentTarget.style.borderColor = "#22c55e"; }} onMouseLeave={(e) => { e.currentTarget.style.boxShadow = "none"; e.currentTarget.style.borderColor = "#e5e5e5"; }} >
{s.icon}

{s.title}

{s.description}

))}
{/* Quick Links */}

Quick Links

{[ { label: "Getting Started", desc: "Register, provision, and enroll your first device", href: "#/register?plan=free" }, { label: "Profile Templates", desc: "visionOS, watchOS, macOS CIS L1/L2 — ready to deploy", href: "/api/v1/docs/mdm-api" }, { label: "AI Co-Pilot", desc: "Generate profiles from plain language", href: "/api/v1/docs/mdm-api" }, { label: "GitOps & CLI", desc: "Manage your fleet as code — Terraform + zenmdm CLI", href: "/api/v1/docs/mdm-api" }, ].map((item) => (
{item.label}
{item.desc}
))}
); }