If you are on the Peking University campus network, or off-campus but connected to the PKU intranet VPN, and only want a quick trial, you can access the app directly without deployment:
If access or usage is abnormal, the website or PKU CLab platform may be under maintenance. In that case, follow the instructions below for local deployment or debugging.
Please enable an overseas proxy during runtime, otherwise some features may not work.
Node.js 20.19.5
- Go to the Node.js official website and install Node.js 20.19.5.
- Or download the archive directly: Node.js v20.19.5. After extraction, add the folder containing
node.exeto your system environment variables.
.env File
-
You must configure the
.envfile before the first run: copy.env.exampleto.env, then fill in required fields according to the comments (API key, email, etc.). -
If you need a ready-to-use
.envfile, please contact the author privately.
Database Files
- Because the database files are too large for GitHub, please download
memory.db,memory.db-shm,memory.db-wal, and thecoversfolder from PKU Cloud Disk, then place them in the project root directory.
-
Download and extract the project folder, then open the project root in VS Code.
-
Run the following command in terminal to install dependencies:
npm install
-
Update
.envand make sure:VITE_API_BASE=http://localhost:3001
-
Start the frontend:
npm run dev
-
Open a new terminal window (still in the project root) and start the backend service:
node server.js
-
Open this URL in your desktop browser:
http://localhost:5173/
Chrome or Edge is recommended for voice input support.
Mobile Access Notes
By default, mobile access requires the mobile device and computer to be on the same LAN, and the LAN must not enforce client isolation (for example, PKU campus network has client isolation, so the default method may not work).
For local testing, you can enable a hotspot on your phone and connect the computer to that hotspot.
If you need cross-network access, refer to the network configuration approach in https://github.com/doralyyyyy/QChat, or contact the author privately.
-
On desktop (VS Code), open a terminal in project root and start the frontend with
--hostso that a Network URL is shown:npm run dev -- --host
-
In terminal output, find the URL shown after Network (example):
http://192.168.1.10:5173/
-
Replace the IP in
.env(project root), change the port to backend port3001, and remove the trailing slash, for example:VITE_API_BASE=http://192.168.1.10:3001
-
After editing
.env, restart the frontend (stop and run again):npm run dev -- --host
-
Start backend service in a new terminal window:
node server.js
-
Open the Network URL shown earlier in a mobile browser (example):
http://192.168.1.10:5173/
- Node.js: You must use 20.19.5. Do not use newer or other versions, otherwise compatibility issues may occur.
- VS Code is recommended so you can open multiple terminals and monitor outputs conveniently.
- Frontend and backend must run at the same time (frontend reads
VITE_API_BASEin.envto connect to backend). - After modifying
.env, restart frontend (npm run dev) or changes will not take effect.
- When mobile accesses the desktop Network URL, mobile and desktop must be on the same LAN (or use a tunneling tool), and ensure desktop firewall allows LAN access to ports
5173and3001. - For tablets / iPad, use landscape orientation.
- On desktop, Chrome or Edge is recommended. Other browsers may not support voice input.
- Due to mobile browser limitations (lower permission level over HTTP), some mobile devices (e.g., some Huawei models) may not support voice input. On supported systems (such as iOS), make sure browser and port permissions include microphone access, and enable features similar to “smart voice input”.
- If you see a
"network"error, it means connection to overseas services failed; enable an overseas proxy. - If you see a
"not-allowed"error, microphone permission is not granted for this site. - If you see a
"Failed to fetch"error, backend configuration is likely incorrect. Follow the steps in sections 2 and 3 strictly.