How It Works
feedpipe is built on a layered architecture that separates tunneling infrastructure from collaboration features.
Architecture Overview
┌─────────────────────────────────────────────────────────────────────────────┐│ FEEDPIPE (Application Layer) ││ • Annotation overlay • AI agent integration ││ • Real-time collaboration • Dashboard ││ • Event routing • Developer notifications │├─────────────────────────────────────────────────────────────────────────────┤│ PORTHOLE (Infrastructure Layer) ││ • HTTP/WS tunneling • URL lifecycle ││ • Slug management • CLI ↔ Relay WebSocket ││ • Request proxying • Response streaming │└─────────────────────────────────────────────────────────────────────────────┘Components
CLI (feedpipe)
The command-line interface that runs on your machine:
- Creates a WebSocket connection to the relay
- Proxies HTTP requests to your local server
- Displays real-time feedback in the terminal
- Optionally pipes events to AI agents
Relay (Cloudflare Workers)
The edge infrastructure that handles all traffic:
- TunnelDurableObject: Manages CLI connections and request proxying
- AnnotationRoom: Handles real-time annotation state and broadcasting
- HTML Injection: Injects the toolbar script into HTML responses
Toolbar (@feedpipe/toolbar)
A Preact app injected into proxied pages:
- Renders in a Shadow DOM to isolate styles
- Connects to AnnotationRoom via WebSocket
- Enables element selection and rectangle drawing
- Displays existing annotations
Data Flow
HTTP Request
1. Reviewer requests: GET https://my-app.feedpipe.dev/dashboard2. Feedpipe Relay Worker receives request3. Worker routes to TunnelDurableObject4. DO sends request to CLI via WebSocket5. CLI proxies to localhost:3000/dashboard6. CLI sends response back via WebSocket7. Relay intercepts HTML, injects toolbar script8. Response returned to reviewerAnnotation Created
1. Reviewer clicks element, types comment, submits2. Toolbar sends annotation via WebSocket to AnnotationRoom3. AnnotationRoom validates, stores, broadcasts to all clients4. AnnotationRoom forwards event to TunnelDurableObject5. TunnelDurableObject sends to CLI via WebSocket6. CLI prints event to terminal7. CLI optionally pipes to AI agent stdinTechnology Stack
- Runtime: Cloudflare Workers + Durable Objects
- CLI: Node.js with Commander, Chalk
- Toolbar: Preact with Shadow DOM
- Protocol: WebSocket with JSON messages
- Storage: Durable Object storage (24h TTL)
Security
- Session Tokens: Each tunnel has a unique session token
- Password Protection: Optional password for tunnel access
- 24h TTL: Tunnels automatically expire
- No Persistence: Annotations are ephemeral