// Cinematic landing scene: brand, scenarios pick, start tour CTA.
import { motion } from "framer-motion";
import { useApp } from "../state/store";
import { liveMeta } from "../data/scenarios";
import { Sparkles, Arrow, Cmd, Bot, Pulse, Sun, Moon } from "../components/icons";
export default function Landing() {
const setScene = useApp((s) => s.setScene);
const setScenarioId = useApp((s) => s.setScenarioId);
const setCmdOpen = useApp((s) => s.setCmdOpen);
const setConsoleOpen = useApp((s) => s.setConsoleOpen);
const scenarios = useApp((s) => s.scenarios);
const mode = useApp((s) => s.mode);
const setMode = useApp((s) => s.setMode);
const refreshLive = useApp((s) => s.refreshLive);
const liveLoading = useApp((s) => s.liveLoading);
const liveTotals = useApp((s) => s.liveTotals);
return (
Business-as-code · Mission Control
Every process. One control surface.
FlowMaster turns the operational map of a company into living,
typed processes — backed by humans, agents, and rules — and gives you
one control surface to drive them. Every procurement, finance, people,
and service workflow runs end-to-end through EA2 on{" "}
{liveMeta.fetchedFrom?.replace("https://", "") ?? "the FlowMaster backend"} .
setScene("mission")}>
Enter Mission Control
mode === "live" ? refreshLive() : setMode("live")}
disabled={liveLoading}
title={mode === "live" ? "Re-fetch live scenarios from demo.flow-master.ai" : "Toggle between bundled snapshot and a live in-browser fetch"}
>
{liveLoading ? : }
{mode === "live" ? "Live · refresh" : "Go live"}
{ setScene("studio"); }}>
Design a process
setConsoleOpen(true)}>
Open live console
{liveTotals?.workItems ?? liveMeta.workItems}
{mode === "live" ? "live work items (now)" : "snapshot work items"}
{liveTotals?.distinctDefs ?? liveMeta.distinctDefs}
process definitions
{scenarios.length}
scenarios in catalog
{mode === "live" ? "LIVE" : "SNAPSHOT"}
data mode
{scenarios.map((s) => (
{ setScenarioId(s.id); setScene("mission"); }}
>
{s.live ? "live" : "blueprint"}
{s.family.label}
{s.family.subtitle}
{s.steps.length} steps
·
{s.queue.length} cases
·
{s.version}
))}
FlowMaster · Mission Control · live operator surface for FlowMaster processes
);
}
function ThemeToggle() {
const theme = useApp((s) => s.theme);
const setTheme = useApp((s) => s.setTheme);
const isDark = theme === "dark";
return (
setTheme(isDark ? "light" : "dark")}
title={isDark ? "Switch to light theme" : "Switch to dark theme"}
aria-label="Toggle theme"
>
{isDark ? : }
{isDark ? "LIGHT" : "DARK"}
);
}