feat: via.seams.so proxy
Build Caddy-based via proxy with hot reloading and shared core package
Architecture:
- Caddy (port 8082) serves landing page and proxies /proxy/* and /static/* to pywb
- pywb (port 8080) handles HTML proxying with head_insert template injection
- Vite watch mode rebuilds client scripts to pywb-test/static/ automatically
Shared @seams/core package:
- StorageAdapter interface with WebStorageAdapter (localStorage + BroadcastChannel)
- BackgroundWorker: fetches annotations from backend, writes to storage
- ContentScript: reads from storage, renders highlights on page
- Sidebar (iframe) runs BackgroundWorker to fetch (bypasses pywb interception)
- Client (main.ts) runs ContentScript to render highlights
- Communication via BroadcastChannel - fully decoupled architecture
Fixed injection issues:
- Changed custom_banner → head_insert template (custom_banner requires enable_content_rewrite)
- Set enable_banner: false and enable_wombat: false for minimal rewriting
- Added /static/* Caddy proxy route for correct MIME types
- Changed iframe src to relative URL to avoid CSP violations
Development: Run `pnpm via` to start all services (Vite, pywb, Caddy).
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.
This is a binary file and will not be displayed.