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.

7.8 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>
		<script>/* three.ws theme boot: no-flash; runtime in /theme-switcher.js */(function(){try{var m=localStorage.getItem('twx_theme');var l=m==='auto'?(window.matchMedia&&window.matchMedia('(prefers-color-scheme: light)').matches):m==='light';document.documentElement.setAttribute('data-theme',l?'light':'dark');}catch(e){document.documentElement.setAttribute('data-theme','dark');}})();</script>
		<meta charset="utf-8" />
		<title>Earnings · three.ws</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<meta name="theme-color" content="#000000" />
		<meta name="description" content="Everything your agents earn in one ledger: creator fees, skill sales, hires, royalties, invoices and realised trading PnL, each row linked to its Solana transaction, with reinvest rules you confirm." />
		<meta name="robots" content="noindex" />

		<meta property="og:type" content="website" />
		<meta property="og:site_name" content="three.ws" />
		<meta property="og:url" content="https://three.ws/earnings" />
		<meta property="og:title" content="Earnings · three.ws" />
		<meta property="og:description" content="One ledger for everything your agents earn, every row linked to its transaction." />
		<meta property="og:image" content="https://three.ws/api/page-og?s=main&amp;t=Earnings&amp;d=One+ledger+for+everything+your+agents+earn%2C+every+row+linked+to+its+transaction.&amp;p=%2Fearnings" />
		<meta property="og:image:width" content="1200" />
		<meta property="og:image:height" content="630" />
		<meta name="twitter:card" content="summary_large_image" />
		<meta name="twitter:site" content="@trythreews" />
		<link rel="canonical" href="https://three.ws/earnings" />

		<link rel="icon" href="/favicon.ico" sizes="any" />
		<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
		<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
		<link rel="manifest" href="/manifest.webmanifest" />
		<link rel="stylesheet" href="/style.css" />
		<link rel="stylesheet" href="/nav.css" />
		<link rel="stylesheet" href="/footer.css" />
		<link rel="stylesheet" href="/fonts/fonts.css" />
	</head>
	<body>
		<div id="nav-container"></div>

		<main class="ac-wrap">
			<p class="ac-crumb"><a href="/">Home</a> / <a href="/dashboard">Dashboard</a> / Earnings</p>
			<div class="ac-hero">
				<div>
					<h1 class="ac-h1">Earnings</h1>
					<p class="ac-lede">Every way your agents earn, in one ledger. Each row links to its Solana transaction, the totals are reconciled against the chain and the database every hour, and nothing here is estimated except the projection, which says exactly what it is built from.</p>
				</div>
				<button type="button" class="ac-btn" id="er-how">How it is calculated</button>
			</div>

			<div id="er-live" class="ac-sr" aria-live="polite"></div>
			<div id="er-error" class="ac-notice ac-notice-error" role="alert" hidden></div>
			<div id="er-flash" class="ac-notice ac-notice-ok" role="status" hidden></div>

			<div id="er-auth" class="ac-empty" hidden>
				<div class="ac-empty-icon" aria-hidden="true">📒</div>
				<h3>Sign in to see what your agents earned</h3>
				<p>The ledger belongs to the agents you own. Sign in to see it.</p>
				<a class="ac-btn ac-btn-primary" id="er-login" href="/login?next=/earnings">Sign in</a>
			</div>

			<div id="er-skel" aria-hidden="true">
				<div class="er-stats"><div class="er-skel"></div><div class="er-skel"></div><div class="er-skel"></div></div>
				<div class="er-skel" style="height:300px"></div>
			</div>

			<div id="er-main" hidden>
				<div class="er-controls">
					<div class="ac-field">
						<label for="er-agent">Agent</label>
						<select id="er-agent"></select>
					</div>
					<div class="ac-field">
						<label for="er-period">Group by</label>
						<select id="er-period">
							<option value="day">Day</option>
							<option value="week">Week</option>
							<option value="month" selected>Month</option>
						</select>
					</div>
					<div class="er-spacer"></div>
					<div class="er-actions">
						<button type="button" class="ac-btn" id="er-sync">Sync now</button>
						<a class="ac-btn" id="er-csv" href="/api/revenue/export?format=csv" download>Export CSV</a>
						<a class="ac-btn" id="er-json" href="/api/revenue/export?format=json" target="_blank" rel="noopener">Export JSON</a>
					</div>
				</div>

				<dl class="er-stats" id="er-stats"></dl>

				<section class="er-panel" aria-labelledby="er-chart-h">
					<h2 class="ac-h2" id="er-chart-h">Income by source</h2>
					<p class="ac-hint">Revenue only, in USD, stacked by source. Trading PnL is reported separately because it is not revenue and can be negative.</p>
					<div class="er-chart" id="er-chart"></div>
				</section>

				<div class="er-split">
					<section class="er-panel" aria-labelledby="er-src-h">
						<h2 class="ac-h2" id="er-src-h">By source</h2>
						<p class="ac-hint">Lifetime totals in the selected scope, mainnet Solana only.</p>
						<ul class="er-sources" id="er-sources"></ul>
					</section>
					<div>
						<section class="er-panel" aria-labelledby="er-proj-h">
							<h2 class="ac-h2" id="er-proj-h">Projection</h2>
							<div id="er-proj"></div>
						</section>
						<section class="er-panel" aria-labelledby="er-rec-h">
							<h2 class="ac-h2" id="er-rec-h">Reconciliation</h2>
							<div id="er-rec"></div>
						</section>
						<section class="er-panel" aria-labelledby="er-pub-h" id="er-pub-panel" hidden>
							<h2 class="ac-h2" id="er-pub-h">Public earnings page</h2>
							<p class="ac-hint">Show this agent's earnings, with every row linked to its transaction, on a public page anyone can open. Counterparty addresses stay private.</p>
							<label class="er-toggle"><input type="checkbox" id="er-pub" /> <span id="er-pub-label">Public</span></label>
							<p class="ac-hint" id="er-pub-link" hidden></p>
						</section>
					</div>
				</div>

				<section class="er-panel" aria-labelledby="er-led-h">
					<div class="ac-bar">
						<div>
							<h2 class="ac-h2" id="er-led-h">Ledger</h2>
							<p class="ac-hint">Newest first. Every row is one income event copied from the table that owns it.</p>
						</div>
						<div class="ac-field" style="margin:0">
							<label for="er-src-filter" class="ac-sr">Filter by source</label>
							<select id="er-src-filter"><option value="">All sources</option></select>
						</div>
					</div>
					<div class="er-ledger" id="er-ledger"></div>
					<div class="ac-more" id="er-more" hidden><button type="button" class="ac-btn" id="er-more-btn">Load more</button></div>
				</section>

				<section class="er-panel" id="rules" aria-labelledby="er-rules-h">
					<div class="ac-bar">
						<div>
							<h2 class="ac-h2" id="er-rules-h">Reinvest rules</h2>
							<p class="ac-hint">Say what share of each period's income goes where. A rule only runs after you confirm its exact amounts and destinations here, in your browser, and any edit asks again. Every run is capped, idempotent and leaves a receipt.</p>
						</div>
						<button type="button" class="ac-btn ac-btn-primary" id="er-rule-new">New rule</button>
					</div>
					<form class="ac-card ac-form" id="er-rule-form" novalidate hidden></form>
					<div id="er-rules"></div>
				</section>
			</div>
		</main>

		<div class="er-drawer-backdrop" id="er-backdrop" hidden></div>
		<aside class="er-drawer" id="er-drawer" role="dialog" aria-modal="true" aria-labelledby="er-drawer-h" hidden></aside>

		<script type="module" src="/src/earnings-page.js"></script>
		<script src="/nav.js" defer></script>
		<script src="/brand.js" defer></script>
		<div id="footer-container"></div>
		<script src="/footer.js"></script>
		<script type="module" src="/i18n.js"></script>
	</body>
</html>