All files / src/apps/home/pages Home.tsx

40.62% Statements 13/32
100% Branches 0/0
38.88% Functions 7/18
38.7% Lines 12/31

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554                                          1x 1x   1x         1x 1x   1x 1x     1x                                                                                                                                                                                                                                                                       3x                                                                                                                                                                   3x                                                                                                                                                                             3x                                                                                                                                                                                                                                                                         2x                                                                                                                                                                      
import { usePageMeta } from "@/contexts/PageContext";
import { APP_NAME, APP_ROUTES } from "@/routes/const";
import { AssuranceCard, BotNetwork, ComplexFlowNetwork, CountUpOnDisplay, NetworkGraph, SecurityNetwork, SpecialityCard } from "chainr-frontend-shared";
import {
  ArrowDown,
  BrainCircuit,
  ClipboardCheck,
  CloudCheck,
  Coins,
  Euro,
  Footprints,
  Handshake,
  PoundSterling,
  Scale,
  ShieldAlert,
  ShieldCheck,
  Workflow,
} from "lucide-react";
import React, { useEffect, useState } from "react";
import { Reveal } from "@/components/reveal";
 
const Home: React.FC = () => {
  usePageMeta("Home", false);
 
  const [windowSize, setWindowSize] = useState({
    width: window.innerWidth,
    height: window.innerHeight,
  });
 
  useEffect(() => {
    const handleResize = () =>
      setWindowSize({ width: window.innerWidth, height: window.innerHeight });
    window.addEventListener("resize", handleResize);
    return () => window.removeEventListener("resize", handleResize);
  }, []);
 
  return (
    <div className="overflow-hidden">
      {/* ─── HERO ─────────────────────────────────────────────────────────── */}
      <section
        className="relative flex items-center justify-center"
        style={{ height: "100vh", minHeight: 600 }}
      >
        <div className="absolute inset-0 overflow-visible">
          <NetworkGraph
            width={windowSize.width}
            height={windowSize.height}
            classes="w-full h-full"
          />
        </div>
        <div
          className="absolute inset-0"
          // style={{
          //   background:
          //     "linear-gradient(135deg, rgba(0,0,20,0.88) 0%, rgba(0,0,60,0.72) 50%, rgba(0,0,20,0.88) 100%)",
          // }}
        />
        <div className="relative z-10 text-center text-white px-8 max-w-4xl mx-auto">
          <div
            className="inline-block mb-6 px-4 py-1.5 rounded-full text-xs font-semibold tracking-widest uppercase"
            style={{
              background: "rgba(59,130,246,0.2)",
              border: "1px solid rgba(59,130,246,0.5)",
              backdropFilter: "blur(8px)",
            }}
          >
            Secure · Governed · Accountable
          </div>
          <h1
            className="text-7xl md:text-9xl font-black leading-tight mb-6"
            style={{
              background:
                "linear-gradient(135deg, #12276c 0%, #3572d5 55%, #06b6d4 100%)",
              WebkitBackgroundClip: "text",
              WebkitTextFillColor: "transparent",
              backgroundClip: "text",
            }}
          >
            {APP_NAME}
          </h1>
          <h1
            className="text-5xl md:text-7xl font-black leading-tight mb-6"
            style={{
              background:
                "linear-gradient(135deg, #1e40af 0%, #3b82f6 55%, #06b6d4 100%)",
              WebkitBackgroundClip: "text",
              WebkitTextFillColor: "transparent",
              backgroundClip: "text",
            }}
          >
            Democratising Secure, Governed & Accountable AI
          </h1>
          <p className="text-xl md:text-2xl text-blue-800 dark:text-white mb-10 max-w-2xl mx-auto leading-relaxed opacity-90">
            Run your AI fleet under rules you can prove were enforced, with
            evaluation evidence behind every agent version — all in one secure
            platform.
          </p>
          <div className="flex flex-col sm:flex-row gap-4 justify-center">
            <a
              href={APP_ROUTES.HOME.signup}
              className="px-8 py-4 rounded-xl font-bold text-lg"
              style={{
                background: "linear-gradient(135deg, #2563eb, #1d4ed8)",
                color: "white",
                boxShadow: "0 0 32px rgba(37,99,235,0.55)",
                transition: "box-shadow 0.2s, transform 0.2s",
              }}
              onMouseEnter={(e) => {
                e.currentTarget.style.boxShadow =
                  "0 0 52px rgba(37,99,235,0.85)";
                e.currentTarget.style.transform = "scale(1.03)";
              }}
              onMouseLeave={(e) => {
                e.currentTarget.style.boxShadow =
                  "0 0 32px rgba(37,99,235,0.55)";
                e.currentTarget.style.transform = "scale(1)";
              }}
            >
              Get Started Free
            </a>
            <a
              href={APP_ROUTES.HOME.services}
              className="px-8 py-4 rounded-xl font-bold text-lg"
              style={{
                background: "rgba(255,255,255,0.08)",
                color: "#1d4ed8",
                border: "1px solid rgba(255,255,255,0.3)",
                backdropFilter: "blur(8px)",
                transition: "background 0.2s, transform 0.2s",
              }}
              onMouseEnter={(e) => {
                e.currentTarget.style.background = "rgba(255,255,255,0.16)";
                e.currentTarget.style.transform = "scale(1.03)";
              }}
              onMouseLeave={(e) => {
                e.currentTarget.style.background = "rgba(255,255,255,0.08)";
                e.currentTarget.style.transform = "scale(1)";
              }}
            >
              Explore Platform
            </a>
          </div>
        </div>
        <div className="absolute bottom-8 left-1/2 -translate-x-1/2 text-white opacity-60 animate-bounce">
          <ArrowDown size={28} />
        </div>
      </section>
 
      {/* ─── FEATURE PILLARS ──────────────────────────────────────────────── */}
      <section className="py-20 px-8">
        <div className="max-w-6xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-8">
          {[
            {
              icon: <Handshake className="size-8" />,
              title: "Orchestrate Your LLM Fleet",
              desc: "Manage, monitor & connect intelligent agents from a single unified dashboard.",
            },
            {
              icon: <ShieldCheck className="size-8" />,
              title: "Govern Every Invocation",
              desc: "Rules on what may run, what the model reads and what comes back, enforced where the model is called, with a record of every outcome.",
            },
            {
              icon: <ClipboardCheck className="size-8" />,
              title: "Prove Fitness for Purpose",
              desc: "Evaluate each agent version against your own cases and built-in gold datasets before it answers anyone.",
            },
          ].map((item, i) => (
            <Reveal size="xl" key={i} delay={i * 0.15}>
              <div
                className="p-6 rounded-2xl text-center h-full"
                style={{
                  background:
                    "linear-gradient(135deg, rgba(9,9,121,0.08) 0%, rgba(0,212,255,0.04) 100%)",
                  border: "1px solid rgba(59,130,246,0.18)",
                  transition: "transform 0.2s, border-color 0.2s",
                }}
                onMouseEnter={(e) => {
                  e.currentTarget.style.transform = "translateY(-6px)";
                  e.currentTarget.style.borderColor = "rgba(59,130,246,0.55)";
                }}
                onMouseLeave={(e) => {
                  e.currentTarget.style.transform = "translateY(0)";
                  e.currentTarget.style.borderColor = "rgba(59,130,246,0.18)";
                }}
              >
                <div className="flex justify-center mb-4 text-blue-500">
                  {item.icon}
                </div>
                <h3 className="font-bold text-xl mb-2">{item.title}</h3>
                <p className="text-gray-500 dark:text-gray-300 text-sm leading-relaxed">
                  {item.desc}
                </p>
              </div>
            </Reveal>
          ))}
        </div>
      </section>
 
      {/* ─── BOT NETWORK ──────────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section className="w-full" style={{ height: 520 }}>
          <BotNetwork bots={32} density={0.16} />
        </section>
      </Reveal>
 
      {/* ─── STATS ────────────────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section
          className="py-24 px-8"
          style={{
            background:
              "linear-gradient(135deg, rgba(2,0,36,1) 0%, rgba(9,9,121,0.85) 50%, rgba(0,0,36,1) 100%)",
          }}
        >
          <div className="max-w-5xl mx-auto text-center mb-14">
            <h2 className="text-3xl md:text-4xl font-black text-white mb-4">
              Built to Be Checked
            </h2>
            <p className="text-blue-200 text-lg">
              A governance claim is only as good as the evidence behind it.{" "}
              {APP_NAME} keeps the evidence.
            </p>
          </div>
          {/* Product facts only. Market statistics go here only with a named,
              dated source beside them (docs/business/mvp-roadmap.md). */}
          <div className="max-w-5xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-8">
            {[
              {
                icon: <ClipboardCheck className="size-10 text-blue-300" />,
                number: 7,
                symbol: "",
                label:
                  "built-in gold evaluation datasets, from hallucination to prompt injection, each with a pass mark",
              },
              {
                icon: <Scale className="size-10 text-blue-300" />,
                number: 4,
                symbol: "",
                label:
                  "outcomes recorded for every rule on every invocation: blocked, applied, no change or not matched",
              },
              {
                icon: <Coins className="size-10 text-blue-300" />,
                number: 100,
                symbol: "%",
                label:
                  "of model calls metered, priced and attributed to the resource that made them",
              },
            ].map((stat, i) => (
              <Reveal size="xl" key={i} delay={i * 0.2}>
                <div
                  className="text-center text-white p-8 rounded-2xl"
                  style={{ border: "1px solid rgba(59,130,246,0.25)" }}
                >
                  <div className="flex justify-center mb-4">{stat.icon}</div>
                  <div className="text-5xl font-black mb-3 text-blue-300">
                    <CountUpOnDisplay end={stat.number} />
                    {stat.symbol}
                  </div>
                  <p className="text-blue-100 text-sm leading-relaxed">
                    {stat.label}
                  </p>
                </div>
              </Reveal>
            ))}
          </div>
        </section>
      </Reveal>
 
      {/* ─── SPECIALITIES ─────────────────────────────────────────────────── */}
      <section className="py-20 px-8">
        <div className="max-w-6xl mx-auto">
          <Reveal size="xl">
            <div className="text-center mb-14">
              <h2 className="text-3xl md:text-4xl font-black mb-4">
                What We Specialise In
              </h2>
              <p className="text-gray-500 dark:text-gray-300 text-lg max-w-2xl mx-auto">
                Three pillars of excellence that power every deployment on{" "}
                {APP_NAME}.
              </p>
            </div>
          </Reveal>
          <div className="flex flex-col gap-6">
            {[
              {
                title: "Secure, Private, & Governed AI Systems",
                icon: <ShieldCheck className="size-8" />,
                image: "/pages/sec.jpg",
                description: (
                  <div>
                    Democratising access for users and organisations to AI
                    systems built from the ground up with <b>security</b>,{" "}
                    <b>privacy</b>, and <b>governance</b> at their core. Every
                    resource is <b>scoped to its owner</b>, data is{" "}
                    <b>encrypted at rest in the UK</b>, and every rule leaves a{" "}
                    <b>record you can check</b>.
                  </div>
                ),
                variant: "darkblue" as const,
                align: "left" as const,
              },
              {
                title: "Intelligent Automation",
                icon: <BrainCircuit className="size-8" />,
                image: "/pages/automation2.jpg",
                description: (
                  <div>
                    <b>Streamline your business operations</b> by leveraging
                    AI-driven task execution that{" "}
                    <b>adapts intelligently to your workflows.</b> Automate
                    repetitive processes and <b>free up your team's time</b> to
                    focus on strategic priorities.
                  </div>
                ),
                variant: "gradient2" as const,
                align: "right" as const,
              },
              {
                title: "Workflow Optimisation",
                icon: <Workflow className="size-8" />,
                image: "/pages/optimisation.jpg",
                description: (
                  <div>
                    <b>Boost your team's productivity</b> with cutting-edge AI
                    intelligence designed to{" "}
                    <b>optimise workflows and collaboration.</b> See what your
                    fleet is doing through <b>dashboards</b> over spend,
                    latency, activity and governance, next to the agents that
                    produced it.
                  </div>
                ),
                variant: "darkblue" as const,
                align: "left" as const,
              },
            ].map((card, i) => (
              <Reveal size="xl" key={i} delay={0.1}>
                <SpecialityCard
                  title={card.title}
                  title_icon={card.icon}
                  image={card.image}
                  description={card.description}
                  variant={card.variant}
                  align={card.align}
                />
              </Reveal>
            ))}
          </div>
        </div>
      </section>
 
      {/* ─── SECURITY NETWORK ─────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section className="py-20 px-8 flex flex-col items-center gap-10">
          <div className="text-center max-w-2xl">
            <h2 className="text-3xl md:text-4xl font-black mb-4">
              LLM Governance & Security
            </h2>
            <p className="text-gray-500 dark:text-gray-300 text-lg">
              Every path to and from a model is explicit: segmented networks,
              rules on the way in and the way out, and a record of each
              decision.
            </p>
          </div>
          <SecurityNetwork width={800} height={400} />
        </section>
      </Reveal>
 
      {/* ─── FLOW NETWORK ─────────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section className="py-20 px-8 flex flex-col items-center gap-10">
          <div className="text-center max-w-2xl">
            <h2 className="text-3xl md:text-4xl font-black mb-4">
              Optimise & Integrate
            </h2>
            <p className="text-gray-500 dark:text-gray-300 text-lg">
              Connect agents to your knowledge and the web, and route each
              request to the right model. MCP servers for your own tools, and
              a governed API for your own applications, are on the roadmap.
            </p>
          </div>
          <ComplexFlowNetwork width={700} height={400} appName={APP_NAME} />
        </section>
      </Reveal>
 
      {/* ─── ASSURANCE ────────────────────────────────────────────────────── */}
      <section className="py-20 px-8">
        <div className="max-w-6xl mx-auto">
          <Reveal size="xl">
            <div className="text-center mb-14">
              <h2 className="text-3xl md:text-4xl font-black mb-4">
                Security & Compliance Assurance
              </h2>
              <p className="text-gray-500 dark:text-gray-300 text-lg max-w-2xl mx-auto">
                Built from the ground up with privacy, security, and governance
                at our core.
              </p>
            </div>
          </Reveal>
          <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
            <Reveal size="xl" delay={0}>
              <AssuranceCard
                title="Built with Privacy and Security at Our Core"
                title_icon={<Scale className="size-12" />}
                description="Data encrypted in transit and at rest on UK-hosted infrastructure, every resource scoped to its owner, and continuous monitoring with automated alerts."
                variant="darkblue"
              />
            </Reveal>
            <Reveal size="xl" delay={0.1}>
              <AssuranceCard
                title="Built for UK & EU AI Regulation"
                title_icon={
                  <div className="flex">
                    <PoundSterling className="size-12" />
                    <Euro className="size-12" />
                  </div>
                }
                description="Controls and evidence for what UK and EU frameworks expect: logging, human oversight, and testing before and after every change. We'll show you exactly what we cover."
                variant="gradient2"
              />
            </Reveal>
            <Reveal size="xl" delay={0.1}>
              <AssuranceCard
                title="Proactive Threat Detection"
                title_icon={<ShieldAlert className="size-12" />}
                description="Infrastructure threat detection with automated alerts routed to on-call, and a defined incident path."
                variant="gradient2"
              />
            </Reveal>
            <Reveal size="xl" delay={0.2}>
              <AssuranceCard
                title="Segmented by Default"
                title_icon={<CloudCheck className="size-12" />}
                description="Only the web gateway is exposed. Every other service sits on a private network, and each outbound path, to model providers or to feeds, is its own explicit route."
                variant="darkblue"
              />
            </Reveal>
          </div>
          <Reveal size="xl" delay={0.15}>
            <div className="mt-4">
              <AssuranceCard
                title="Robust AI Governance and Audit Trails"
                title_icon={<Footprints className="size-12" />}
                description="Every rule outcome, agent version and configuration change is recorded and diffable, giving you evidence designed for audits and internal assurance."
                variant="darkblue"
              />
            </div>
          </Reveal>
        </div>
      </section>
 
      {/* ─── INTEGRATIONS ─────────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section className="py-20 px-8">
          <div className="max-w-6xl mx-auto">
            <div className="text-center mb-12">
              <h2 className="text-3xl md:text-4xl font-black mb-4">
                Integrations & Ecosystem
              </h2>
              <p className="text-gray-500 dark:text-gray-300 text-lg">
                Works with the tools and models you already use.
              </p>
            </div>
            {/* Provider names only — no vendor logos. Naming a provider to
                describe what we connect to is nominative use; reproducing their
                marks in a marketing section implies a partnership none of them
                have granted. Keep this list to providers that are live. */}
            <div className="flex flex-wrap justify-center gap-4">
              {["OpenAI", "Anthropic"].map((provider) => (
                <span
                  key={provider}
                  className="px-8 py-4 rounded-xl text-xl font-bold text-gray-800 dark:text-white"
                  style={{
                    background: "rgba(59,130,246,0.08)",
                    border: "1px solid rgba(59,130,246,0.35)",
                  }}
                >
                  {provider}
                </span>
              ))}
            </div>
            <p className="text-center text-gray-500 dark:text-gray-400 mt-10">
              More providers — including self-hosted open-weight models for
              in-region processing — are on the roadmap.
            </p>
            <p className="text-center text-xs text-gray-400 dark:text-gray-500 mt-6">
              OpenAI and Anthropic are trademarks of their respective owners.
              {" "}
              {APP_NAME} is not affiliated with or endorsed by them.
            </p>
          </div>
        </section>
      </Reveal>
 
      {/* ─── FINAL CTA ────────────────────────────────────────────────────── */}
      <Reveal size="xl">
        <section
          className="py-28 px-8 text-center text-white"
          style={{
            background:
              "linear-gradient(135deg, rgba(2,0,36,1) 0%, rgba(9,9,121,1) 50%, rgba(0,212,255,0.85) 100%)",
          }}
        >
          <h2 className="text-4xl md:text-5xl font-black mb-6">
            Ready to Get Started?
          </h2>
          <p className="text-xl text-blue-100 mb-10 max-w-xl mx-auto leading-relaxed">
            We're onboarding a small group of design partners in regulated
            sectors. Start free, or talk to us about joining them.
          </p>
          <div className="flex flex-col sm:flex-row gap-4 justify-center">
            <a
              href={APP_ROUTES.HOME.signup}
              className="px-10 py-4 rounded-xl font-bold text-lg bg-white text-blue-900"
              style={{ transition: "transform 0.2s" }}
              onMouseEnter={(e) =>
                (e.currentTarget.style.transform = "scale(1.05)")
              }
              onMouseLeave={(e) =>
                (e.currentTarget.style.transform = "scale(1)")
              }
            >
              Start for Free
            </a>
            <a
              href={APP_ROUTES.HOME.contact}
              className="px-10 py-4 rounded-xl font-bold text-lg"
              style={{
                background: "rgba(255,255,255,0.12)",
                border: "1px solid rgba(255,255,255,0.4)",
                color: "white",
                transition: "background 0.2s, transform 0.2s",
              }}
              onMouseEnter={(e) => {
                e.currentTarget.style.background = "rgba(255,255,255,0.22)";
                e.currentTarget.style.transform = "scale(1.03)";
              }}
              onMouseLeave={(e) => {
                e.currentTarget.style.background = "rgba(255,255,255,0.12)";
                e.currentTarget.style.transform = "scale(1)";
              }}
            >
              Talk to Sales
            </a>
          </div>
        </section>
      </Reveal>
    </div>
  );
};
 
export default Home;