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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat: creator portfolio — aggregate forged models + worlds onto /u/:username
fudjia2cf40ef8847d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 47bbe417d..69bb89544 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -8,6 +8,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **Docs · The autonomous economy** (`/docs/autonomous-economy`) — How the three.ws on-chain treasury funds itself and where every dollar flows: the funding-root and engine wallets, the topup/sweepback loop, the allowlist- and destination-locks that keep money inside platform-owned wallets, and the two leak scanners that audit every signer wallet on-chain every minute — plus how to verify there's no leak yourself.- **Robinhood Chain** (`/markets/robinhood`) — The 24/7 tokenized-equity board for Robinhood Chain (4663): live Chainlink NAV vs DEX premium for every Stock Token, a memecoin screener across NOXA and The Odyssey launchpads, recent launches, and chain TVL — plus a real wallet-connect buy flow for its coins.+- **Your creator portfolio** (`/profile`) — Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.- **Agent discovery fixed: six paid endpoints were invisible to x402 scanners** — The machine-readable catalog at /openapi.json — what AI agents and x402 scanners like x402scan and AgentCash read to find and pay for three.ws APIs — had six paid endpoints (agent bouncer, verifiable vanity keys, crypto intel, cosmetic purchase, animation download, club cover) accidentally buried inside another entry, making them undiscoverable. All 61 payable routes now list correctly and the document passes the AgentCash discovery validator. The Permit2 gasless-payment demo is now only advertised when its settlement lane is actually live, so agents are never quoted a payment path that can't settle. (`/openapi.json`) `[fix, improvement]`- **Agent profiles, redesigned** — Agent profile pages got a ground-up redesign. Instead of one endless column of cards, everything is now organized into clear sections — Overview, Capabilities, Economy, Activity, Trust & Identity, Reviews, and Developers — with a sticky navigation bar that follows you as you scroll and hides sections that have nothing to show. The hero is a compact identity band with the live 3D avatar beside the agent's name, description, and actions, and secondary view modes now live in a tidy menu instead of a wall of buttons. Pages are roughly 40% shorter and much easier to scan. Prefer the old look? Every profile keeps a “Classic layout” link that serves the previous design unchanged. The companion panels (live presence, stages, work-for-hire, alpha co-pilot) now sit in a compact strip beside the profile instead of stacking above it — on mobile the agent's name and avatar are the first thing you see — and the live watch view (screen, avatar cam, action log) has a proper home in the Activity section. Signed-out visitors get a clear “sign in to see the action log” state instead of an endless loading spinner, and stats with nothing to report simply don't render. (`/agents`) `[improvement, feature]`- **AI features can no longer go down when one provider does** — Every AI-powered feature on three.ws (fact checks, agent chat, persona extraction, scene composing) routes through one shared brain that tries free providers first and falls back automatically. That chain just got much deeper: Groq now has a second lane with its own separate quota, OpenRouter gets a zero-credit free lane so an empty account no longer kills it, optional Cerebras and Google AI Studio lanes activate the moment a key is added, and — the anchor — Gemini on the platform's own Google Cloud now backs the whole chain with no third-party quota to exhaust. Previously a rare bad hour where every free tier was exhausted at once could surface an error; now the request rides through. The fact-checker was also corrected to stop favoring a paid key ahead of the free lanes. (`/changelog`) `[improvement, fix, infra]`@@ -33,6 +34,7 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr- **The x402 catalog jumps to thousands of discoverable data endpoints** — The machine-readable discovery document at /.well-known/x402.json now advertises roughly 3,400 individual paid data endpoints, up from about 180 — every one a concrete, priced URL that agent directories (x402scan, the Coinbase Bazaar, 402index) can index directly. Each of the top coins, every chain, and the top protocols, stablecoins, yield pools, and exchanges now lists its own datapoints (price, TVL, APY, peg deviation, supply, volume, and more) as standalone $0.0005 endpoints. The underlying datapoint fabric already served the full ~480,000-endpoint space; this makes a broad, high-value slice of it findable without guessing. The listing is memoized so the larger document still renders in milliseconds, and every entry passed the strict indexer-validation check with zero warnings. (`/docs/market-data-api`) `[feature, improvement]`- **Widget knowledge ingestion now requires HTTPS in production** — When you point a widget's knowledge base at a web page, the platform fetches that page and reads its text into the widget. In production it now refuses plain, unencrypted http:// links and requires https:// — a cleartext fetch can be tampered with in transit, and that tampered content would land in your knowledge base. Encrypted https:// links work exactly as before, and the existing block on private, loopback, and cloud-metadata addresses is unchanged. Local http:// links still work in development. `[security]`- **x402 registration probes now always get a real payment challenge** — Payment directories like x402scan verify an endpoint by poking it without paying and expecting the HTTP 402 payment challenge back. A July registration run rejected 33 three.ws endpoints because probes were answered with the wrong thing: method or input mistakes returned plain errors before the challenge, and per-item priced endpoints (asset downloads, marketplace skills, fact checks) demanded a valid item id before quoting a price. Now any credential-less request on a paid route receives the full 402 challenge — wrong method, missing id, or empty body included — while real paying callers keep strict validation before any money moves. The free crypto-data endpoints under /api/v1/x are now correctly advertised as free in /openapi.json instead of failing paid-endpoint probes, so agents see them for what they are: no-signup data with a pay-as-you-go overflow lane. (`/openapi.json`) `[fix, improvement]`+- **Your creator portfolio: every forged model and world, in one place** — Your profile at /u/:username (or just /profile for your own) now has a Creations tab that pulls together everything you've made on three.ws: forged 3D models, saved worlds from Scene Studio, avatars, agents, and coins — each card a real, live, spinning 3D thumbnail linking straight to the model or world. Forging a model or saving a world while signed in now credits it to your account automatically; do it signed out and it stays anonymous like always. Diorama viewers and forge result pages now show "by @you" with a link back to your profile when a creation has a known creator, and prolific creators get a Load more button instead of a wall of cards. (`/profile`) `[feature]`- **Your Premium API keys and purchase history are now wallet-gated** — The Data API console reads your pass status from an endpoint that also returns your API key inventory (names, prefixes, rate limits, usage counts) and full purchase history. Because wallet addresses are public, that private data is now released only after you prove control of the wallet with a one-time signature — the same protection already used for x402 payment receipts. Anyone querying a wallet without that signature sees only whether a pass is active, never the keys or history. In the console, an active pass shows a 'Verify to manage keys' step; one signature (reused for a few minutes) unlocks the key panel. Plaintext keys were never exposed, and nothing about buying or renewing a pass changes. (`/dashboard/data-api`) `[security]`- **Your session token no longer reaches the analytics provider** — The analytics proxy that forwards page events to PostHog was passing along your browser's full set of request headers — including the login session cookie and any authorization token — to that third-party host on every event. It now strips the app's own session and CSRF cookies and the authorization header before forwarding, and lets only PostHog's own cookies through. Analytics keep working exactly as before; your credentials stay on three.ws. `[security]`diff --git a/STRUCTURE.md b/STRUCTURE.mdindex f0c0e12d9..7231a2f6d 100644--- a/STRUCTURE.md+++ b/STRUCTURE.md@@ -24,6 +24,7 @@ bottom.| Avatar builder (full app) | [character-studio/](character-studio) | Fork of [m3-org/CharacterStudio](https://github.com/M3-org/CharacterStudio), MIT, see [character-studio/LICENSE](character-studio/LICENSE) | Web-first character creator || Scene Studio (3D scene editor) | [src/scene-studio/](src/scene-studio) `→ /scene` | Vendored [mrdoob/three.js](https://github.com/mrdoob/three.js) r184 editor, MIT, see [src/scene-studio/vendor/README.md](src/scene-studio/vendor/README.md) | Import GLBs, compose scenes, edit materials/lights, export || Diorama (text → 3D world) | [src/diorama/](src/diorama) `→ /diorama` | In-repo · backend [api/diorama.js](api/diorama.js) | One sentence → an explorable 3D diorama: Claude composes the scene, each object is forged to a real GLB, assembled live, saved to a public gallery + shareable permalink |+| Creator portfolio (human profile) | [pages/profile.html](pages/profile.html) `→ /u/:username` (self-view `/profile`), backend [api/users/[username].js](api/users/%5Busername%5D.js) + paginated [api/users/[username]/creations.js](api/users/%5Busername%5D/creations.js) `→ /api/users/:username/creations` | Live | Every three.ws user's public portfolio: avatars, agents, widgets, skills, plugins, coins, memories, items for sale, and (added 2026-07-12) a **Creations** tab merging forged 3D models + Scene Studio worlds — real, live, spinning `<model-viewer>` cards, cursor-paginated for 100+ items. `/forge` and `/diorama` stay anonymous by default (no login required); a signed-in creator's `user_id` is now attached to `forge_creations`/`dioramas` rows at generation/save time (migration [api/_lib/migrations/20260712010000_creator_portfolio_user_ids.sql](api/_lib/migrations/20260712010000_creator_portfolio_user_ids.sql)) so those creations surface here. The same opt-in attribution now links back from the diorama viewer HUD, the diorama gallery cards, and the forge result bar ("by @user") whenever a creation's creator is known. `/@:handle` ([pages/handle.html](pages/handle.html)) is a separate, narrower agent-embed page — not the human portfolio. || Labs (hidden-gems hub) | [pages/labs.html](pages/labs.html) + [src/labs.js](src/labs.js) `→ /labs` | In-repo | Data-driven discovery hub: renders every `data/pages.json` entry flagged `showcase: true` as a live card (status check + iframe preview), filterable by category || OKX.AI marketplace services | [api/okx/3d/[service].js](api/okx/3d/%5Bservice%5D.js) `→ /api/okx/3d/*` | Live | 3D services sold to other agents on OKX.AI (agent #2632): Agent Identity Studio flagship + decomposed studio services. Catalog source of truth: [api/_lib/okx-catalog.js](api/_lib/okx-catalog.js); pipeline: [api/_okx3d/](api/_okx3d); showcase: [pages/agent-identities.html](pages/agent-identities.html) `→ /agent-identities`; docs: [docs/okx-marketplace.md](docs/okx-marketplace.md) || Crypto Data API docs / landing | [pages/crypto.html](pages/crypto.html) `→ /crypto` | In-repo · docs surface | Screenshot-worthy public docs + funnel-top for the free, keyless Crypto Data API (`/api/crypto/*` — token snapshot, security, holders, launches, bonding, whales, symbol, wallet, trending). Renders hero, endpoint table, tabbed quickstart (curl/JS/Python), per-endpoint request/response reference and a live "Try it" console. Probes production at runtime and marks each endpoint Live vs Coming soon (degrades gracefully while sibling endpoints roll out). CTAs funnel to paid uniques: [/launcher](pages/launcher.html), [/vanity-wallet](public/vanity-wallet.html), [/forge](pages/forge.html). Spec: [prompts/x402-overhaul/](prompts/x402-overhaul) |diff --git a/api/_lib/diorama-store.js b/api/_lib/diorama-store.jsindex e78582a16..0ecb4389f 100644--- a/api/_lib/diorama-store.js+++ b/api/_lib/diorama-store.js@@ -56,7 +56,7 @@ async function ensureTable() {* Persist a fully-forged diorama. Accepts an untrusted plan, normalizes it, and* writes one row. Returns { id, createdAt } or null when storage is unavailable.*/-export async function saveDiorama({ diorama, clientKey = null }) {+export async function saveDiorama({ diorama, clientKey = null, userId = null }) {if (!(await ensureTable())) return null;const { ok, diorama: clean, errors } = normalizeDiorama(diorama);if (!ok) {@@ -69,11 +69,11 @@ export async function saveDiorama({ diorama, clientKey = null }) {const doc = { ...clean, id, createdAt, views: 0, featured: false };try {await sql`- insert into dioramas (id, title, prompt, mood, ground, doc, author, client_key, views, featured, created_at)+ insert into dioramas (id, title, prompt, mood, ground, doc, author, client_key, user_id, views, featured, created_at)values (${id}, ${doc.title}, ${doc.prompt}, ${doc.mood}, ${doc.ground},${JSON.stringify(doc)}::jsonb, ${doc.author ? JSON.stringify(doc.author) : null}::jsonb,- ${clientKey}, 0, false, ${createdAt}+ ${clientKey}, ${userId}, 0, false, ${createdAt})`;return { id, createdAt };@@ -83,15 +83,83 @@ export async function saveDiorama({ diorama, clientKey = null }) {}}+/**+ * A signed-in creator's saved worlds — powers the "Worlds" tab on their+ * public portfolio (/u/:username). Scoped to user_id, not client_key, so it+ * only surfaces dioramas saved while logged in. Cursor pagination by+ * created_at mirrors listCreationsByUser (forge-store.js) so the profile's+ * combined Creations feed can page through both types together.+ */+export async function listDioramasByUser({ userId, limit = 24, before } = {}) {+ if (!userId || !(await ensureTable())) return [];+ const lim = Math.min(60, Math.max(1, Number(limit) || 24));+ try {+ const rows = before+ ? await sql`+ select id, title, prompt, mood, ground, views, created_at,+ doc->'objects' as objects, doc->'palette' as palette+ from dioramas+ where user_id = ${userId} and created_at < ${before}+ order by created_at desc limit ${lim}`+ : await sql`+ select id, title, prompt, mood, ground, views, created_at,+ doc->'objects' as objects, doc->'palette' as palette+ from dioramas+ where user_id = ${userId}+ order by created_at desc limit ${lim}`;+ return rows.map((row) => {+ const objects = Array.isArray(row.objects) ? row.objects : [];+ return {+ id: row.id,+ type: 'world',+ title: row.title,+ prompt: row.prompt,+ mood: row.mood,+ ground: row.ground,+ palette: row.palette || null,+ thumbnailGlb: objects.find((o) => o && o.glbUrl)?.glbUrl || null,+ objectCount: objects.length,+ views: Number(row.views) || 0,+ createdAt: row.created_at instanceof Date ? row.created_at.toISOString() : row.created_at,+ };+ });+ } catch (err) {+ console.error('[diorama-store] listDioramasByUser failed:', err?.message);+ return [];+ }+}++/** Count of a signed-in creator's saved worlds — cheap stat-strip number. */+export async function countDioramasByUser({ userId } = {}) {+ if (!userId || !(await ensureTable())) return 0;+ try {+ const [row] = await sql`select count(*)::int as n from dioramas where user_id = ${userId}`;+ return row?.n ?? 0;+ } catch (err) {+ console.error('[diorama-store] countDioramasByUser failed:', err?.message);+ return 0;+ }+}+/** Fetch one diorama by id (the full plan). Returns the diorama or null. */export async function getDiorama(id) {if (!id || !(await ensureTable())) return null;try {- const rows = await sql`select doc, views from dioramas where id = ${id} limit 1`;+ const rows = await sql`+ select d.doc, d.views, u.username as creator_username+ from dioramas d+ left join users u on u.id = d.user_id and u.deleted_at is null+ where d.id = ${id}+ limit 1+ `;if (!rows[0]) return null;const doc = rows[0].doc;doc.views = Number(rows[0].views) || doc.views || 0;- return normalizeDiorama(doc).diorama;+ const diorama = normalizeDiorama(doc).diorama;+ // Real, opt-in attribution only: a creator link appears when the world was+ // saved by a signed-in user, never invented from the free-text author field.+ diorama.creatorUsername = rows[0].creator_username || null;+ return diorama;} catch (err) {console.error('[diorama-store] getDiorama failed:', err?.message);return null;@@ -119,15 +187,20 @@ export async function listDioramas({ scope = 'recent', limit = 24 } = {}) {const rows =scope === 'featured'? await sql`- select id, title, prompt, mood, ground, views, featured, created_at,- doc->'objects' as objects, doc->'palette' as palette, doc->'author' as author- from dioramas where featured = true- order by created_at desc limit ${lim}`+ select d.id, d.title, d.prompt, d.mood, d.ground, d.views, d.featured, d.created_at,+ d.doc->'objects' as objects, d.doc->'palette' as palette, d.doc->'author' as author,+ u.username as creator_username+ from dioramas d+ left join users u on u.id = d.user_id and u.deleted_at is null+ where d.featured = true+ order by d.created_at desc limit ${lim}`: await sql`- select id, title, prompt, mood, ground, views, featured, created_at,- doc->'objects' as objects, doc->'palette' as palette, doc->'author' as author- from dioramas- order by created_at desc limit ${lim}`;+ select d.id, d.title, d.prompt, d.mood, d.ground, d.views, d.featured, d.created_at,+ d.doc->'objects' as objects, d.doc->'palette' as palette, d.doc->'author' as author,+ u.username as creator_username+ from dioramas d+ left join users u on u.id = d.user_id and u.deleted_at is null+ order by d.created_at desc limit ${lim}`;return rows.map(toCard);} catch (err) {console.error('[diorama-store] listDioramas failed:', err?.message);@@ -149,6 +222,7 @@ function toCard(row) {ground: row.ground,palette: row.palette || null,author: row.author || null,+ creatorUsername: row.creator_username || null,thumbnailGlb: thumb,objectCount: objects.length,views: Number(row.views) || 0,diff --git a/api/_lib/forge-store.js b/api/_lib/forge-store.jsindex 1344fe4a5..ea664fe6e 100644--- a/api/_lib/forge-store.js+++ b/api/_lib/forge-store.js@@ -84,6 +84,7 @@ export async function createCreation({tier,path,modelCategory,+ userId,}) {if (!forgeStoreEnabled()) return null;const id = randomUUID();@@ -93,13 +94,13 @@ export async function createCreation({insert into forge_creations(id, client_key, ip_hash, prompt, aspect, preview_image_url,replicate_job_id, text_to_image_model, views_requested, views_used,- multiview, backend, tier, path, status, outcome, model_category)+ multiview, backend, tier, path, status, outcome, model_category, user_id)values(${id}, ${clientKey}, ${ipHash ?? null}, ${prompt}, ${aspect ?? null},${previewImageUrl ?? null}, ${replicateJobId ?? null},${textToImageModel ?? null}, ${viewsRequested ?? null}, ${viewsUsed ?? null},${typeof multiview === 'boolean' ? multiview : null}, ${backend ?? null},- ${tier ?? null}, ${path ?? null}, 'generating', 'generated', ${category})+ ${tier ?? null}, ${path ?? null}, 'generating', 'generated', ${category}, ${userId ?? null})`;// Funnel start — counts attempts so the health rollup can show how many// generations began vs. completed. Best-effort; never blocks the insert.@@ -460,10 +461,12 @@ export async function getPublicCreation({ id }) {if (!forgeStoreEnabled() || !id) return null;try {const rows = await sql`- select id, prompt, aspect, glb_url, preview_image_url, outcome,- views_used, multiview, backend, tier, path, model_category, created_at- from forge_creations- where id = ${id} and status = 'done' and glb_url is not null+ select fc.id, fc.prompt, fc.aspect, fc.glb_url, fc.preview_image_url, fc.outcome,+ fc.views_used, fc.multiview, fc.backend, fc.tier, fc.path, fc.model_category, fc.created_at,+ u.username as creator_username+ from forge_creations fc+ left join users u on u.id = fc.user_id and u.deleted_at is null+ where fc.id = ${id} and fc.status = 'done' and fc.glb_url is not nulllimit 1`;const r = rows[0];@@ -482,6 +485,9 @@ export async function getPublicCreation({ id }) {path: r.path ?? null,model_category: r.model_category ?? 'other',created_at: r.created_at,+ // Real, opt-in attribution only — set when the model was forged while+ // signed in. Never invented for anonymous generations.+ creatorUsername: r.creator_username || null,};} catch (err) {console.error('[forge-store] getPublicCreation failed:', err?.message);@@ -606,6 +612,70 @@ export async function listCreations({ clientKey, limit = 24 }) {}}+// A signed-in creator's finished, durably-stored models — powers the+// "Models" tab on their public portfolio (/u/:username). Scoped to user_id,+// not client_key, so it only ever surfaces creations made while logged in;+// anonymous forges (the majority) never attach to any profile. Cursor+// pagination by created_at mirrors listRemixable so the profile's "load+// more" can page through a prolific creator's full history.+export async function listCreationsByUser({ userId, limit = 24, before } = {}) {+ if (!forgeStoreEnabled() || !userId) return [];+ const capped = Math.min(Math.max(Number(limit) || 24, 1), 60);+ try {+ const rows = before+ ? await sql`+ select id, prompt, glb_url, preview_image_url, model_category,+ parent_creation_id, remixable, created_at+ from forge_creations+ where user_id = ${userId} and status = 'done' and glb_url is not null+ and created_at < ${before}+ order by created_at desc+ limit ${capped}+ `+ : await sql`+ select id, prompt, glb_url, preview_image_url, model_category,+ parent_creation_id, remixable, created_at+ from forge_creations+ where user_id = ${userId} and status = 'done' and glb_url is not null+ order by created_at desc+ limit ${capped}+ `;+ return rows.map((r) => ({+ id: r.id,+ type: 'model',+ prompt: r.prompt,+ glbUrl: r.glb_url,+ previewImageUrl: r.preview_image_url,+ category: r.model_category ?? 'other',+ isRemix: Boolean(r.parent_creation_id),+ remixable: Boolean(r.remixable),+ createdAt: r.created_at,+ }));+ } catch (err) {+ if (isDbUnavailableError(err)) console.warn('[forge-store] listCreationsByUser skipped (db unavailable):', err?.message);+ else console.error('[forge-store] listCreationsByUser failed:', err?.message);+ return [];+ }+}++// Count of a signed-in creator's finished, stored models — cheap stat-strip+// number, separate from the paginated list above.+export async function countCreationsByUser({ userId } = {}) {+ if (!forgeStoreEnabled() || !userId) return 0;+ try {+ const [row] = await sql`+ select count(*)::int as n+ from forge_creations+ where user_id = ${userId} and status = 'done' and glb_url is not null+ `;+ return row?.n ?? 0;+ } catch (err) {+ if (isDbUnavailableError(err)) console.warn('[forge-store] countCreationsByUser skipped (db unavailable):', err?.message);+ else console.error('[forge-store] countCreationsByUser failed:', err?.message);+ return 0;+ }+}+// Newest durable creations across ALL clients — powers the public "Fresh from// the Forge" showcase on /forge. Same public-artifact bar as the share flow// (getPublicCreation): finished rows with a stored GLB only. Rows the creatordiff --git a/api/_lib/migrations/20260712010000_creator_portfolio_user_ids.sql b/api/_lib/migrations/20260712010000_creator_portfolio_user_ids.sqlnew file mode 100644index 000000000..de620e3e3--- /dev/null+++ b/api/_lib/migrations/20260712010000_creator_portfolio_user_ids.sql@@ -0,0 +1,40 @@+begin;++-- Creator profile / portfolio (prompts/user-value/01-creator-profile.md)+-- ========================================================================+-- forge_creations and dioramas are both anonymous-by-design (scoped to a+-- hashed browser client_key, not a login) so /forge and /diorama keep+-- working with no account. When a caller IS signed in, we now also record+-- their user_id — best-effort, never required — so a logged-in creator's+-- forged 3D models and dioramas/worlds can be aggregated onto their public+-- portfolio at /u/:username alongside their avatars, agents, and coins.+--+-- Anonymous creations (user_id null) are simply never surfaced on any+-- profile — there is no user to attribute them to, and that's correct+-- behavior, not a bug.++alter table forge_creations+ add column if not exists user_id uuid references users(id) on delete set null;++alter table dioramas+ add column if not exists user_id uuid references users(id) on delete set null;++-- Power "this user's finished, stored models" — the profile Creations tab.+create index if not exists forge_creations_user_done+ on forge_creations (user_id, created_at desc)+ where user_id is not null and status = 'done' and glb_url is not null;++-- Power "this user's saved worlds" — same tab, other creation type.+create index if not exists dioramas_user_created+ on dioramas (user_id, created_at desc)+ where user_id is not null;++comment on column forge_creations.user_id is+ 'The signed-in user who created this, when the /forge call carried a '+ 'session cookie. NULL for anonymous generations (the default, and still '+ 'the majority of rows) — never required, never backfilled.';+comment on column dioramas.user_id is+ 'The signed-in user who saved this diorama/world, when the /diorama save '+ 'call carried a session cookie. NULL for anonymous saves.';++commit;diff --git a/api/diorama.js b/api/diorama.jsindex 6ea102e5f..1e5093f29 100644--- a/api/diorama.js+++ b/api/diorama.js@@ -32,6 +32,7 @@ import { cors, json, method, readJson, wrap, rateLimited } from './_lib/http.js'import { limits, clientIp } from './_lib/rate-limit.js';import { llmComplete, llmConfigured } from './_lib/llm.js';import { saveDiorama, getDiorama, listDioramas, bumpViews, dioramaStoreEnabled } from './_lib/diorama-store.js';+import { getSessionUser } from './_lib/auth.js';import {exportDioramaGlb,dioramaExportStoreEnabled,@@ -204,11 +205,22 @@ async function handleSave(req, res, body) {if (!saveRl.success) {return rateLimited(res, saveRl, 'Saving too fast. Try again in a moment.');}+ // Anonymous-first (no login required to save/share a world) — but when the+ // caller carries a session cookie, attach their user_id so the world+ // surfaces on their public portfolio (/u/:username → "Worlds" tab), and+ // default the in-scene author credit to their real handle if the client+ // didn't already set one.+ const sessionUser = await getSessionUser(req).catch(() => null);+ const diorama = sessionUser?.username && !body.diorama?.author?.handle+ ? { ...body.diorama, author: { ...(body.diorama?.author || {}), handle: sessionUser.username } }+ : body.diorama;+let saved;try {saved = await saveDiorama({- diorama: body.diorama,+ diorama,clientKey: typeof body.clientKey === 'string' ? body.clientKey.slice(0, 128) : null,+ userId: sessionUser?.id ?? null,});} catch (err) {if (err?.code === 'invalid_diorama') {diff --git a/api/forge.js b/api/forge.jsindex fad186a8e..bb72c5177 100644--- a/api/forge.js+++ b/api/forge.js@@ -88,6 +88,7 @@ import {markFailed,findByJob,} from './_lib/forge-store.js';+import { getSessionUser } from './_lib/auth.js';import { constantTimeEquals } from './_lib/crypto.js';import {forgeRequestHash,@@ -107,7 +108,6 @@ import {redeemForgePayment,releaseForgePayment,} from './_lib/forge-high-payment.js';-import { getSessionUser } from './_lib/auth.js';import {chargeCreditsForAction,quoteCreditsForAction,@@ -229,6 +229,23 @@ function clientKeyFrom(req) {return hashClient(Array.isArray(raw) ? raw[0] : raw);}+// /forge is auth-free and the overwhelming majority of calls are anonymous —+// but when a caller DOES carry a session cookie (the browser /create/studio+// flow while logged in), attach their user_id to the durable creation so it+// surfaces on their public portfolio (/u/:username → "Models" tab). Resolved+// at most once per request; failures (no db, bad cookie) degrade to null,+// never block generation.+async function sessionUserIdFromReq(req) {+ if (Object.prototype.hasOwnProperty.call(req, '__twxSessionUserId')) return req.__twxSessionUserId;+ try {+ const user = await getSessionUser(req);+ req.__twxSessionUserId = user?.id ?? null;+ } catch {+ req.__twxSessionUserId = null;+ }+ return req.__twxSessionUserId;+}+// Resolve the requested generation path + quality tier from the body, falling// back to the existing fast defaults (image-intermediate, standard tier).function parsePath(body) {@@ -353,6 +370,7 @@ async function runNvidiaTextLane({ req, res, ip, prompt, aspect, tier, path, optconst syntheticJob = randomUUID().replace(/-/g, '');const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt,aspect,@@ -369,6 +387,7 @@ async function runNvidiaTextLane({ req, res, ip, prompt, aspect, tier, path, optlet durable = await materializeCreation({replicateJobId: syntheticJob,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: submitted.resultGlbUrl,quality: true,compress: opts?.compression && opts.compression !== 'none' ? opts.compression : null,@@ -388,6 +407,7 @@ async function runNvidiaTextLane({ req, res, ip, prompt, aspect, tier, path, optconst retryJob = randomUUID().replace(/-/g, '');await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt,aspect,@@ -404,6 +424,7 @@ async function runNvidiaTextLane({ req, res, ip, prompt, aspect, tier, path, optconst retryDurable = await materializeCreation({replicateJobId: retryJob,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: retry.resultGlbUrl,quality: true,compress: opts?.compression && opts.compression !== 'none' ? opts.compression : null,@@ -452,6 +473,7 @@ async function runNvidiaTextLane({ req, res, ip, prompt, aspect, tier, path, opt});const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt,aspect,@@ -574,6 +596,7 @@ async function runHfImageLane({const syntheticJob = randomUUID().replace(/-/g, '');const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect,@@ -593,6 +616,7 @@ async function runHfImageLane({let durable = await materializeCreation({replicateJobId: syntheticJob,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: resultGlbUrl,quality: true,compress: wantCompress,@@ -617,6 +641,7 @@ async function runHfImageLane({const retryJob = randomUUID().replace(/-/g, '');await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect,@@ -633,6 +658,7 @@ async function runHfImageLane({const retryDurable = await materializeCreation({replicateJobId: retryJob,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: retryFinished.resultGlbUrl,quality: true,compress: wantCompress,@@ -1177,6 +1203,7 @@ async function startJob(req, res) {const token = encodeJobToken({ provider: 'gcp', kind: null, taskId: job.extJobId });const creationId = await createCreation({clientKey: clientKeyFrom(req),+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt,aspect: null,@@ -1263,6 +1290,7 @@ async function startJob(req, res) {const syntheticJob = randomUUID().replace(/-/g, '');const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect: isImageMode ? null : aspect,@@ -1279,6 +1307,7 @@ async function startJob(req, res) {const durable = await materializeCreation({replicateJobId: syntheticJob,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: submitted.resultGlbUrl,quality: true,compress: opts.compression !== 'none' ? opts.compression : null,@@ -1315,6 +1344,7 @@ async function startJob(req, res) {// resolve it on poll, exactly like the Replicate path.const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect: isImageMode ? null : aspect,@@ -1577,6 +1607,7 @@ async function startJob(req, res) {const clientKey = clientKeyFrom(req);const creationId = await createCreation({clientKey,+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect: isImageMode ? null : aspect,@@ -1875,6 +1906,7 @@ async function startJob(req, res) {// store just means no durable copy + no gallery entry for this run.const creationId = await createCreation({clientKey: clientKeyFrom(req),+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: prompt || (isImageMode ? 'image-to-3d' : ''),aspect,@@ -2121,6 +2153,7 @@ async function startRigJob(req, res) {: job.extJobId;const creationId = await createCreation({clientKey: clientKeyFrom(req),+ userId: await sessionUserIdFromReq(req),ipHash: hashIp(ip),prompt: 'auto-rig',aspect: null,@@ -2285,6 +2318,7 @@ async function pollJob(req, res, jobId) {const durable = await materializeCreation({replicateJobId: upstreamId,clientKey,+ userId: await sessionUserIdFromReq(req),glbUrl: result.resultGlbUrl,quality: true,compress: boundOpts?.compression || null,diff --git a/api/users/[username].js b/api/users/[username].jsindex 52e4799ae..821b67d48 100644--- a/api/users/[username].js+++ b/api/users/[username].js@@ -2,6 +2,40 @@ import { sql } from '../_lib/db.js';import { cors, json, method, wrap, error, rateLimited } from '../_lib/http.js';import { limits, clientIp } from '../_lib/rate-limit.js';import { publicUrl, thumbnailUrl } from '../_lib/r2.js';+import { listCreationsByUser, countCreationsByUser } from '../_lib/forge-store.js';+import { listDioramasByUser, countDioramasByUser } from '../_lib/diorama-store.js';++const CREATIONS_PAGE_SIZE = 24;+const SITE = 'https://three.ws';++// Merge the first page of a user's forged models + saved worlds into one+// recency-ordered feed for the profile's "Creations" tab. Deeper pages load+// lazily from GET /api/users/:username/creations (same merge logic, cursor+// paginated) so this main endpoint stays fast even for a prolific creator.+function toCreationCard(it) {+ return it.type === 'world'+ ? {+ id: it.id,+ type: 'world',+ title: it.title,+ prompt: it.prompt,+ thumbnailUrl: it.thumbnailGlb,+ category: it.mood,+ viewerUrl: `${SITE}/diorama?id=${it.id}`,+ createdAt: it.createdAt,+ }+ : {+ id: it.id,+ type: 'model',+ title: it.prompt,+ prompt: it.prompt,+ thumbnailUrl: it.glbUrl,+ category: it.category,+ isRemix: it.isRemix,+ viewerUrl: `${SITE}/viewer?src=${encodeURIComponent(it.glbUrl)}`,+ createdAt: it.createdAt,+ };+}export default wrap(async (req, res) => {if (cors(req, res, { methods: 'GET,OPTIONS', credentials: false })) return;@@ -35,6 +69,10 @@ export default wrap(async (req, res) => {socialRows,statsRow,shopRows,+ modelRows,+ worldRows,+ modelsCount,+ worldsCount,] = await Promise.all([sql`select id, name, slug, description, storage_key, thumbnail_key, tags,@@ -170,6 +208,15 @@ export default wrap(async (req, res) => {order by ap.updated_at desclimit 48`.catch(() => []),+ // Forged 3D models + saved worlds (dioramas) made while signed in — the+ // two creation types that live in their own anonymous-by-design tables+ // rather than an owner_id-keyed one (see api/_lib/migrations/+ // 20260712010000_creator_portfolio_user_ids.sql). First page only;+ // deeper pages come from GET /api/users/:username/creations.+ listCreationsByUser({ userId: user.id, limit: CREATIONS_PAGE_SIZE }),+ listDioramasByUser({ userId: user.id, limit: CREATIONS_PAGE_SIZE }),+ countCreationsByUser({ userId: user.id }),+ countDioramasByUser({ userId: user.id }),]);const avatars = avatarRows.map((a) => ({@@ -328,6 +375,19 @@ export default wrap(async (req, res) => {social[row.provider] = row.username;}+ // Merge forged models + saved worlds into one recency-ordered feed. Each+ // list is independently already sorted+capped at CREATIONS_PAGE_SIZE, so+ // slicing after the merge is the true top-N across both types.+ const creations = [...modelRows, ...worldRows]+ .map(toCreationCard)+ .sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))+ .slice(0, CREATIONS_PAGE_SIZE);+ const creationsTotal = (modelsCount ?? 0) + (worldsCount ?? 0);+ const creationsNext =+ creationsTotal > creations.length && creations.length+ ? creations[creations.length - 1].createdAt+ : null;+// Follower/following counts live in their own query so a deploy that lands// before the user_follows migration degrades to zeros rather than 500ing// every public profile (migrate-then-deploy; see api/_lib/bounty-likes.js).@@ -346,6 +406,9 @@ export default wrap(async (req, res) => {coins: statsRow?.[0]?.coins_count ?? 0,memories: statsRow?.[0]?.memories_count ?? 0,shop: shop.length,+ creations: creationsTotal,+ models: modelsCount ?? 0,+ worlds: worldsCount ?? 0,widget_views: Number(statsRow?.[0]?.total_widget_views ?? 0),followers: followCounts?.followers ?? 0,following: followCounts?.following ?? 0,@@ -375,5 +438,7 @@ export default wrap(async (req, res) => {coins,memories,shop,+ creations,+ creationsNext,});});diff --git a/api/users/[username]/creations.js b/api/users/[username]/creations.jsnew file mode 100644index 000000000..af73fc756--- /dev/null+++ b/api/users/[username]/creations.js@@ -0,0 +1,103 @@+// GET /api/users/:username/creations — a user's forged 3D models + saved+// worlds (dioramas), merged into one recency-ordered, cursor-paginated feed.+//+// The main /api/users/:username response (api/users/[username].js) already+// carries a user's avatars, agents, widgets, skills, plugins, coins, and+// memories — everything that lives on a row keyed by owner_id/user_id in+// its own first-class table. Forged 3D models (forge_creations) and worlds+// (dioramas) are different: both tables are deliberately anonymous-by-design+// (scoped to a hashed browser client_key so /forge and /diorama work with no+// account), and only carry a user_id when the creator happened to be signed+// in at generation/save time. This endpoint is the one place those two+// creation types get aggregated and paginated for the profile's "Creations"+// tab — split out of the main endpoint (like collectibles.js) so a prolific+// creator with hundreds of rows never slows down the profile's first paint.+//+// GET /api/users/:username/creations → first page (24)+// GET /api/users/:username/creations?before=<iso> → next page (cursor)+// GET /api/users/:username/creations?type=model|world → one type only+//+// Public, no auth: the profile it backs is public. Anonymous creations+// (user_id null — the majority of forge_creations/dioramas rows) never+// appear here for anyone, by construction of the underlying queries.++import { sql } from '../../_lib/db.js';+import { cors, json, method, wrap, error, rateLimited } from '../../_lib/http.js';+import { limits, clientIp } from '../../_lib/rate-limit.js';+import { listCreationsByUser } from '../../_lib/forge-store.js';+import { listDioramasByUser } from '../../_lib/diorama-store.js';++const SITE = 'https://three.ws';++export default wrap(async (req, res) => {+ if (cors(req, res, { methods: 'GET,OPTIONS', credentials: false })) return;+ if (!method(req, res, ['GET'])) return;++ const usernameRaw =+ req.query?.username ||+ new URL(req.url, 'http://x').pathname.split('/').filter(Boolean).slice(-2)[0] ||+ '';+ const username = String(usernameRaw).toLowerCase().replace(/^@/, '').trim();+ if (!username || !/^[a-z0-9_-]{3,30}$/.test(username)) {+ return error(res, 400, 'validation_error', 'invalid username');+ }++ const rl = await limits.authedReadIp(clientIp(req));+ if (!rl.success) return rateLimited(res, rl);++ const [user] = await sql`+ select id from users where lower(username) = ${username} and deleted_at is null limit 1+ `;+ if (!user) return error(res, 404, 'not_found', 'user not found');++ const url = new URL(req.url, 'http://x');+ const typeFilter = url.searchParams.get('type'); // 'model' | 'world' | null (both)+ const before = url.searchParams.get('before') || undefined;+ const limit = Math.min(Math.max(Number(url.searchParams.get('limit')) || 24, 1), 48);+ // Over-fetch each source so merging two independently-paginated lists still+ // yields a full page of the true recency-merged feed, not an undercount.+ const fetchLimit = limit + 1;++ const [models, worlds] =+ typeFilter === 'world'+ ? [[], await listDioramasByUser({ userId: user.id, limit: fetchLimit, before })]+ : typeFilter === 'model'+ ? [await listCreationsByUser({ userId: user.id, limit: fetchLimit, before }), []]+ : await Promise.all([+ listCreationsByUser({ userId: user.id, limit: fetchLimit, before }),+ listDioramasByUser({ userId: user.id, limit: fetchLimit, before }),+ ]);++ const items = [...models, ...worlds]+ .map((it) =>+ it.type === 'world'+ ? {+ id: it.id,+ type: 'world',+ title: it.title,+ prompt: it.prompt,+ thumbnailUrl: it.thumbnailGlb,+ category: it.mood,+ viewerUrl: `${SITE}/diorama?id=${it.id}`,+ createdAt: it.createdAt,+ }+ : {+ id: it.id,+ type: 'model',+ title: it.prompt,+ prompt: it.prompt,+ thumbnailUrl: it.glbUrl,+ category: it.category,+ isRemix: it.isRemix,+ viewerUrl: `${SITE}/viewer?src=${encodeURIComponent(it.glbUrl)}`,+ createdAt: it.createdAt,+ },+ )+ .sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt))+ .slice(0, limit);++ const next = items.length === limit ? items[items.length - 1].createdAt : null;++ res.setHeader('Cache-Control', 'public, s-maxage=60, stale-while-revalidate=300');+ return json(res, 200, { items, next });+});diff --git a/data/changelog.json b/data/changelog.jsonindex a64dcbe64..174743a5c 100644--- a/data/changelog.json+++ b/data/changelog.json@@ -1,6 +1,15 @@{"$comment": "Curated changelog entries for three.ws — the editorial layer of the public changelog. New PAGE launches are tracked automatically via the `added` field in data/pages.json; this file is for everything else holders care about: improvements, fixes, SDK releases, trading/payments capabilities, security work. scripts/build-page-index.mjs merges both sources into CHANGELOG.md, public/changelog.json, and public/changelog.xml. Newest first. Allowed tags: feature, improvement, fix, sdk, infra, docs, security. `link` is optional and must be a live three.ws path.","entries": [+ {+ "date": "2026-07-12",+ "title": "Your creator portfolio: every forged model and world, in one place",+ "summary": "Your profile at /u/:username (or just /profile for your own) now has a Creations tab that pulls together everything you've made on three.ws: forged 3D models, saved worlds from Scene Studio, avatars, agents, and coins — each card a real, live, spinning 3D thumbnail linking straight to the model or world. Forging a model or saving a world while signed in now credits it to your account automatically; do it signed out and it stays anonymous like always. Diorama viewers and forge result pages now show \"by @you\" with a link back to your profile when a creation has a known creator, and prolific creators get a Load more button instead of a wall of cards.",+ "tags": [+ "feature"+ ],+ "link": "/profile"+ },{"date": "2026-07-12","title": "Fixed: /play was signing players out after an hour",diff --git a/data/pages.json b/data/pages.jsonindex d38ea6007..acc710038 100644--- a/data/pages.json+++ b/data/pages.json@@ -1784,6 +1784,16 @@"auth": "required","indexable": false,"added": "2026-04-28"+ },+ {+ "path": "/profile",+ "title": "Your creator portfolio",+ "description": "Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.",+ "priority": 0.5,+ "changefreq": "daily",+ "auth": "required",+ "indexable": false,+ "added": "2026-07-12"}]},diff --git a/pages/forge.html b/pages/forge.htmlindex 5cf182679..652abf339 100644--- a/pages/forge.html+++ b/pages/forge.html@@ -1740,6 +1740,17 @@text-overflow: ellipsis;white-space: nowrap;}+ .result-creator {+ font-size: var(--text-sm);+ color: var(--ink-dim);+ text-decoration: none;+ white-space: nowrap;+ }+ .result-creator:hover,+ .result-creator:focus-visible {+ color: var(--ink);+ text-decoration: underline;+ }/* Auto-save confirmation chip — shown briefly after generation completes */@keyframes saved-pop {0% { opacity: 0; transform: translateY(3px); }@@ -3022,6 +3033,7 @@</div><div class="result-bar"><span class="label" id="result-label"></span>+ <a class="result-creator is-hidden" id="result-creator" href="#">by @</a><span class="saved-chip is-hidden" id="result-saved" aria-label="Auto-saved to gallery">Saved ✓</span><spanclass="views-badge is-hidden"diff --git a/pages/profile.html b/pages/profile.htmlindex ecfa79d50..8cf8e8d8a 100644--- a/pages/profile.html+++ b/pages/profile.html@@ -1460,6 +1460,8 @@coins = [],memories = [],shop = [],+ creations = [],+ creationsNext = null,} = data;// Who's viewing? Drives the owner-only Edit button vs the Follow button.@@ -1720,6 +1722,7 @@.join('');const statDefs = [+ ['creations', 'Creations'],['avatars', 'Avatars'],['agents', 'Agents'],['widgets', 'Widgets'],@@ -1746,6 +1749,7 @@// Tabs: only show those with content; default to first non-emptyconst tabs = [+ { key: 'creations', label: 'Creations', count: stats.creations || creations.length },{ key: 'avatars', label: 'Avatars', count: avatars.length },{ key: 'agents', label: 'Agents', count: agents.length },{ key: 'widgets', label: 'Widgets', count: widgets.length },@@ -1825,6 +1829,9 @@<div id="up-walk-hero"></div><div class="up-stats">${statsHtml}</div>${tabBar}+ <section class="up-section" data-section="creations"${defaultTab === 'creations' ? '' : ' hidden'}>+ ${renderCreationsGrid(creations)}+ </section><section class="up-section" data-section="avatars"${defaultTab === 'avatars' ? '' : ' hidden'}>${renderAvatarsGrid(avatars)}</section>@@ -1857,6 +1864,8 @@</section>`;+ wireCreationsPagination(user.username, creationsNext);+// Tab switching — delegated so lazily-added NFT/Accessories tabs work.const tabBarEl = rootEl.querySelector('#up-tab-bar');function activateTab(key) {@@ -2622,6 +2631,81 @@return `<div class="up-grid">${cards}</div>`;}+ // Forged 3D models + saved worlds (dioramas) — the "Creations" tab.+ // Merged, recency-ordered feed from /api/users/:username (first page)+ // with a "Load more" button that pages through GET+ // /api/users/:username/creations (cursor by created_at) for creators+ // with 100+ items. Each card is a real, live 3D thumbnail (glb model+ // for a forged mesh; the same for a world's first forged object) that+ // deep-links to the actual viewer -- never a static screenshot.+ function creationCardHtml(c) {+ const thumb = c.thumbnailUrl+ ? `<model-viewer src="${attr(c.thumbnailUrl)}" loading="lazy" reveal="auto" ` ++ `auto-rotate rotation-per-second="16deg" interaction-prompt="none" disable-zoom ` ++ `camera-orbit="35deg 78deg auto" shadow-intensity="0" exposure="0.9" ` ++ `style="width:100%;height:100%;pointer-events:none;--poster-color:transparent" ` ++ `aria-hidden="true"></model-viewer>`+ : `<div class="up-card-thumb-placeholder">${c.type === 'world' ? '⛰' : '◎'}</div>`;+ const badge = c.type === 'world' ? 'World' : 'Model';+ const date = c.createdAt+ ? new Date(c.createdAt).toLocaleDateString(undefined, { year: 'numeric', month: 'short', day: 'numeric' })+ : '';+ return `+ <a class="up-card" href="${attr(c.viewerUrl)}" style="text-decoration:none">+ <div class="up-card-thumb">${thumb}</div>+ <div class="up-card-body">+ <span class="up-card-chain">${esc(badge)}${c.category ? ` · ${esc(c.category)}` : ''}</span>+ <span class="up-card-name">${esc((c.title || 'Untitled').slice(0, 80))}</span>+ <div class="up-card-footer">+ <span class="up-card-id">${esc(date)}</span>+ ${c.isRemix ? `<span class="up-tag">remix</span>` : ''}+ </div>+ </div>+ </a>+ `;+ }++ function renderCreationsGrid(creations) {+ if (!creations.length) {+ return `<p class="up-empty">No creations yet. <a href="/create">Forge your first model →</a></p>`;+ }+ return `<div class="up-grid" id="up-creations-grid">${creations.map(creationCardHtml).join('')}</div>+ <div class="up-load-more-row" id="up-creations-more-row" style="text-align:center;margin-top:1.2rem"></div>`;+ }++ // Wires the "Load more" button once the Creations section is in the+ // DOM. Idempotent: safe to call every time the tab renders since the+ // button element is (re)created fresh in renderCreationsGrid.+ function wireCreationsPagination(username, initialNext) {+ const row = rootEl.querySelector('#up-creations-more-row');+ const grid = rootEl.querySelector('#up-creations-grid');+ if (!row || !grid) return;+ let cursor = initialNext;+ if (!cursor) return;+ const renderMoreBtn = () => {+ row.innerHTML = `<button type="button" class="up-action-btn" id="up-creations-load-more">Load more</button>`;+ row.querySelector('#up-creations-load-more')?.addEventListener('click', loadMore, { once: true });+ };+ async function loadMore() {+ row.innerHTML = `<span class="up-empty" style="display:inline">Loading…</span>`;+ try {+ const r = await fetch(+ `/api/users/${encodeURIComponent(username)}/creations?before=${encodeURIComponent(cursor)}`,+ );+ const j = await r.json().catch(() => ({}));+ const items = j.items || [];+ grid.insertAdjacentHTML('beforeend', items.map(creationCardHtml).join(''));+ cursor = j.next || null;+ if (cursor) renderMoreBtn();+ else row.innerHTML = '';+ } catch {+ row.innerHTML = `<button type="button" class="up-action-btn" id="up-creations-load-more">Retry</button>`;+ row.querySelector('#up-creations-load-more')?.addEventListener('click', loadMore, { once: true });+ }+ }+ renderMoreBtn();+ }+// Items the user actively lists for sale (asset_prices). Each card deep// links to the item's own page, where the existing purchase flow lives —// the profile never duplicates checkout.diff --git a/public/changelog.json b/public/changelog.jsonindex d08a69e63..aa5e955e7 100644--- a/public/changelog.json+++ b/public/changelog.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-12T14:51:46.886Z",+ "generated_at": "2026-07-12T15:56:33.792Z","generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json","site": {"name": "three.ws",@@ -26,6 +26,16 @@"launch"]},+ {+ "date": "2026-07-12",+ "type": "launch",+ "title": "Your creator portfolio",+ "summary": "Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.",+ "link": "/profile",+ "tags": [+ "launch"+ ]+ },{"date": "2026-07-12","type": "update",@@ -292,6 +302,16 @@"improvement"]},+ {+ "date": "2026-07-12",+ "type": "update",+ "title": "Your creator portfolio: every forged model and world, in one place",+ "summary": "Your profile at /u/:username (or just /profile for your own) now has a Creations tab that pulls together everything you've made on three.ws: forged 3D models, saved worlds from Scene Studio, avatars, agents, and coins — each card a real, live, spinning 3D thumbnail linking straight to the model or world. Forging a model or saving a world while signed in now credits it to your account automatically; do it signed out and it stays anonymous like always. Diorama viewers and forge result pages now show \"by @you\" with a link back to your profile when a creation has a known creator, and prolific creators get a Load more button instead of a wall of cards.",+ "link": "/profile",+ "tags": [+ "feature"+ ]+ },{"date": "2026-07-12","type": "update",diff --git a/public/changelog.xml b/public/changelog.xmlindex a45365fcc..e935a81dd 100644--- a/public/changelog.xml+++ b/public/changelog.xml@@ -22,6 +22,14 @@<category>launch</category><description>The 24/7 tokenized-equity board for Robinhood Chain (4663): live Chainlink NAV vs DEX premium for every Stock Token, a memecoin screener across NOXA and The Odyssey launchpads, recent launches, and chain TVL — plus a real wallet-connect buy flow for its coins.</description></item>+ <item>+ <title>Your creator portfolio</title>+ <link>https://three.ws/profile</link>+ <guid isPermaLink="false">2026-07-12:Your creator portfolio</guid>+ <pubDate>Sun, 12 Jul 2026 12:00:00 GMT</pubDate>+ <category>launch</category>+ <description>Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.</description>+ </item><item><title>Agent discovery fixed: six paid endpoints were invisible to x402 scanners</title><link>https://three.ws/openapi.json</link>@@ -222,6 +230,14 @@<category>fix</category><description>Payment directories like x402scan verify an endpoint by poking it without paying and expecting the HTTP 402 payment challenge back. A July registration run rejected 33 three.ws endpoints because probes were answered with the wrong thing: method or input mistakes returned plain errors before the challenge, and per-item priced endpoints (asset downloads, marketplace skills, fact checks) demanded a valid item id before quoting a price. Now any credential-less request on a paid route receives the full 402 challenge — wrong method, missing id, or empty body included — while real paying callers keep strict validation before any money moves. The free crypto-data endpoints under /api/v1/x are now correctly advertised as free in /openapi.json instead of failing paid-endpoint probes, so agents see them for what they are: no-signup data with a pay-as-you-go overflow lane.</description></item>+ <item>+ <title>Your creator portfolio: every forged model and world, in one place</title>+ <link>https://three.ws/profile</link>+ <guid isPermaLink="false">2026-07-12:Your creator portfolio: every forged model and world, in one place</guid>+ <pubDate>Sun, 12 Jul 2026 12:00:00 GMT</pubDate>+ <category>feature</category>+ <description>Your profile at /u/:username (or just /profile for your own) now has a Creations tab that pulls together everything you've made on three.ws: forged 3D models, saved worlds from Scene Studio, avatars, agents, and coins — each card a real, live, spinning 3D thumbnail linking straight to the model or world. Forging a model or saving a world while signed in now credits it to your account automatically; do it signed out and it stays anonymous like always. Diorama viewers and forge result pages now show "by @you" with a link back to your profile when a creation has a known creator, and prolific creators get a Load more button instead of a wall of cards.</description>+ </item><item><title>Your Premium API keys and purchase history are now wallet-gated</title><link>https://three.ws/dashboard/data-api</link>diff --git a/public/features.json b/public/features.jsonindex 11c562126..9b18d1b7b 100644--- a/public/features.json+++ b/public/features.json@@ -1,5 +1,5 @@{- "generated_at": "2026-07-12T14:51:46.866Z",+ "generated_at": "2026-07-12T15:56:33.778Z","generated_by": "scripts/build-page-index.mjs from data/pages.json","site": {"name": "three.ws",@@ -2179,6 +2179,16 @@"indexable": false,"tags": [],"showcase": false+ },+ {+ "path": "/profile",+ "title": "Your creator portfolio",+ "description": "Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.",+ "added": "2026-07-12",+ "auth": "required",+ "indexable": false,+ "tags": [],+ "showcase": false}]},diff --git a/public/llms-full.txt b/public/llms-full.txtindex d7c94a4e7..786ccb2bd 100644--- a/public/llms-full.txt+++ b/public/llms-full.txt@@ -1336,6 +1336,14 @@ Indexable: no (excluded from sitemap)Account, profile, and notification settings.+### Your creator portfolio++URL: https://three.ws/profile+Auth: required (sign-in)+Indexable: no (excluded from sitemap)++Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.+## LearnDocs, tutorials, and reference.diff --git a/public/sitemap/index.html b/public/sitemap/index.htmlindex 15eef721e..3d8026604 100644--- a/public/sitemap/index.html+++ b/public/sitemap/index.html@@ -65,7 +65,7 @@<main class="sm-wrap"><div class="sm-hero"><h1>Sitemap</h1>- <p>All 425 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p>+ <p>All 426 pages on three.ws, grouped by purpose. Looking for the machine-readable versions?</p><div class="sm-formats"><a href="/sitemap.xml"><code>sitemap.xml</code> · for search engines</a><a href="/llms.txt"><code>llms.txt</code> · for AI agents</a>@@ -77,7 +77,7 @@</div><div class="sm-filter"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m21 21-4.3-4.3"/></svg>- <input id="sm-filter-input" type="search" placeholder="Filter 425 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" />+ <input id="sm-filter-input" type="search" placeholder="Filter 426 pages by name, path, or description…" aria-label="Filter pages" autocomplete="off" spellcheck="false" /><kbd aria-hidden="true">/</kbd></div><p class="sm-filter-count" id="sm-filter-count" role="status" aria-live="polite"></p>@@ -1548,7 +1548,7 @@<section class="sm-section" id="account"><header>- <h2>Account<span class="sm-count" data-count>12</span></h2>+ <h2>Account<span class="sm-count" data-count>13</span></h2><p class="sm-section-desc">Sign-in, dashboard, billing.</p></header><ul class="sm-list">@@ -1636,6 +1636,13 @@<span class="sm-desc">Account, profile, and notification settings.</span></a></li>+ <li>+ <a href="/profile">+ <span class="sm-title">Your creator portfolio<span class="sm-badge sm-badge-auth">sign-in</span><span class="sm-badge sm-badge-internal">internal</span></span>+ <span class="sm-path">/profile</span>+ <span class="sm-desc">Your public three.ws portfolio: every avatar, agent, forged 3D model, world, coin, skill, and plugin you've made, in one place. Signed out, this redirects to sign-in; every user's own page also lives at /u/:username.</span>+ </a>+ </li></ul></section>diff --git a/src/diorama/diorama.css b/src/diorama/diorama.cssindex 9bff38da2..e7b0ff1f2 100644--- a/src/diorama/diorama.css+++ b/src/diorama/diorama.css@@ -267,6 +267,18 @@color: rgba(255, 255, 255, 0.78);text-transform: capitalize;}+.hud-author-link {+ color: rgba(255, 255, 255, 0.92);+ text-decoration: none;+ text-transform: none;+ pointer-events: auto;+ border-bottom: 1px solid rgba(255, 255, 255, 0.35);+}+.hud-author-link:hover,+.hud-author-link:focus-visible {+ color: #fff;+ border-bottom-color: rgba(255, 255, 255, 0.85);+}/* Side panel */.dio-side {@@ -566,6 +578,18 @@.dio-card__mood {text-transform: capitalize;}+.dio-card__by {+ display: inline-block;+ margin-top: 0.4rem;+ font-size: 0.72rem;+ color: var(--dio-dim);+ text-decoration: none;+}+.dio-card__by:hover,+.dio-card__by:focus-visible {+ color: var(--dio-fg, #fff);+ text-decoration: underline;+}/* Skeleton cards while the gallery loads */.dio-card--skeleton {diff --git a/src/diorama/gallery.js b/src/diorama/gallery.jsindex 66a5fc9af..6cd3958ee 100644--- a/src/diorama/gallery.js+++ b/src/diorama/gallery.js@@ -40,6 +40,14 @@ function buildCard(d, onOpen) {`aria-hidden="true"></model-viewer></div>`: `<div class="dio-card__thumb"></div>`;+ // Registered creators (d.creatorUsername, set server-side only when the+ // world was saved while signed in) get a real link back to their public+ // portfolio — the same "who made this" wiring as avatars/marketplace+ // listings. Anonymous saves show no byline, never a fabricated one.+ const bylineHtml = d.creatorUsername+ ? `<a class="dio-card__by" href="/u/${esc(d.creatorUsername)}">by @${esc(d.creatorUsername)}</a>`+ : '';+btn.innerHTML =thumb +`<div class="dio-card__body">` +@@ -48,11 +56,14 @@ function buildCard(d, onOpen) {`<div class="dio-card__foot">` +`<span class="dio-card__mood">${esc(d.mood || 'a little world')}</span>` +`<span>${d.objectCount || 0} pieces · ${fmtViews(d.views)}</span>` +- `</div></div>`;+ `</div>${bylineHtml}</div>`;btn.addEventListener('click', () => {if (typeof onOpen === 'function' && d.id) onOpen(d.id);});+ // The creator byline is a real nested link (card is a <button> for the+ // primary "open world" action) — stop its click from also firing onOpen.+ btn.querySelector('.dio-card__by')?.addEventListener('click', (e) => e.stopPropagation());return btn;}diff --git a/src/diorama/main.js b/src/diorama/main.jsindex eaa8badfa..ee50559e7 100644--- a/src/diorama/main.js+++ b/src/diorama/main.js@@ -72,12 +72,30 @@ function init() {const mood = MOODS.includes(diorama.mood) ? diorama.mood : 'day';if (el.hudTitle) el.hudTitle.textContent = diorama.title || 'A little world';if (el.hudMeta) {- const author = diorama.author?.handle- ? `@${diorama.author.handle.replace(/^@/, '')}`- : diorama.author?.wallet- ? shortWallet(diorama.author.wallet)- : '';- el.hudMeta.textContent = [MOOD_LABEL[mood] || mood, author].filter(Boolean).join(' · ');+ const moodLabel = MOOD_LABEL[mood] || mood;+ // A registered creator (diorama.creatorUsername, set server-side only+ // when the world was saved while signed in) gets a real link to their+ // public portfolio. Anonymous saves fall back to the plain-text handle+ // or wallet the composer captured — never a fabricated link.+ if (diorama.creatorUsername) {+ const escUser = String(diorama.creatorUsername).replace(/[&<>"']/g, (c) =>+ ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[c],+ );+ el.hudMeta.textContent = '';+ el.hudMeta.append(document.createTextNode(`${moodLabel} · `));+ const link = document.createElement('a');+ link.href = `/u/${escUser}`;+ link.className = 'hud-author-link';+ link.textContent = `@${escUser}`;+ el.hudMeta.append(link);+ } else {+ const author = diorama.author?.handle+ ? `@${diorama.author.handle.replace(/^@/, '')}`+ : diorama.author?.wallet+ ? shortWallet(diorama.author.wallet)+ : '';+ el.hudMeta.textContent = [moodLabel, author].filter(Boolean).join(' · ');+ }}show(el.hud);}diff --git a/src/forge.js b/src/forge.jsindex eda3e721b..18c362f0d 100644--- a/src/forge.js+++ b/src/forge.js@@ -77,6 +77,7 @@ const els = {viewerShell: document.getElementById('viewer-shell'),cinema: document.getElementById('cinema'),resultLabel: document.getElementById('result-label'),+ resultCreator: document.getElementById('result-creator'),resultViews: document.getElementById('result-views'),verdict: document.getElementById('verdict'),download: document.getElementById('download'),@@ -1616,6 +1617,19 @@ function showResult(glbUrl, label, meta, { autoSaved = false } = {}) {els.viewer.setAttribute('alt', `3D model: ${label}`);lastShownGlb = glbUrl;els.resultLabel.textContent = label;+ // Real, opt-in attribution only: a byline + link to the creator's public+ // portfolio appears when this creation was forged while signed in+ // (meta.creatorUsername, set server-side). Anonymous generations — the+ // large majority — show no byline, never a fabricated one.+ if (els.resultCreator) {+ if (meta?.creatorUsername) {+ els.resultCreator.href = `/u/${encodeURIComponent(meta.creatorUsername)}`;+ els.resultCreator.textContent = `by @${meta.creatorUsername}`;+ els.resultCreator.classList.remove('is-hidden');+ } else {+ els.resultCreator.classList.add('is-hidden');+ }+ }// Hide the saved chip by default; caller re-shows it for fresh generations.if (els.savedChip) els.savedChip.classList.add('is-hidden');setViewsBadge(meta);@@ -1795,6 +1809,7 @@ function openCreation(c, { scroll = true } = {}) {backend: c.backend,tier: c.tier,path: c.path,+ creatorUsername: c.creatorUsername || null,});if (els.verdict) {for (const b of els.verdict.querySelectorAll('button')) {diff --git a/vercel.json b/vercel.jsonindex fceb621df..63c937ce3 100644--- a/vercel.json+++ b/vercel.json@@ -3574,6 +3574,10 @@"src": "/api/users/([^/]+)/collectibles","dest": "/api/users/[username]/collectibles?username=$1"},+ {+ "src": "/api/users/([^/]+)/creations",+ "dest": "/api/users/[username]/creations?username=$1"+ },{"src": "/api/users/([^/]+)","dest": "/api/users/[username]?username=$1"