console/packages/console-frontend/README.md
The frontend for the iii Developer Console, built with React 19, TypeScript 5, and Vite 7.
# Install dependencies (from monorepo root)
pnpm install
# Start development server
cd packages/console-frontend
pnpm dev
The console will be available at http://localhost:3113
The console frontend operates in two modes:
pnpm dev for active developmentpnpm build:binaryconsole-rust package)window.__CONSOLE_CONFIG__Configure the console to connect to your iii engine instance:
| Variable | Description | Default |
|---|---|---|
VITE_III_ENGINE_HOST | Engine hostname | localhost |
VITE_III_ENGINE_PORT | Engine REST API port | 3111 |
VITE_III_WS_PORT | Engine WebSocket port | 3112 |
Create a .env file in the packages/console-frontend directory:
VITE_III_ENGINE_HOST=localhost
VITE_III_ENGINE_PORT=3111
VITE_III_WS_PORT=3112
Or export them in your shell:
export VITE_III_ENGINE_HOST=localhost
export VITE_III_ENGINE_PORT=3111
export VITE_III_WS_PORT=3112
To connect to a remote iii engine instance:
# Option 1: Inline environment variables
VITE_III_ENGINE_HOST=192.168.1.100 pnpm dev
# Option 2: Multiple variables
VITE_III_ENGINE_HOST=192.168.1.100 VITE_III_ENGINE_PORT=4000 pnpm dev
# Option 3: .env file
echo "VITE_III_ENGINE_HOST=192.168.1.100" > .env
echo "VITE_III_ENGINE_PORT=4000" >> .env
pnpm dev
| Script | Description |
|---|---|
pnpm dev | Start development server on port 3113 |
pnpm dev:standalone | Start development server with network access (--host) |
pnpm build | Build production assets to dist/ |
pnpm build:binary | Build production assets for Rust binary to dist-binary/ |
pnpm lint | Run Biome linter on source files |
pnpm lint:fix | Run Biome linter and auto-fix issues |
pnpm format | Format source files with Biome |
pnpm preview | Preview production build locally |
Symptom: Console shows "Failed to fetch status" or "Connection refused"
Solutions:
Verify iii engine is running:
curl http://localhost:3111/_console/status
Check environment variables:
echo $VITE_III_ENGINE_HOST
echo $VITE_III_ENGINE_PORT
Ensure ports match your engine configuration:
For remote connections, verify firewall rules allow access to engine ports
Symptom: Changes to source files don't reflect in the browser
Solutions:
Restart the dev server:
pnpm dev
Clear Vite cache:
rm -rf node_modules/.vite
pnpm dev
Check for TypeScript errors:
pnpm build
Verify file watcher limits (Linux):
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Symptom: Error: Port 3113 is already in use
Solutions:
Kill the process using port 3113:
# macOS/Linux
lsof -ti:3113 | xargs kill -9
# Windows
netstat -ano | findstr :3113
taskkill /PID <PID> /F
Use a different port:
# Edit vite.config.ts and change server.port, or:
PORT=3114 pnpm dev
Check for zombie Vite processes:
ps aux | grep vite
kill <PID>
Symptom: Real-time updates not working, WebSocket errors in console
Solutions:
Verify WebSocket port is correct:
echo $VITE_III_WS_PORT
Test WebSocket connection directly:
# Use websocat or wscat
wscat -c ws://localhost:3112
Check browser console for specific WebSocket errors
Ensure no proxy or firewall is blocking WebSocket connections
Symptom: pnpm build or pnpm build:binary fails
Solutions:
Clean and reinstall dependencies:
rm -rf node_modules
pnpm install
Check TypeScript errors:
pnpm exec tsc --noEmit
Verify Node.js version (requires >= 18):
node --version
Clear TypeScript build cache:
rm -rf tsconfig.tsbuildinfo
src/api/client.ts - handles dual-mode configurationsrc/components/ui/src/routes/ (auto-generates routeTree.gen.ts)