// V2 — Anatomy (3D layer stack) + Build simulator
const { useState: useStateF, useEffect: useEffectF, useRef: useRefF } = React;
/* =============================================================================
AnatomySection v2 — dark, isometric exploded stack, scroll-driven
============================================================================= */
const ANAT_LAYERS = [
{
num: "01", name: "DATA", glow: "#6D8DF7",
title: "Start with the data.",
body: "Datastores with 50+ field types, validation, audit mode and soft-delete. Define the shape once — tables, search index and REST API are generated instantly.",
},
{
num: "02", name: "INTERFACE", glow: "#9B7CF7",
title: "The UI writes itself.",
body: "New/Edit forms, browse views, dashboards and document templates are derived from your datastores. Add a field, and it appears everywhere — no template work.",
},
{
num: "03", name: "ACCESS", glow: "#5FB2E8",
title: "Locked down by default.",
body: "Security groups with datastore, field and row-level permissions. Default-deny, grant-only. SSO, 2FA and IP rules are switches, not projects.",
},
{
num: "04", name: "OPERATE", glow: "#63C7A6",
title: "Live, monitored, maintained.",
body: "One-click deploys to UK-sovereign infrastructure. Backups, audit trail, error capture and uptime monitoring are part of the substrate — not bolt-ons.",
},
];
function PlanePattern({ i }) {
if (i === 0) return (
{[64, 82, 48, 74, 58].map((w, k) => (
))}
);
if (i === 1) return (
{[0, 1, 2, 3].map(k =>
)}
);
if (i === 2) return (
{Array.from({ length: 24 }).map((_, k) => (
))}
);
return (
);
}
function AnatomySection() {
const [active, setActive] = useStateF(0);
const sectionRef = useRefF(null);
useEffectF(() => {
const onScroll = () => {
const el = sectionRef.current;
if (!el) return;
const rect = el.getBoundingClientRect();
const total = el.offsetHeight - window.innerHeight;
if (total <= 0) return;
const raw = Math.max(0, Math.min(0.999, -rect.top / total));
setActive(Math.min(ANAT_LAYERS.length - 1, Math.floor(raw * ANAT_LAYERS.length)));
};
onScroll();
window.addEventListener("scroll", onScroll, { passive: true });
return () => window.removeEventListener("scroll", onScroll);
}, []);
const goTo = (i) => {
const el = sectionRef.current;
if (!el) return;
const total = el.offsetHeight - window.innerHeight;
window.scrollTo({ top: el.offsetTop + (i / ANAT_LAYERS.length) * total + 8, behavior: "smooth" });
};
return (
Anatomy of an app
Four layers. One platform.
Scroll — every serious application is these four layers. We generate and maintain all of them.
{ANAT_LAYERS.map((l, i) => (
goTo(i)}
>
{l.num} · {l.name}
))}
{ANAT_LAYERS.map((l, i) => (
goTo(i)} style={{ "--glow": l.glow }}>
{l.num} — {l.name}
{l.title}
{l.body}
))}
);
}
/* =============================================================================
BuilderSection v2 — "watch your app assemble itself" simulator
============================================================================= */
const SIM_TYPES = [
{ id: "patients", label: "Patient registry", noun: "patients" },
{ id: "crm", label: "Sales CRM", noun: "deals" },
{ id: "assets", label: "Asset tracker", noun: "assets" },
{ id: "tickets", label: "Service desk", noun: "tickets" },
{ id: "members", label: "Membership portal", noun: "members" },
{ id: "pwa", label: "Mobile PWA", noun: "jobs" },
{ id: "booking", label: "Booking system", noun: "bookings" },
{ id: "shop", label: "Online store", noun: "orders" },
{ id: "lms", label: "Learning platform", noun: "courses" },
{ id: "inventory",label: "Inventory & stock", noun: "SKUs" },
{ id: "events", label: "Events & ticketing",noun: "attendees" },
{ id: "grants", label: "Grants & casework", noun: "cases" },
];
const SIM_FEATURES = [
{ id: "rbac", label: "Role-based access", step: "Applying security groups" },
{ id: "tenants", label: "Multi-tenant", step: "Partitioning tenants" },
{ id: "stripe", label: "Stripe billing", step: "Connecting Stripe" },
{ id: "sso", label: "Microsoft SSO", step: "Connecting Azure AD" },
{ id: "sms", label: "SMS alerts", step: "Configuring SMS relay" },
{ id: "audit", label: "Audit trail", step: "Enabling audit mode" },
{ id: "pwa", label: "Offline PWA", step: "Enabling offline mode" },
{ id: "docs", label: "PDF documents", step: "Adding document templates" },
{ id: "search", label: "Full-text search", step: "Turning on search" },
{ id: "api", label: "Public API", step: "Turning on the API" },
{ id: "reports", label: "Reports & charts", step: "Assembling report builder" },
{ id: "i18n", label: "Multi-language", step: "Loading translations" },
];
const SIM_ROWS = {
patients: [["P-00481", "S. Patel", "Active"], ["P-00480", "M. Hughes", "Active"], ["P-00479", "R. Khan", "Triage"], ["P-00478", "T. Brown", "Active"], ["P-00477", "A. Singh", "Critical"], ["P-00476", "L. Wright", "Closed"]],
assets: [["AM-04482", "168 Counterbalance", "Out"], ["AM-04483", "Generator", "Stock"], ["AM-04484", "Light Meter", "Stock"], ["AM-04485", "Test Kit", "Out"], ["AM-04486", "Jack", "Repair"], ["AM-04487", "Laptop", "Stock"]],
tickets: [["T-22148", "Login fails on Safari", "Open"], ["T-22147", "Export missing rows", "Open"], ["T-22146", "SSO redirect loop", "Pending"], ["T-22145", "Slow dashboard", "Open"], ["T-22144", "2FA reset", "Resolved"], ["T-22143", "API rate limit", "Resolved"]],
members: [["M-0912", "Q. Adeyemi", "Founders"], ["M-0911", "K. Park", "Pro"], ["M-0910", "R. Singh", "Pro"], ["M-0909", "M. O'Neil", "Free"], ["M-0908", "L. Costa", "Pro"], ["M-0907", "T. Vance", "Founders"]],
crm: [["D-3391", "Northwind Ltd · £48k", "Proposal"], ["D-3390", "Globex · £12k", "Won"], ["D-3389", "Initech · £96k", "Negotiation"], ["D-3388", "Hooli · £7k", "Lost"], ["D-3387", "Acme HQ · £31k", "Qualified"], ["D-3386", "Stark Inc · £120k", "Proposal"]],
pwa: [["J-7742", "Boiler service · Leeds", "En route"], ["J-7741", "Meter read · York", "Done"], ["J-7740", "Leak repair · Hull", "Assigned"], ["J-7739", "Install · Ripon", "Done"], ["J-7738", "Survey · Otley", "Scheduled"], ["J-7737", "Callout · Selby", "En route"]],
booking: [["B-5521", "A. Chen · 09:00", "Confirmed"], ["B-5520", "R. Okafor · 10:00", "Confirmed"], ["B-5519", "M. Díaz · 11:00", "Held"], ["B-5518", "K. Yamada · 13:00", "Confirmed"], ["B-5517", "S. Ahmed · 14:00", "Cancelled"], ["B-5516", "L. Berg · 15:00", "Confirmed"]],
shop: [["#4821", "A. Chen · £128", "Paid"], ["#4820", "R. Okafor · £54", "Fulfilled"], ["#4819", "M. Díaz · £312", "Paid"], ["#4818", "K. Yamada · £20", "Refunded"], ["#4817", "S. Ahmed · £86", "Pending"], ["#4816", "T. Vance · £45", "Paid"]],
lms: [["C-118", "Safeguarding L2", "Live"], ["C-117", "Fire Safety", "Live"], ["C-116", "Manual Handling", "Draft"], ["C-115", "First Aid", "Live"], ["C-114", "GDPR Basics", "Live"], ["C-113", "Food Hygiene", "Archived"]],
inventory:[["SKU-9042", "M6 Bolt · 4,120", "In stock"], ["SKU-9041", "Bearing 608", "Low"], ["SKU-9040", "O-ring 24mm", "In stock"], ["SKU-9039", "Coupling", "Backorder"], ["SKU-9038", "Gasket set", "In stock"], ["SKU-9037", "Drive belt", "Low"]],
events: [["A-2210", "H. Mensah · VIP", "Checked in"], ["A-2209", "P. Novak · GA", "Registered"], ["A-2208", "F. Rossi · GA", "Checked in"], ["A-2207", "D. Bauer · Speaker", "Registered"], ["A-2206", "N. Ito · GA", "No-show"], ["A-2205", "G. Silva · VIP", "Checked in"]],
grants: [["G-0471", "Community Fund · £8k", "Approved"], ["G-0470", "Youth Grant · £3k", "Review"], ["G-0469", "Arts Award · £12k", "Approved"], ["G-0468", "Access Fund · £2k", "Rejected"], ["G-0467", "Green Grant · £15k", "Review"], ["G-0466", "Skills Fund · £6k", "Approved"]],
};
function BuilderSection() {
const [type, setType] = useStateF("patients");
const [feats, setFeats] = useStateF(["rbac", "audit", "sso"]);
const [phase, setPhase] = useStateF("idle"); // idle | building | done
const [stepIdx, setStepIdx] = useStateF(0);
const cfg = SIM_TYPES.find(t => t.id === type);
const steps = [
"Adding your data tables",
"Laying out forms",
"Arranging browse screens",
"Connecting the dashboard",
...SIM_FEATURES.filter(f => feats.includes(f.id)).map(f => f.step),
"Publishing your app",
];
useEffectF(() => {
if (phase !== "building") return;
setStepIdx(0);
const t = setInterval(() => {
setStepIdx(i => {
if (i + 1 >= steps.length) {
clearInterval(t);
setTimeout(() => setPhase("done"), 500);
return i;
}
return i + 1;
});
}, 460);
return () => clearInterval(t);
}, [phase]);
const reset = () => setPhase("idle");
const toggleFeat = (id) => { setFeats(f => f.includes(id) ? f.filter(x => x !== id) : [...f, id]); reset(); };
return (
See it for yourself
Watch your app assemble itself.
Point and click. No code, no terminal, no build step. The foundations — data, forms, screens, security — come together in one web-based, WYSIWYG interface. This is a taste of the real thing.
1 — What are we building?
{SIM_TYPES.map(t => (
{ setType(t.id); reset(); }}>
{t.label}
))}
2 — Which foundations?
{SIM_FEATURES.map(f => {
const on = feats.includes(f.id);
return (
toggleFeat(f.id)} className={"sim-chip" + (on ? " is-on" : "")}>
{on ? "✓ " : "+ "}{f.label}
);
})}
3 — Generate
setPhase("building")}
>
{phase === "building" ? "Assembling…" : phase === "done" ? "Start over" : "Assemble app"}
Every part below is assembled visually — the same point-and-click steps you'd take in the builder.
Everything here is real platform behaviour: datastores, generated forms, permission matrices and publishing all work exactly like this — just with your data, all point-and-click.
{cfg.noun}.activemanage.app
{phase === "idle" && (
Configure on the left, then press Generate app .
)}
{phase === "building" && (
Assembling your app…
{steps.map((s, i) => (
{i < stepIdx ? (
) : i === stepIdx ? : null}
{s}
{i < stepIdx &&
Done }
))}
)}
{phase === "done" &&
}
);
}
// Finished app — platform-styled, elements pop in staggered
function SimResult({ cfg, feats }) {
const rows = SIM_ROWS[cfg.id];
const B = { side: "#EAEDF1", border: "#DDE2E8", blue: "#1C82C4", blueDk: "#14618F", tile: "#E7F1FB", title: "#2B4257", label: "#46535F", faint: "#8A95A1", line: "#EDF0F3", green: "#1F9254" };
const has = (id) => feats.includes(id);
const featLabel = (id) => SIM_FEATURES.find(f => f.id === id)?.label;
const chip = (label, i) => (
{label}
);
const statusColour = (s) =>
["Critical", "Repair", "Lost", "Cancelled", "Rejected", "Backorder"].includes(s) ? "#E5484D" :
["Triage", "Pending", "Out", "Held", "Review", "Low", "Scheduled", "No-show"].includes(s) ? "#C77700" :
["Closed", "Resolved", "Free", "Refunded", "Draft", "Archived", "Registered"].includes(s) ? B.faint :
B.green;
const statusBg = (s) => {
const c = statusColour(s);
return c === B.faint ? "#EEF0F2" : c + "1A";
};
// Sidebar nav is driven by the toggled foundations
const nav = [
{ s: cfg.label, on: true },
{ s: "Dashboard", on: true },
{ s: "Reports & charts", on: has("reports") },
{ s: "Documents", on: has("docs") },
{ s: "Billing", on: has("stripe") },
{ s: "Messages", on: has("sms") },
{ s: "Audit log", on: has("audit") },
{ s: "API & webhooks", on: has("api") },
{ s: "Users & roles", on: true },
{ s: "Settings", on: true },
].filter(n => n.on);
// KPI cards, some driven by foundations
const kpis = [
{ k: "Total records", v: "4,128" },
has("stripe") ? { k: "Revenue MTD", v: "£38.2k" } : { k: "Added this week", v: "216" },
has("reports") ? { k: "Open reports", v: "7" } : { k: "Active today", v: "83" },
];
// Toolbar buttons, feature-aware
const tools = [
has("search") && { t: "Search", primary: false },
{ t: "Filter", primary: false },
{ t: "Sort", primary: false },
has("docs") && { t: "Export PDF", primary: false },
(has("sms") || has("stripe")) && { t: has("stripe") ? "Invoice" : "Send SMS", primary: false },
{ t: "+ New", primary: true },
].filter(Boolean);
const cols = ["Ref", "Name", "Owner", "Updated", "Status", ""];
return (
{/* Sidebar */}
{cfg.label}
{has("tenants") && (
acme-hq
▾
)}
{nav.map((n, i) => (
{n.s}
))}
JD
J. Doe
{/* Main */}
{/* Header + toolbar */}
{cfg.label}
{rows.length} of 4,128 records{has("tenants") ? " · tenant: acme-hq" : ""}
{tools.map((b, i) => (
{b.t}
))}
{/* KPI cards */}
{kpis.map((kp, i) => (
))}
{/* Table */}
{cols.map((c, i) => (
{c}
))}
{rows.map((r, i) => (
{r[0]}
{r[1]}
{r[1].replace(/[^A-Za-z]/g, "").slice(0, 2).toUpperCase() || "AM"}
{["A. Chen", "R. Okafor", "M. Díaz", "K. Yamada", "S. Ahmed", "L. Berg"][i % 6]}
{["2m", "1h", "3h", "1d", "2d", "4d"][i % 6]}
{r[2]}
✎
⋯
))}
{/* Footer: live + pagination + feature chips */}
● LIVE
{has("pwa") &&
⤓ INSTALLABLE }
{["REST API", ...feats.map(featLabel)].slice(0, 5).map((l, i) => chip(l, i))}
{["‹", "1", "2", "›"].map((p, i) => (
{p}
))}
);
}
Object.assign(window, { AnatomySection, BuilderSection });