Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

16.6 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
	<style>/* three.ws hidden-guard — make the `hidden` attribute authoritative; see scripts/lib/hidden-guard.mjs */[hidden]{display:none!important}</style>
	<meta charset="utf-8" />
	<meta name="viewport" content="width=device-width,initial-scale=1" />
	<title data-i18n="aws_marketplace_welcome.meta_title">Welcome to three.ws · AWS Marketplace</title>
	<meta name="robots" content="noindex" />
	<link rel="icon" href="/favicon.ico" />
	<style>
		:root { color-scheme: dark; --accent:#ffffff; --accent2:#cccccc; --border:#222222; --bg:#000000; --panel:#141414; --text:#e8e8f0; --muted:#888888; --green:#22c55e; --yellow:#f59e0b; }
		* { box-sizing: border-box; margin: 0; padding: 0; }
		body { font: 15px/1.6 -apple-system, system-ui, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
		header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
		header a { color: #aaa; text-decoration: none; font-size: 14px; }
		.wrap { max-width: 540px; margin: 0 auto; padding: 72px 24px 96px; width: 100%; }

		.aws-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--border); border-radius: 99px; padding: 6px 14px 6px 10px; font-size: 12px; color: var(--muted); margin-bottom: 28px; }
		.aws-badge svg { flex-shrink: 0; }

		.state { display: none; }
		.state.active { display: block; }

		/* ── loading ── */
		#state-loading { text-align: center; padding-top: 32px; }
		.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin: 0 auto 20px; }
		@keyframes spin { to { transform: rotate(360deg); } }
		#state-loading p { color: var(--muted); font-size: 14px; }

		/* ── shared card styles ── */
		h1 { font-size: clamp(26px, 4vw, 36px); letter-spacing: -0.025em; line-height: 1.1; font-weight: 600; margin-bottom: 12px; }
		.sub { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 32px; }
		.sub strong { color: var(--text); }

		.trial-banner { background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(204,204,204,0.06)); border: 1px solid rgba(255,255,255,0.2); border-radius: 14px; padding: 18px 22px; margin-bottom: 28px; font-size: 14px; line-height: 1.55; }
		.trial-banner strong { color: var(--text); display: block; margin-bottom: 4px; font-size: 15px; }

		/* ── auth form ── */
		.form-group { margin-bottom: 16px; }
		.tos-row { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 4px; font-size: 12.5px; line-height: 1.5; color: var(--muted); cursor: pointer; }
		.tos-row input[type='checkbox'] { width: 15px; height: 15px; margin: 2px 0 0; flex: none; accent-color: var(--accent); cursor: pointer; }
		.tos-row a, .tos-note a { color: var(--text); }
		.tos-note { margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
		label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
		input { width: 100%; padding: 11px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; outline: none; transition: border-color 0.15s; }
		input:focus { border-color: var(--accent); }
		input::placeholder { color: #555555; }

		.tabs { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 11px; overflow: hidden; margin-bottom: 28px; }
		.tab { flex: 1; padding: 10px; background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 500; border: none; cursor: pointer; transition: background 0.15s, color 0.15s; }
		.tab.active { background: var(--accent); color: #fff; }

		.btn { width: 100%; padding: 13px; border-radius: 11px; border: 0; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: filter 0.15s; margin-top: 8px; }
		.btn:hover:not(:disabled) { filter: brightness(1.12); }
		.btn:disabled { opacity: 0.5; cursor: not-allowed; }
		.btn-sec { background: var(--panel); border: 1px solid var(--border); color: var(--text); }

		.divider { text-align: center; color: var(--muted); font-size: 12px; margin: 18px 0; position: relative; }
		.divider::before, .divider::after { content: ""; position: absolute; top: 50%; width: calc(50% - 20px); height: 1px; background: var(--border); }
		.divider::before { left: 0; }
		.divider::after { right: 0; }

		.err { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.35); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--danger, #f87171); margin-bottom: 16px; display: none; }
		.err.visible { display: block; }

		/* ── success ── */
		#state-linked .check { width: 56px; height: 56px; border-radius: 50%; background: rgba(34,197,94,0.12); border: 2px solid var(--green); display: flex; align-items: center; justify-content: center; margin: 0 auto 24px; }
		#state-linked { text-align: center; }
		#state-linked .sub { margin-bottom: 28px; }
		#state-linked .btn { max-width: 260px; margin: 0 auto; display: block; }

		/* ── API key reveal ── */
		.key-panel { text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 0 0 24px; }
		.key-panel-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
		.key-panel-label span { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
		.key-panel-label .copy { background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 12px; padding: 5px 10px; cursor: pointer; transition: background 0.15s, border-color 0.15s; }
		.key-panel-label .copy:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.3); }
		.key-panel-label .copy.copied { color: var(--green); border-color: rgba(34,197,94,0.5); }
		.key-value { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--text); background: var(--bg-0, #0a0a0a); border: 1px solid #1c1c1c; border-radius: 8px; padding: 11px 13px; word-break: break-all; user-select: all; }
		.key-note { font-size: 12px; color: var(--yellow); margin-top: 10px; line-height: 1.5; }
		.usage { text-align: left; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin: 0 0 24px; }
		.usage h3 { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; letter-spacing: 0.04em; text-transform: uppercase; }
		.usage pre { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 12px; color: #cfcfdc; background: var(--bg-0, #0a0a0a); border: 1px solid #1c1c1c; border-radius: 8px; padding: 11px 13px; overflow-x: auto; line-height: 1.55; }
		.usage a { color: var(--text); text-decoration: underline; }
		.linked-actions { display: flex; gap: 10px; max-width: 420px; margin: 0 auto; }
		.linked-actions .btn { margin: 0; flex: 1; }
		.already-issued { background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.3); border-radius: 10px; padding: 11px 13px; font-size: 13px; color: var(--warn, #fbbf24); margin-bottom: 16px; text-align: left; line-height: 1.5; }

		/* ── error state ── */
		#state-error { text-align: center; }
		#state-error .icon { font-size: 40px; margin-bottom: 16px; }
		#state-error .btn { max-width: 260px; margin: 12px auto 0; display: block; }

		.feature-list { list-style: none; margin: 0 0 32px; }
		.feature-list li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid #1c1c1c; font-size: 14px; color: #cfcfdc; }
		.feature-list li:last-child { border-bottom: none; }
		.feature-list li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 2px; }

		@media (max-width: 500px) { .wrap { padding: 48px 16px 72px; } }
	</style>
</head>
<body>
	<header>
		<a href="/" data-i18n="aws_marketplace_welcome.three_ws">← three.ws</a>
	</header>

	<div class="wrap">
		<div class="aws-badge">
			<svg width="18" height="18" viewBox="0 0 24 24" fill="none"><path d="M7.17 8.8c0 .48.05.87.14 1.16.1.29.24.61.44.95.07.11.1.22.1.32 0 .14-.08.28-.26.42l-.85.57c-.12.08-.24.12-.35.12-.14 0-.28-.07-.42-.2a4.3 4.3 0 0 1-.5-.65 11 11 0 0 1-.43-1.02c-1.08 1.27-2.43 1.9-4.06 1.9-1.16 0-2.09-.33-2.77-.99C-2.06 11.72-2.4 10.86-2.4 9.8c0-1.12.4-2.03 1.2-2.72.8-.69 1.86-1.03 3.2-1.03.45 0 .91.04 1.4.11.48.07.98.18 1.5.31V5.5c0-.99-.21-1.68-.62-2.09-.42-.41-1.13-.61-2.14-.61-.46 0-.93.06-1.41.18a10.4 10.4 0 0 0-1.41.47 3.74 3.74 0 0 1-.46.17.8.8 0 0 1-.2.03c-.18 0-.27-.13-.27-.4V2.5c0-.2.02-.35.07-.44.05-.08.15-.17.31-.25.46-.24 1.01-.43 1.65-.59A8.52 8.52 0 0 1 2.2.97C3.6.97 4.64 1.3 5.3 1.96c.65.66.98 1.67.98 3.02V8.8z" fill="#FF9900" transform="translate(8,4) scale(0.85)"/></svg>
			AWS Marketplace
		</div>

		<!-- loading -->
		<div id="state-loading" class="state active">
			<div class="spinner"></div>
			<p data-i18n="aws_marketplace_welcome.setting_up_your_subscription">Setting up your subscription…</p>
		</div>

		<!-- auth: sign up or sign in -->
		<div id="state-auth" class="state">
			<h1 id="auth-heading" data-i18n="aws_marketplace_welcome.you_re_almost_in">You're almost in.</h1>
			<p class="sub" id="auth-sub" data-i18n="aws_marketplace_welcome.create_a_three_ws_account_to_activate">Create a three.ws account to activate your AWS Marketplace subscription.</p>

			<div id="trial-banner-auth" class="trial-banner" style="display:none">
				<strong data-i18n="aws_marketplace_welcome.free_trial_activated">Free trial activated</strong>
				Your AWS Marketplace free trial is confirmed. Create an account to start using three.ws — no payment required during the trial period.
			</div>

			<div class="tabs">
				<button class="tab active" id="tab-signup" type="button" data-i18n="aws_marketplace_welcome.create_account">Create account</button>
				<button class="tab" id="tab-signin" type="button" data-i18n="aws_marketplace_welcome.sign_in">Sign in</button>
			</div>

			<div id="err-auth" class="err"></div>

			<!-- sign-up form -->
			<form id="form-signup" autocomplete="on">
				<div class="form-group">
					<label for="su-email" data-i18n="aws_marketplace_welcome.email">Email</label>
					<input id="su-email" type="email" name="email" placeholder="[email protected]" required autocomplete="email" />
				</div>
				<div class="form-group">
					<label for="su-password" data-i18n="aws_marketplace_welcome.password">Password</label>
					<input id="su-password" type="password" name="password" placeholder="Min. 8 characters" required autocomplete="new-password" />
				</div>
				<label class="tos-row" for="su-tos">
					<input id="su-tos" type="checkbox" required />
					<span data-i18n-html="aws_marketplace_welcome.i_have_read_and_agree_to_the">I have read and agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a>, <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>, and <a href="/legal/aws-marketplace-eula" target="_blank" rel="noopener">AWS Marketplace EULA</a>.</span>
				</label>
				<button class="btn" id="btn-signup" type="submit" data-i18n="aws_marketplace_welcome.create_account_activate">Create account &amp; activate</button>
			</form>

			<!-- sign-in form -->
			<form id="form-signin" autocomplete="on" style="display:none">
				<div class="form-group">
					<label for="si-email" data-i18n="aws_marketplace_welcome.email_2">Email</label>
					<input id="si-email" type="email" name="email" placeholder="[email protected]" required autocomplete="email" />
				</div>
				<div class="form-group">
					<label for="si-password" data-i18n="aws_marketplace_welcome.password_2">Password</label>
					<input id="si-password" type="password" name="password" placeholder="Your password" required autocomplete="current-password" />
				</div>
				<button class="btn" id="btn-signin" type="submit" data-i18n="aws_marketplace_welcome.sign_in_activate">Sign in &amp; activate</button>
				<p class="tos-note" data-i18n-html="aws_marketplace_welcome.by_signing_in_you_agree_to_the">By signing in you agree to the <a href="/legal/tos" target="_blank" rel="noopener">Terms of Service</a> and <a href="/legal/privacy" target="_blank" rel="noopener">Privacy Policy</a>.</p>
			</form>
		</div>

		<!-- already signed in: link -->
		<div id="state-link" class="state">
			<h1 data-i18n="aws_marketplace_welcome.link_your_aws_subscription">Link your AWS subscription.</h1>
			<p class="sub" data-i18n-html="aws_marketplace_welcome.you_re_signed_in_as_confirm_to">You're signed in as <strong id="link-email"></strong>. Confirm to link your AWS Marketplace subscription to this account.</p>

			<div id="trial-banner-link" class="trial-banner" style="display:none">
				<strong data-i18n="aws_marketplace_welcome.free_trial_activated_2">Free trial activated</strong>
				Your AWS Marketplace free trial is confirmed. Linking will activate it on your account — no additional payment during the trial.
			</div>

			<ul class="feature-list">
				<li data-i18n="aws_marketplace_welcome.usage_billed_directly_to_your_aws_account">Usage billed directly to your AWS account</li>
				<li data-i18n="aws_marketplace_welcome.eligible_for_aws_credits_and_edp_commitments">Eligible for AWS credits and EDP commitments</li>
				<li data-i18n="aws_marketplace_welcome.consolidated_billing_under_aws_marketplace_s">Consolidated billing under AWS Marketplace Software</li>
			</ul>

			<div id="err-link" class="err"></div>
			<button class="btn" id="btn-link" type="button" data-i18n="aws_marketplace_welcome.confirm_activate">Confirm &amp; activate</button>
		</div>

		<!-- success -->
		<div id="state-linked" class="state">
			<div class="check">
				<svg width="24" height="24" viewBox="0 0 24 24" fill="none"><path d="M5 13l4 4L19 7" stroke="#22c55e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
			</div>
			<h1 data-i18n="aws_marketplace_welcome.subscription_activated">Subscription activated.</h1>
			<p class="sub" id="linked-sub" data-i18n="aws_marketplace_welcome.your_aws_marketplace_subscription_is_linked">Your AWS Marketplace subscription is linked to your three.ws account. Use the API key below to call any x402 endpoint — no on-chain payment required.</p>

			<div id="already-issued-note" class="already-issued" style="display:none">
				Your API key was issued during a previous activation. For security we don't store the plaintext — manage and rotate it from <a href="/billing/keys" style="color:inherit;text-decoration:underline" data-i18n="aws_marketplace_welcome.api_keys">API keys</a>.
			</div>

			<div id="key-panel" class="key-panel" style="display:none">
				<div class="key-panel-label">
					<span data-i18n="aws_marketplace_welcome.your_api_key">Your API key</span>
					<button type="button" class="copy" id="btn-copy-key" data-i18n="aws_marketplace_welcome.copy">Copy</button>
				</div>
				<div class="key-value" id="key-value"></div>
				<div class="key-note">Store this somewhere safe — it's shown once and grants every paid call on your AWS subscription. You can rotate it any time from <a href="/billing/keys" style="color:inherit;text-decoration:underline" data-i18n="aws_marketplace_welcome.api_keys_2">API keys</a>.</div>
			</div>

			<div class="usage">
				<h3 data-i18n="aws_marketplace_welcome.use_it">Use it</h3>
<pre>curl https://three.ws/api/x402/agent-reputation?agent_id=&lt;uuid&gt; \
  -H "x-api-key: x402_live_…"</pre>
			</div>

			<div class="linked-actions">
				<a href="/billing/keys" class="btn btn-sec" data-i18n="aws_marketplace_welcome.manage_keys">Manage keys</a>
				<a href="/dashboard" class="btn" data-i18n="aws_marketplace_welcome.dashboard">Dashboard</a>
			</div>
		</div>

		<!-- error -->
		<div id="state-error" class="state">
			<div class="icon">⚠</div>
			<h1 id="err-heading" data-i18n="aws_marketplace_welcome.something_went_wrong">Something went wrong.</h1>
			<p class="sub" id="err-body" data-i18n="aws_marketplace_welcome.we_couldn_t_complete_your_aws_marketplace">We couldn't complete your AWS Marketplace subscription setup.</p>
			<a href="https://github.com/nirholas/three.ws/issues" class="btn btn-sec" target="_blank" rel="noopener" data-i18n="aws_marketplace_welcome.contact_support">Contact support</a>
		</div>
	</div>

	<script type="module" src="/src/aws-marketplace-welcome.js"></script>
	<script src="/brand.js" defer></script>
	<!-- Runtime i18n: detects locale, swaps annotated copy, mounts <lang-switcher>. -->
	<script type="module" src="/i18n.js"></script>
</body>
</html>