Frontend-only Demo
EdgeChat provides a frontend-only demo that is completely isolated from production:
https://edgechat-demo.gdz66601.workers.dev
The demo build uses the same Vue pages, routing, state management, chat composables, and real-time message protocol as the production project. Only the runtime data source is replaced with an in-memory backend in the browser. Visitors can explore the chat UI, personal settings, admin panel, sign-in and invitation registration pages, and can try message sending, group management, user management, invitation links, and simulated Telegram message delivery.
Isolation Boundaries
| Area | Production | Demo |
|---|---|---|
| Frontend pages and application state | Production Vue code | The same code is reused |
| API and WebSocket | Cloudflare Worker and Durable Objects | In-memory browser simulation |
| Data | D1, KV, and R2 | Reset when the page reloads |
| Worker | cfchat | edgechat-demo |
| Static build directory | frontend/dist | frontend/demo-dist |
| Wrangler configuration | wrangler.toml | wrangler.demo.toml |
wrangler.demo.toml declares only Workers Static Assets. It does not bind D1, KV, R2, Durable Objects, or Cron, so deploying the demo never creates, migrates, or reuses production data resources.
Run Locally
npm install
npm run dev:demoThe default URL is http://127.0.0.1:5174. The production frontend continues to use npm run dev:frontend and its original port, so the two do not conflict.
Build and Deploy Manually
npm run build:demo
npm run deploy:demoBefore a non-interactive deployment, set the demo account's Cloudflare environment variables in the current terminal:
$env:CLOUDFLARE_ACCOUNT_ID = "demo-account-id"
$env:CLOUDFLARE_API_TOKEN = "demo-api-token"
npm run deploy:demoThese credentials are passed only through environment variables and are not written to source code or Wrangler configuration.
GitHub Actions
.github/workflows/deploy-demo.yml is an independent manual workflow triggered only from the GitHub Actions page with workflow_dispatch. Configure these additional Repository Secrets:
DEMO_CLOUDFLARE_ACCOUNT_IDDEMO_CLOUDFLARE_API_TOKEN
The workflow runs tests, builds frontend/demo-dist, and deploys edgechat-demo. It does not inspect production resources, migrate D1, initialize an administrator, prepare encryption Secrets, or read the production CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN.
