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
fix(dev): nav.css on subpages, /api/* 404, /widgets and /studio routing
nirholas08c2905c5e6f
diff --git a/public/discover/index.html b/public/discover/index.htmlindex 8f2794caa..d4e7491a7 100644--- a/public/discover/index.html+++ b/public/discover/index.html@@ -31,6 +31,7 @@<link rel="preconnect" href="https://fonts.googleapis.com" /><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /><link rel="stylesheet" href="/style.css" />+ <link rel="stylesheet" href="/nav.css" /><linkhref="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap"rel="stylesheet"diff --git a/public/docs-widgets.html b/public/docs-widgets.htmlindex 88117eed8..22e1013b9 100644--- a/public/docs-widgets.html+++ b/public/docs-widgets.html@@ -30,6 +30,7 @@<link rel="stylesheet" href="/style.css" /><link rel="stylesheet" href="/widgets-gallery/gallery.css" /><link rel="stylesheet" href="/footer.css" />+ <link rel="stylesheet" href="/nav.css" /><script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script><style>.docs-main {diff --git a/public/nav.js b/public/nav.jsindex e163b4285..b4d776b4a 100644--- a/public/nav.js+++ b/public/nav.js@@ -1,6 +1,12 @@document.addEventListener('DOMContentLoaded', () => {const navContainer = document.getElementById('nav-container');if (!navContainer) return;+ if (!document.querySelector('link[href="/nav.css"]')) {+ const link = document.createElement('link');+ link.rel = 'stylesheet';+ link.href = '/nav.css';+ document.head.appendChild(link);+ }fetch('/nav.html').then(response => response.text()).then(data => {diff --git a/public/pumpfun.html b/public/pumpfun.htmlindex 3963b6f52..428bf55f1 100644--- a/public/pumpfun.html+++ b/public/pumpfun.html@@ -10,6 +10,7 @@<link rel="stylesheet" href="/style.css" /><link rel="stylesheet" href="/home.css" /><link rel="stylesheet" href="/footer.css" />+ <link rel="stylesheet" href="/nav.css" /><link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap" rel="stylesheet" /><script type="module" src="https://ajax.googleapis.com/ajax/libs/model-viewer/4.0.0/model-viewer.min.js"></script><script defer src="/footer-newsletter.js"></script>diff --git a/public/vanity-wallet.html b/public/vanity-wallet.htmlindex c4af0d3e3..78e7f95b9 100644--- a/public/vanity-wallet.html+++ b/public/vanity-wallet.html@@ -7,6 +7,7 @@<meta name="description" content="Grind a custom Solana wallet address for your agent. Runs entirely in your browser — keys never leave your device."><link rel="icon" href="/favicon.ico"><link rel="stylesheet" href="/footer.css">+ <link rel="stylesheet" href="/nav.css"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@600;700&display=swap" rel="stylesheet">diff --git a/vite.config.js b/vite.config.jsindex a976b7923..99a6bca49 100644--- a/vite.config.js+++ b/vite.config.js@@ -88,7 +88,9 @@ const appConfig = {'/create': resolve(root, 'create.html'),'/dashboard': resolve(root, 'public/dashboard/index.html'),'/studio': resolve(root, 'widget-studio.html'),+ '/studio/': resolve(root, 'widget-studio.html'),'/widgets': resolve(root, 'public/widgets-gallery/index.html'),+ '/widgets/': resolve(root, 'public/widgets-gallery/index.html'),'/docs/widgets': resolve(root, 'public/docs-widgets.html'),'/cz': resolve(root, 'public/cz/index.html'),'/cz/': resolve(root, 'public/cz/index.html'),@@ -137,6 +139,15 @@ const appConfig = {if (url.includes('html-proxy') || url.includes('@id/') || url.includes('@vite/'))return next();const path = url.split('?')[0];+ // Vercel serverless functions live under /api/* in production but+ // Vite dev does not run them. Return JSON 404 so client fetch()+ // callers see a normal "not found" instead of leaking the JS+ // source of api/*.js (which crashes JSON.parse with a comment).+ if (path.startsWith('/api/')) {+ res.statusCode = 404;+ res.setHeader('Content-Type', 'application/json');+ return res.end('{"error":"api not available in vite dev","path":"' + path + '"}');+ }if (dirRoutes.has(path)) {res.statusCode = 301;res.setHeader('Location', path + '/' + (req.url.slice(path.length) || ''));