Lab Guide
This guide documents the Seven Hills demo currently deployed on revolutionary-century.dgcf.ovh. The first phase uses Workers AI directly. AI Gateway and MCP are intentionally reserved for later phases.
Architecture
The Worker is deployed in the David Demo Account 2 account. The Custom Domain routes all paths on this hostname to the Worker.
There is no browser-to-model connection. The browser calls the Worker, and the Worker calls Workers AI. This keeps the AI binding and the system prompt on the server side.
Frontend
The storefront is the recovered Seven Hills demo. It includes the product grid, cart drawer, product details, checkout preview, Sofia chat, and Concierge tab.
- Product images are loaded from Unsplash.
- The cart is held in browser memory and is not persisted.
- Checkout is a demonstration only. It calculates a preview and does not place a real order.
- The book icon in the navigation opens this guide at
/lab-guide.
API endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/health | GET | Basic health check and endpoint inventory. |
/api/chat | POST | Sofia shopping assistant. Accepts a message and cart items, then calls Workers AI. |
/api/concierge | POST | Enterprise Concierge flow. Accepts customer metadata and a shopping prompt. |
/api/checkout-preview | POST | Calculates cart lines, shipping, discount display, VAT-inclusive total, and a demo preview ID. |
/api/ai-gateway/status | GET | Reports whether the optional AI Gateway configuration is present. |
/api/ai-gateway/probe | POST | Optional diagnostic probes for cache, burst, and spend behavior. |
/api/mcp/status | GET | Reports the optional MCP portal connection state. |
/api/mcp/probe | POST | Optional MCP diagnostics. Not required for the current deployment. |
Chat request example
The response contains response. Product IDs in square brackets are used by the frontend to render product cards.
Worker configuration
| Name | Type | Current use |
|---|---|---|
AI | Workers AI binding | Active. Direct inference for Chat and Concierge. |
AI_GATEWAY_URL | Optional variable/secret | Not configured in phase 1. Enables the later AI Gateway path. |
MCP_SERVER_URL | Optional variable/secret | Not configured in phase 1. Enables the later MCP portal path. |
MCP_CLIENT_ID | Optional secret | Reserved for future AI Gateway Access or MCP authentication. |
MCP_CLIENT_SECRET | Optional secret | Reserved for future AI Gateway Access or MCP authentication. |
Important: Workers AI is a server-side binding. The browser never receives credentials for Workers AI.
Next phases
AI Gateway
Set AI_GATEWAY_URL and the required Access credentials, then route the OpenAI-compatible request through the gateway. This adds centralized logging, caching, rate controls, and policy enforcement.
MCP
Set MCP_SERVER_URL and its client credentials. The existing bundle contains guarded tool-calling logic for inventory and operations data. MCP results are validated before being shown to the model or user.
Security hardening
Before using this outside the lab, replace the embedded challenge prompt and promotional value. A prompt is not a security boundary, and anything bundled into Worker code should be treated as recoverable by an authorized code reader.