A marketplace you can just talk to.
-Tell the agent what you want. It searches, compares, lists your stuff and runs the checkout, right here on the page. You can also restyle the whole page from the chat.
-diff --git a/.gitignore b/.gitignore index c96d75d..87fa21b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ __pycache__/ node_modules/ screenshots/ .env +static/dist/ diff --git a/README.md b/README.md index f386a0a..270a3b3 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ sell products or services. ## How it works ``` -browser (static HTML/JS) ──/api/chat──▶ tiny server ──▶ hosted LLM (OpenAI-compatible) +browser (React SPA) ─────/api/chat──▶ tiny server ──▶ hosted LLM (OpenAI-compatible) ▲ renders UI actions │ or the rule-based fallback agent │ ├── /api/payments/* ── mock test-mode provider ── signed webhook └── card form posts straight ────────┘ @@ -38,7 +38,7 @@ The server stays small on purpose. It does three things: ### Look and layout (agent-controlled, per visitor) The agent can restyle the whole page from chat with one action, `set_theme`. Its payload is a JSON theme spec: design tokens applied as CSS variables. The model never sends raw HTML or JS. The server checks every value -(`market/theme.py`), and the browser applies the result (`static/theme.js`). +(`market/theme.py`), and the browser applies the result (`web/src/theme/engine.ts`). | Area | Spec keys | |---|---| @@ -115,12 +115,76 @@ The landing view doesn't call the model either. Set `AGENT_MARKET_LLM_EVENTS=1` With no LLM configured, the demo runs the **rule-based fallback agent**. The page labels this. +## Frontend (React + Vite + TypeScript) + +The page is a React single-page app in `web/`. The Python server and API are unchanged, except that `/` now serves +the built `static/dist/index.html` and `/static/dist/assets/*` serves the hashed JS/CSS bundles. + +``` +web/ + index.html # declares `@layer base, user, protected;` first, then - -
- - -Tell the agent what you want. It searches, compares, lists your stuff and runs the checkout, right here on the page. You can also restyle the whole page from the chat.
-