promptCompare
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v177View latest version
A Val Town app for comparing LLM model outputs side-by-side.
docs/vt.md— Val Town platform docs: hosting, runtime, triggers, standard libraries, project structuredocs/vt-sqlite.md— Val Town SQLite usage (more up-to-date than vt.md for SQLite)docs/zen.md— OpenCode Zen API gateway docs: endpoints, pricing, model accessdocs/models.json— Model metadata: IDs, capabilities, costs, context limits, provider SDKs.claude/skills/ai-elements/— AI Elements component patterns (used as design inspiration, not directly — requires Next.js)
- Runtime: Deno (Val Town serverless)
- Backend: Hono framework
- Frontend: React 18.2.0 via esm.sh + Tailwind via CDN
- Database: Val Town SQLite
- AI Gateway: OpenCode Zen (
https://opencode.ai/zen/v1/) - Auth: Env var password (
PROMPTCOMPARE_PASSWORD) with session cookie
- All React files need
/** @jsxImportSource https://esm.sh/react@18.2.0 */ - Pin all React deps to 18.2.0 with
?deps=react@18.2.0,react-dom@18.2.0 - Use
https://esm.shfor all npm imports - SQLite: import from
https://esm.town/v/std/sqlite/main.ts(val-scoped DB) - Never use
Denoin shared/ code - Redirects: use
new Response(null, { status: 302, headers: { Location: "..." } })notResponse.redirect - Entry point:
export default app.fetchin backend/index.ts