Testing the Dashboard Integration
β Verification Steps
1. Check Build Output
ls -la /home/dashboard/out/
# Should show: index.html, _next/, accounts/, config/, logs/, metrics/
2. Verify Module Import
cd /home
python3 -c "from kiro.dashboard_static import setup_dashboard_routes; print('β OK')"
3. Check Server Logs
When starting the gateway, you should see:
Dashboard API routes registered
Dashboard static files mounted at /shin (from /home/dashboard/out)
4. Test Routes (after server starts)
Dashboard Pages
# Root page
curl -I http://localhost:8000/shin/
# Metrics page
curl -I http://localhost:8000/shin/metrics/
# Static assets
curl -I http://localhost:8000/shin/_next/static/...
API Endpoints
# Health check (no auth)
curl http://localhost:8000/api/dashboard/health
# Stats (requires auth)
curl -H "X-Dashboard-Key: your-key" \
http://localhost:8000/api/dashboard/stats
5. Browser Test
- Start gateway:
python3 main.py --port 8000 - Open:
http://localhost:8000/shin - Check:
- Page loads with animations
- Sidebar navigation works
- All routes accessible
- Charts render (may show "no data" if no traffic)
- Styles applied correctly
π― Expected Results
Server Startup
β Dashboard API routes registered
β Dashboard static files mounted at /shin
β Server running on http://0.0.0.0:8000
Browser
- Modern, animated dashboard interface
- Dark theme with gradients
- Smooth transitions and hover effects
- All pages accessible via sidebar
API
- Health endpoint returns JSON with status
- Other endpoints require X-Dashboard-Key header
- CORS not needed (same origin)
π Common Issues
Issue: 404 on /shin
Cause: Dashboard not built
Fix: npm run build
Issue: Blank page
Cause: JavaScript errors or wrong base path Fix: Check browser console, verify next.config.ts has basePath: '/shin'
Issue: API calls fail
Cause: Missing credentials or wrong API key Fix: Configure .env with PROXY_API_KEY
Issue: Styles missing
Cause: Static files not loading Fix: Check /shin/_next/ is accessible, rebuild dashboard
β Success Criteria
All of these should work:
- Dashboard builds without errors
- Module imports successfully
- Server starts and mounts /shin route
- Browser loads dashboard at /shin
- Navigation between pages works
- Animations and styles display correctly
- API endpoints respond (with proper auth)