Development Guide
It’s recommended to complete the Quick Start once before doing local development to ensure the basic environment and
.envconfiguration are usable.
Frontend
Dependencies
- Node.js >= 18
- npm (or pnpm / yarn; examples use npm by default)
Recommendation: use
nvmto manage Node versions and keep them consistent.
Installation & CLI Debugging
Common Issues (Frontend)
- Node version too low: upgrade to Node 18+; check with
node -v. - Slow or failed dependency installation: configure a mirror registry or retry; use
pnpmif needed. - Blank page after build: ensure the backend is running, static paths are correct, and check the browser console for CORS or 404 errors.
Backend
The backend runs in a container by default (Sanic + Python); no need to install Python on the host. The following commands assume Docker/Compose are available.
Debugging (CLI)
Port: the backend listens on
8000by default (container mapped to the host). Static assets: frontend build artifacts are inserver/static/app, served directly by the backend in debug mode.
VS Code Quick Debug
Use the Command Palette (Cmd/Ctrl + Shift + P), type Preferences: Open Keyboard Shortcuts (JSON), and add:
Logs & Observability
Common Issues (Backend)
.envparsing error (python-dotenv could not parse)APP_CONFIGSmust be single-line valid JSON with no trailing commas or comments.- “Unknown application” page
The
TC_SECRET_ID/KEYused lack permission for the app; grant access on the platform side or use credentials with the required permissions. - Voice input unavailable Tencent Cloud ASR real-time recognition is not enabled, or the browser is not using HTTPS.
Makefile Quick Reference
| Command | Purpose |
|---|---|
make init_client | Install frontend dependencies (first run) |
make client | Build frontend; outputs to server/static/app |
sudo make pack | Build/package backend and deployment images |
sudo make deploy | Start services via Docker Compose |
sudo make debug | Start backend container in bind-mount mode (no rebuild) |
sudo make logs | View runtime logs |
sudo make url | Generate a demo login URL (URL redirection example) |