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 | 1x 1x 2x 2x 2x 2x 2x 2x 3x | import { usePageMeta } from "@/contexts/PageContext";
import { useAuth } from "@/hooks/useAuth";
import { APP_NAME, APP_ROUTES } from "@/routes/const";
import {
CheckCircle2,
Lock,
ShieldCheck,
UserPlus,
Zap,
} from "lucide-react";
import React, { useEffect } from "react";
const FEATURES = [
{
icon: <ShieldCheck className="size-5" />,
label: "Privacy-first by design",
description: "Encrypted in transit and at rest, never used to train models, and only sent to the model provider you choose.",
accent: "#059669",
},
{
icon: <Lock className="size-5" />,
label: "Built for UK & EU data protection",
description: "Designed around UK GDPR and the AI assurance expectations of regulated sectors.",
accent: "#7c3aed",
},
{
icon: <Zap className="size-5" />,
label: "Up and running in minutes",
description: "No infrastructure to manage — start orchestrating agents immediately.",
accent: "#d97706",
},
];
const Signup: React.FC = () => {
usePageMeta("Sign Up", false);
const { isAuthenticated, loading } = useAuth();
useEffect(() => {
if (isAuthenticated) window.location.href = import.meta.env.VITE_APP_DOMAIN;
}, [isAuthenticated]);
const handleSignup = () => {
const returnTo = import.meta.env.VITE_APP_DOMAIN;
window.location.href = `${import.meta.env.VITE_AUTH_DOMAIN}/login?return_to=${encodeURIComponent(returnTo)}&screen_hint=signup`;
};
return (
<div className="min-h-[80vh] flex items-center justify-center px-6 py-20">
<div className="w-full max-w-4xl">
{/* Header */}
<div className="text-center mb-12">
<div
className="inline-flex items-center gap-2 mb-6 px-4 py-1.5 rounded-full text-xs font-semibold tracking-widest uppercase"
style={{
background: "rgba(59,130,246,0.08)",
border: "1px solid rgba(59,130,246,0.25)",
}}
>
<UserPlus className="size-3" />
Create Account
</div>
<h1
className="text-3xl md:text-5xl font-black mb-4 leading-tight"
style={{
background: "linear-gradient(135deg, #1e40af 0%, #3b82f6 55%, #06b6d4 100%)",
WebkitBackgroundClip: "text",
WebkitTextFillColor: "transparent",
backgroundClip: "text",
}}
>
Join {APP_NAME}
</h1>
<p className="text-gray-500">
Quick, easy, private, and secure — get started for free.
</p>
</div>
{isAuthenticated ? (
<div
className="max-w-sm mx-auto flex items-center gap-3 rounded-2xl p-5"
style={{ border: "1px solid rgba(34,197,94,0.3)", background: "rgba(34,197,94,0.06)" }}
>
<CheckCircle2 className="size-5 shrink-0" style={{ color: "#22c55e" }} />
<span className="text-sm font-medium">You already have an account.</span>
</div>
) : (
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-3xl mx-auto">
{/* Feature list */}
<div className="flex flex-col gap-4">
{FEATURES.map((f, i) => (
<div
key={i}
className="flex items-start gap-4 rounded-2xl p-5"
style={{ border: "1px solid rgba(59,130,246,0.14)" }}
>
<div
className="p-2 rounded-xl shrink-0"
style={{ background: `${f.accent}15`, color: f.accent }}
>
{f.icon}
</div>
<div>
<p className="font-bold text-sm mb-0.5">{f.label}</p>
<p className="text-xs text-gray-500 leading-relaxed">{f.description}</p>
</div>
</div>
))}
</div>
{/* Sign up card */}
<div
className="rounded-2xl p-8 flex flex-col gap-6"
style={{
background: "linear-gradient(160deg, #1e3a8a 0%, #1d4ed8 60%, #2563eb 100%)",
boxShadow: "0 20px 60px rgba(37,99,235,0.35)",
}}
>
<div>
<h2 className="text-xl font-black text-white mb-1">Get Started Free</h2>
<p className="text-sm" style={{ color: "rgba(255,255,255,0.65)" }}>
No credit card required.
</p>
</div>
<button
disabled={loading}
onClick={handleSignup}
className="flex items-center justify-center gap-2 w-full rounded-xl font-bold py-3.5 px-5 text-sm"
style={{
background: "white",
color: "#1d4ed8",
border: "none",
cursor: loading ? "not-allowed" : "pointer",
opacity: loading ? 0.6 : 1,
transition: "transform 0.15s",
}}
onMouseEnter={(e) => { if (!loading) e.currentTarget.style.transform = "scale(1.02)"; }}
onMouseLeave={(e) => { e.currentTarget.style.transform = "scale(1)"; }}
>
<UserPlus className="size-4" />
{loading ? "Loading..." : "Create My Account"}
</button>
<p className="text-xs text-center" style={{ color: "rgba(255,255,255,0.45)" }}>
Already have an account?{" "}
<a
href={APP_ROUTES.HOME.login}
className="font-semibold underline"
style={{ color: "rgba(255,255,255,0.75)" }}
>
Sign in
</a>
</p>
<p className="text-xs leading-relaxed" style={{ color: "rgba(255,255,255,0.3)" }}>
By creating an account you agree to our{" "}
<a href={APP_ROUTES.LEGAL.terms_of_service} className="underline" style={{ color: "rgba(255,255,255,0.5)" }}>
Terms of Service
</a>{" "}
and{" "}
<a href={APP_ROUTES.LEGAL.privacy_policy} className="underline" style={{ color: "rgba(255,255,255,0.5)" }}>
Privacy Policy
</a>
.
</p>
</div>
</div>
)}
</div>
</div>
);
};
export default Signup;
|