Publish the read-only site
Agent Lamp has two separate runtimes. The Node.js status bridge stays on your machine and talks to WLED on your trusted LAN. The Vercel site serves only the Three.js viewer, guides, illustrations and downloadable models. It has no event receiver, lamp controls, bridge token or connection to your agents.
Production site: agent-lamp.vercel.app. The files page links to the print kit, individual models and guides.
Source repository: PrinceUmbrella/agent-lamp. It remains private. GitHub repository visibility and public website access are separate settings. Deploying the site does not make the repository public.
The Vercel project is agent-lamp in the princeumbrellas-projects scope, connected to this repository for production deployments from main. Its cloud build runs the TypeScript compilation, browser bundling and Python print export.
Build locally
Use Node.js 22 or later and Python 3.9 or later.
npm ci --include=dev
npm run build:site
npm test
npm run preview
The preview serves the production files at http://127.0.0.1:43822. Stop it with Ctrl+C. It accepts only read-only requests from that loopback host. No device or agent configuration is needed.
The public directory is dist/site, not dist. The wider dist folder contains the local bridge and a generated desktop extension with checkout-specific file URLs. Never upload it as a static site.
preview/site.ts lists every public asset. The build validates capsule parameters and STL hashes with the existing print exporter, generates scene.json from CAD metadata and default colors, copies only allowlisted files, and renders the checked-in Markdown guides to HTML. Fonts and Three.js are served from the same origin, without a CDN or analytics script.
The print kit includes the current four capsule STLs. The earlier rectangular 3MF is a separately labeled download. No printer profiles or G-code are published.
Deploy to Vercel
The repository's vercel.json selects these settings:
- Framework preset: Other.
- Install command:
npm ci --include=dev. - Build command:
npm run build:site. - Output directory:
dist/site. - No serverless functions or runtime environment variables.
With an authorized Vercel CLI:
vercel link --project agent-lamp --scope princeumbrellas-projects
vercel deploy --dry --format=json
vercel deploy --prod --scope princeumbrellas-projects
Link to your own project/team when deploying a separate copy. Review the dry-run file list before upload. .vercelignore excludes local state, environment files, dependencies and generated output. Vercel builds from source. .vercel/ stays ignored; do not commit account linkage or environment files.
To enable automatic deployments, connect this repository to the Vercel project and use main as the production branch. If the Vercel GitHub app cannot access the private repository, grant it access to this repository only. Do not change repository visibility to work around an authorization failure.
Update productionUrl in preview/site.ts when changing the production domain, so canonical links, robots.txt and the sitemap agree. Vercel supplies HTTPS. The site sets a same-origin content security policy and denies framing. Vercel allows cross-origin reads of these public static files; it does not host a bridge or control endpoint. The local preview and bridge retain their own Host and Origin checks. Model and ZIP routes have download headers.
Verify a release
Check the production URL in a browser and test:
- Open the exploded assembly, inspect the top, and enable illustrative electronics.
- Select a part, isolate it, and change the simulated source color.
- Download the print kit and each STL. Compare their bytes or SHA-256 hashes with the source and manifest.
- Read the capsule and adapter guides, including their images and internal links.
- Confirm a missing URL returns 404. Requests for
/events,/src/config.tsand/.agent-lamp/config.jsonmust never reach the local bridge or expose files.
The hosted viewer does not prove hardware fit, electrical safety, print quality or agent-to-lamp operation. Those still require attended local checks with the actual components.