Trident PRISM
Dynamic rendering reverse proxy for Single Page Applications.
PRISM sits between clients and your SPA origin, renders JavaScript into static HTML using headless Chromium, caches the result, and serves fully rendered pages. Search engines, social crawlers, and (optionally) all users get complete HTML without any changes to your frontend code.
Client --> PRISM --> SPA Origin
|
Cache HIT? --> serve rendered HTML
|
MISS
|
Chrome renders page
|
Cache + serveWhy PRISM?
Single Page Applications (React, Vue, Angular, Svelte, Next.js) render content in the browser using JavaScript. Search engines and social crawlers often can't execute JavaScript, so they see an empty page. This hurts SEO, social sharing previews, and AI crawlers indexing your content.
PRISM solves this without changing your code:
- Zero SPA changes -- works with any React, Vue, Svelte, or Angular app as-is
- Bot detection -- 70+ crawler patterns (Google, Bing, GPTBot, ClaudeBot, social bots, SEO tools)
- Render-all mode -- serve rendered HTML to everyone, not just bots
- In-memory cache -- LRU with configurable max entries, memory limit, TTL, and grace period
- Request coalescing -- one render per URL at a time, concurrent requests wait for the result
- Chrome pool -- configurable tab count, automatic tab recycling, crash recovery with backoff
- Circuit breaker -- stops rendering after consecutive failures, auto-recovers
- Admin API -- health checks, Prometheus metrics, cache purge, manual render trigger
- Security -- SSRF protection, egress allowlist, per-domain rate limiting
- Shadow mode -- render in background and log diffs without serving rendered HTML
How It Works
Bot-Only Mode (default)
PRISM detects search engine crawlers by User-Agent and only renders pages for them. Regular users get the normal SPA response (fast, client-side rendered).
Browser (human) --> PRISM --> pass through to origin (no rendering)
Googlebot --> PRISM --> render with Chrome --> serve HTMLRender-All Mode
Every request gets a fully rendered HTML response. Useful for sites where you want server-side rendering without modifying your SPA.
Any client --> PRISM --> render with Chrome --> serve HTMLResponse Headers
PRISM adds headers to every response so you can verify it's working:
| Header | Values | Description |
|---|---|---|
x-prism-rendered | true | Page was rendered through Chrome |
x-prism-cache | HIT, MISS, STALE, BYPASS | Cache status |
x-prism-render-time | milliseconds | How long the render took |
Quick Start
The fastest way to try PRISM:
# Docker Compose (includes Chromium)
curl -sSL https://raw.githubusercontent.com/Trident-Cache/prism/main/docker-compose.yml -o docker-compose.yml
# Edit ORIGIN in docker-compose.yml to point to your SPA
docker compose up -dOr install the binary:
curl -sSfL https://get.trident-cache.com/prism | sh -s -- --with-serviceSee Installation for detailed instructions.