๐Ÿงช Vertrral Cafe โ€” Backend Test Console

Single-file testing interface for all Cloudflare Pages Functions, D1, KV, R2, OpenRouter, and PayPal Sandbox integrations.

Authentication

Register

Creates user in D1, hashes password with PBKDF2, returns JWT in httpOnly cookie.

Login

Not logged in

Login sets httpOnly cookie. Logout only clears client flag โ€” cookie expires server-side.

Chat with Mocha (Barista AI)

๐Ÿ˜
neutral
โ€”
Trust Coins (server-authoritative)

Each valid chat message earns +10 TC if logged in. Rude messages may incur -30 TC penalty. 30 req/min rate limit.

Products from D1 Database

Queries SELECT * FROM products

Purchase Status & Downloads

Manual Download Test

Tokens are single-use, 15-minute TTL in KV. Download streams pre-made ZIP from R2.

PayPal Return Simulation

If PayPal Sandbox redirects back with ?token=ORDER_ID, the backend captures payment, creates a purchase record, and redirects to /?download=TOKEN. The download button appears automatically above.

API Debug Log