The /api/* features (AI chat, web search, live prices, payment verification)
only work when Cloudflare runs the Pages Functions in the functions/ folder.
- Upload the CONTENTS of this folder to a new GitHub repo (so
index.htmlandfunctions/sit at the repo ROOT — not inside a subfolder). - Cloudflare Dashboard → Workers & Pages → Create → Pages → Connect to Git.
- Set these EXACTLY:
- Framework preset: None
- Build command: (leave empty)
- Build output directory:
/ - Deploy command / Custom deploy command: (leave empty — do NOT use
npx wrangler deploy)
- Save and Deploy.
- Settings → Environment variables → add your keys (ANTHROPIC_API_KEY, etc.) to Production → then Deployments → Retry deployment.
If a previous attempt set the deploy command to
npx wrangler deploy, clear it. That command deploys as a Worker and fails. Pages auto-detectsfunctions/.
Visit https://your-site.pages.dev/api/chat directly. You should see JSON
(an error about "messages" is fine). If you see the website instead, the
functions didn't deploy — re-check that functions/ is at the repo root.
This folder is ready to deploy as-is. No npm install, no build step. Just upload it to Cloudflare Pages.
The other zip (quantumai-cloudflare) contains source code that must be compiled with npm run build first. If you upload that source directly, the browser tries to run raw .jsx files it can't understand → blank white page.
This folder is already compiled to plain JavaScript, so it works when uploaded directly.
- Go to dash.cloudflare.com → Workers & Pages → Create → Pages → Upload assets.
- Name it (e.g.
quantumai). - Drag this entire folder's contents (the files, not a parent folder) into the upload box:
index.html,app.js,logo.png,_headers,_redirects, and thefunctions/folder.
- Click Deploy. Your site is live at
https://<name>.pages.dev.
Tip: select all the files inside this folder and zip them, or drag the files themselves — don't upload the folder as a single nested item, or paths break.
In the Pages project → Custom domains → add quantumai.computer and www.quantumai.computer, then point GoDaddy DNS at Cloudflare (see the main README in the source zip for exact GoDaddy steps).
These features use the included functions/ (Cloudflare Pages Functions). After deploying, add environment variables in Settings → Environment variables → Production (mark each as a Secret), then redeploy:
| Variable | Used for | Get it free at |
|---|---|---|
ANTHROPIC_API_KEY |
AXIS AI | console.anthropic.com |
BLOCKFROST_API_KEY |
Verify QAI + ADA payments (Cardano mainnet) | blockfrost.io |
ETHERSCAN_API_KEY |
Verify USDT (ERC-20) payments | etherscan.io/myapikey |
COINGECKO_API_KEY |
Faster, more reliable market data & charts (optional but recommended) | coingecko.com/en/developers/dashboard |
CMC_API_KEY |
CoinMarketCap fallback for prices (optional, extra accuracy) | coinmarketcap.com/api |
Bitcoin verification needs no key. Everything else on the site (prices, markets, charts, wallet connect, encryption vault) works without any keys.
index.html— loads React 18 (jsDelivr CDN) + the appapp.js— the entire QuantumAI site, pre-transpiled to plain JS (no JSX, no build)logo.png— app icon / favicon_redirects— SPA routing (keeps/api/*going to the functions)_headers— security headers + microphone permission for the voice assistantfunctions/api/chat.js— secure AI chat backendfunctions/api/verify-payment.js— on-chain payment verification backend
Use the quantumai-cloudflare source zip instead and let Cloudflare build it:
- Connect the repo in Cloudflare Pages with Build command:
npm run buildand Output directory:dist. That version bundles React locally (no CDN dependency). This pre-built folder is the zero-effort option.