Rival Reimagined — for an AI-first era.

One Schema and One Program to rule them all.

Step 0 / 0 Press → or click Next to begin. Use ← to go back.
Messages answer payload messages[] / next question domain event JS program
Authoring
Researcher
describes study
Claude / Any AI Client
Researcher describes study in plain language
calls
Authoring Server
First-class MCP. Designs flow, writes JS program, runs automated validation.
via
AI Gateway
Anthropic. Logging, caching, cost tracking across all LLM calls.
renders UI
Authoring UI
Auto-generated from schema. Researcher reviews, edits, approves before publish. Human in the loop.
approved — publish
R2Study Store
One JSON schema + JS program. Single source of truth.
schema.json + program.js
translations/  en · fr · de · … (parallel, publish-time) Claude
Responding
Respondent
opens URL
Worker per Respondent
Isolated runtime. Own memory. Own state. Hibernates between questions.
executes
JSJS Survey Program
Runs live. Calls APIs mid-session. Adapts per respondent. Builds dynamic cards.
calls
Workers AI
Edge inference. Embeddings, probing, adaptive logic. Runs inside the Worker. No round-trip.
via Hyperdrive
PostgreSQL
Neon / Aurora. Response rows land here first via Hyperdrive.
connector
ClickHouse
PostgreSQL connector syncs rows in. Self-describing data. Queryable instantly.
Analytics
DataTalk MCP
Any MCP client — Claude, any AI agent — queries in plain language. No export needed.
via
AI Gateway
Claude translates plain language to ClickHouse SQL. Logged, cached, cost-tracked.
insight
Researcher asks a question, gets an answer — no analyst, no export, no wait
views
Analytics Dashboard
Runs on ClickHouse. Same data, same source. Charts that know what they render.
Observability
Tail Worker
Intercepts all Worker logs at the edge. PII redacted structurally before anything is persisted. Developers get full log access, zero respondent data exposure.
ships to
Workers Logs + Traces
Native CF. Structured log search, distributed tracing via OpenTelemetry. Full production visibility. No extra vendor. Part of the CF bill.
+
PostHog
Product analytics. Funnels, feature flags, session insight. Different game. Not replaced by CF observability.
Testing
node Headless Test Runner
Runs the JS program directly as a script. No Worker, no infra. Every path validated before any respondent sees the survey. Runs locally or on CI.
or
Synthetic Respondents
Feed schema + JS program + persona to an LLM. Get a complete response set back. No live infra needed for generation. A Playwright swarm then submits those responses through the normal Worker path, same as a real respondent. No websocket interception. No special synthetic mode.
One schema. Eight consumers.

Every part of the platform reads from the same artifact. No sync jobs. No compiler in the critical path. No drift between what was authored and what runs.

JavaScript: Claude authors it correctly on the first pass. 30 years of training data. No proprietary DSL.
One schema: no drift, no sync, no compiler bottleneck. Add a card type in an afternoon.
Live runtime: fetch() calls, adaptive logic, dynamic cards. If JavaScript can do it, the survey can do it.
Isolated sessions: 1,000 respondents, 1,000 independent programs. A crash in one affects no one else.
Direct data access: answer lands in ClickHouse. Queryable instantly. No ETL, no Kafka, no Redshift, no Sisense.
One researcher, full loop: brief to toplines without leaving the platform. No handoffs. No analysts in the critical path.