Niu Prototyper
Visual interactive prototyping for live web UIs: wraps any static build or dev server in an inspectable canvas where I pin element-anchored comments and iterate in place with any CLI coding agent.
This came from micro-design feedback in user research sessions. In a rapid prototyping session, “move the second subtitle in the right-hand card” is a design I need to evaluate in real-time with a user.
Prototyper reviews live websites with a coding agent. It wraps a local build or dev server in a browser canvas, where I can select an element, pin a comment, and review changes in place.
How it works
Token Economy
The agent never needs the whole codebase to act on a comment. Each comment carries the element’s selector path, a 160-character text excerpt, its outerHTML capped at 2,000 characters, and a content hash. The agent starts from that one element and searches the source, eliminating the need to read the whole site.
Point at the thing
Inspect mode captures the selected element’s location in the page, its text, and a snapshot of its HTML. The comment carries that evidence so the agent can find the intended target in the source.
Feedback goes into a queue. An agent claims the batch, inspects the target, changes the component or stylesheet, and reloads the preview for review.
Try a change
For a quick layout experiment, the agent can apply an HTML/CSS overlay. For a lasting change, it edits the project source. That lets me try a variation before deciding to build it into a component.
Built on Canvas
The terminal drawer comes from Document Canvas, so I can use the same CLI agents for prose and interface work.
The preview and the review shell run on separate local origins. Their messages are checked so the target application’s scripts cannot read the shell’s session token.
Stack
| Part | Tool |
|---|---|
| Shell, dev proxy, and live reload | Node.js (HTTP server, reverse proxy, Server-Sent Events) |
| Preview isolation and DOM capture | Dual loopback origins with origin-checked postMessage bridge |
| Terminal drawer and agent session engine | Shared document-canvas engine (Python, tmux, node-pty, ws, xterm.js) |
| Verification | Node test runner and Playwright end-to-end smoke suite |