Prism is an edge-native LLM API Gateway and Candidate AI Coding Evaluation Platform built on Cloudflare Workers, Hono, React, Cloudflare D1, and Cloudflare R2.
It provides visual candidate evaluation, token quota management, and full prompt interaction timeline playback for technical AI Coding interviews. 100% runs on Cloudflare.
- Edge-Native Architecture: 100% runs on Cloudflare Workers edge network with zero server management & minimal latency.
- Bi-directional Protocol Adapter:
- Standard
/openai/v1/chat/completionsand/anthropic/v1/messagesendpoints. - Seamlessly transforms payloads, headers (
anthropic-version), JSON responses, and SSETransformStreamevents between OpenAI and Anthropic formats.
- Standard
- Flexible Provider Support:
- Cloudflare Workers AI: Native support for
@cf/*free & cost-effective models with zero configuration. - Cloudflare AI Gateway: Supports Provider Native routing (OpenAI, Anthropic, Google AI Studio, Grok/xAI, OpenRouter) with Cloudflare Unified Billing or Cloudflare Hosted BYOK.
- Custom Provider (BYOK): Supports custom Base URLs and private API Keys.
- Cloudflare Workers AI: Native support for
- Candidate Key & Quota Management:
- Easily set token limits, allowed model whitelists, and expiration dates for candidate API Keys.
- Generates ready-to-send candidate invitation guides & CLI setup commands (Codex CLI, Claude Code, Cursor, Windsurf, Aider).
- Prompt Timeline Playback & Evaluation:
- Visual timeline playback for interviewers to review candidates' prompt strategy, task decomposition, and AI interaction skills.
If you want to quickly deploy your own Prism instance to Cloudflare Workers with zero hassle:
- Fork this repository to your GitHub account.
- Clone your forked repo:
git clone https://github.com/<YOUR_USERNAME>/prism.git cd prism pnpm install
- Copy
apps/gateway/wrangler.example.tomltoapps/gateway/wrangler.tomland set your Cloudflare D1 Database ID. - Run
pnpm devlocally orpnpm deployto deploy directly to your Cloudflare Workers edge account!
Important
Default Admin Login Credentials:
- Username:
admin - Password:
admin123
pnpm installCopy wrangler.example.toml in apps/gateway:
cp apps/gateway/wrangler.example.toml apps/gateway/wrangler.tomlEdit apps/gateway/wrangler.toml with your Cloudflare D1 Database ID:
[[d1_databases]]
binding = "DB"
database_name = "prism-db"
database_id = "YOUR_CLOUDFLARE_D1_DATABASE_ID"Apply D1 SQL migrations locally:
pnpm --filter @oklychee/prism-gateway db:migrate:localStart the gateway and frontend dashboard concurrently:
pnpm devThe gateway will run locally at http://localhost:8787 and dashboard at http://localhost:5173.
Create a D1 database on Cloudflare:
npx wrangler d1 create prism-db(Optional) Create an R2 bucket for persistent long prompt logs:
npx wrangler r2 bucket create prism-logspnpm --filter @oklychee/prism-gateway db:migrate:remotePrism has native, zero-friction support for Cloudflare Turnstile to prevent login brute-force attacks:
Note
VITE_TURNSTILE_SITE_KEY is embedded into the frontend static assets at compile time. Make sure to set it in apps/dashboard/.env before running pnpm build.
- Create a Turnstile widget on your Cloudflare Dashboard (Free).
- Set your Site Key in
apps/dashboard/.envbefore building:VITE_TURNSTILE_SITE_KEY="0x4AAAAAAA..." - Run
pnpm buildto compile the dashboard bundle with Turnstile enabled. - Set your Secret Key in
apps/gatewaysecrets:npx wrangler secret put TURNSTILE_SECRET_KEY
(If unconfigured, Turnstile verification is automatically disabled and will not block logins).
Build static SSG assets and deploy to Cloudflare:
pnpm build
pnpm --filter @oklychee/prism-gateway deploy- Limit Candidate Key Usage by Spending Amount (USD Cost Limit)
- Multi-Interviewer Account & Role-Based Access Support
- Interview Problem Bank & Preset Challenges Management
- AI-Assisted Candidate Evaluation & Rating System
MIT ยฉ OKLYCHEE