AI voice assistant for workers with real-time analytics, mobile-friendly web UI, and Docker deployment
A complete production system that lets you deploy an AI voice assistant for your team that:
- π¬ Talks naturally with workers (hands-free, voice-first)
- π Tracks everything automatically (tasks, issues, supplies, sentiment)
- π± Works on mobile (responsive web interface)
- π Deploy anywhere (Docker, cloud platforms, VPS)
- βοΈ Configure via web UI (no code editing needed!)
Perfect for: Warehouses, field teams, delivery drivers, construction sites, restaurants, retail - any mobile workforce!
cd tribes/business-voice
npm install
npm run server
# Open in browser:
# http://localhost:3000cd tribes/business-voice
# Create .env file
cp .env.example .env
# Edit .env and add OPENAI_API_KEY
# Start with Docker
docker-compose up -d
# Access at:
# http://localhost:3000See DEPLOYMENT.md for:
- Railway.app (1-click deploy)
- DigitalOcean App Platform
- Fly.io
- Self-hosted VPS
Home Page (/)
- System overview
- Quick actions
- Real-time status
Setup Page (/setup)
- Configure agent personality
- Set tracking keywords
- Manage workers
- Test OpenAI API key
Dashboard (/dashboard)
- Live analytics
- Activity feed (updates every 3 seconds)
- Worker performance metrics
- Real-time notifications
Voice Interface (/voice)
- Start voice conversations
- Real-time transcription
- Automatic tracking
From natural conversations, it detects and logs:
| Worker Says | System Detects | Action Taken |
|---|---|---|
| "Finished loading truck 5" | Task completion | β Logs task, updates count |
| "The forklift is broken" | Issue report | π« Creates ticket, alerts manager |
| "We need more boxes" | Supply request | π¦ Adds to order list |
| "How many left today?" | Help request | π Tracks support needs |
- Responsive layout (works on any device)
- Touch-optimized interface
- Works offline (PWA ready)
- Add to home screen capability
- Fast loading (< 1 second)
- Docker: One-command deployment
- Docker Compose: Multi-container setup
- Nginx: Reverse proxy with rate limiting
- Health checks: Built-in monitoring
- Logging: Structured logs
- Security: CORS, rate limiting, input validation
business-voice/
βββ π public/ # Web interface
β βββ index.html # Home page
β βββ setup.html # Configuration UI
β βββ dashboard.html # Analytics dashboard
β βββ css/style.css # Mobile-first styles
β βββ js/
β βββ app.js # Core functionality
β βββ setup.js # Setup page logic
β βββ dashboard.js # Dashboard updates
β
βββ π€ src/ # Backend
β βββ server.js # Main Express server
β βββ voice-agent.js # AI agent logic
β βββ demo.js # Text-based demo
β βββ dashboard.js # Old dashboard (legacy)
β
βββ βοΈ config/
β βββ agent-config.js # Agent configuration
β
βββ π³ Docker setup
β βββ Dockerfile # Container image
β βββ docker-compose.yml # Multi-container config
β βββ nginx/
β βββ nginx.conf # Reverse proxy config
β
βββ π Documentation
β βββ README.md # This file
β βββ DEPLOYMENT.md # Deploy anywhere guide
β βββ .env.example # Environment template
β
βββ π¦ Configuration
βββ package.json # Dependencies & scripts
βββ .gitignore # Git exclusions
βββ .dockerignore # Docker exclusions
Visit: http://localhost:3000/setup
- Add your OpenAI API key
- Configure agent name and voice
- Set tracking keywords
- Add your workers
Everything is saved automatically!
Visit: http://localhost:3000/dashboard
See real-time:
- Active workers
- Tasks completed
- Issues reported
- Supply requests
- Live activity feed
Visit: http://localhost:3000/voice
- Select worker
- Start conversation
- Talk naturally
- Everything tracked automatically
Go to /setup and configure everything visually!
Edit config/agent-config.js:
module.exports = {
agent: {
name: "WorkMate", // Agent name
voice: "alloy", // Voice style
systemPrompt: "You are..." // Personality
},
analytics: {
taskCompletion: {
keywords: ["finished", "completed", "done"],
action: "log_completion"
},
// Add your own tracking...
},
workers: {
"W001": { name: "John", role: "Warehouse", shift: "morning" }
}
}# Get current config
GET /api/config
# Update agent settings
POST /api/config/agent
{
"name": "WorkMate",
"voice": "alloy",
"systemPrompt": "You are..."
}
# Update keywords
POST /api/config/analytics
{
"taskCompletion": {
"keywords": ["done", "finished"],
"action": "log_completion"
}
}
# Add worker
POST /api/config/workers
{
"workerId": "W001",
"name": "John",
"role": "Warehouse",
"shift": "morning"
}
# Delete worker
DELETE /api/config/workers/:workerId# Get analytics
GET /api/analytics
# Log activity
POST /api/activity
{
"workerId": "W001",
"type": "task_completion",
"text": "Finished loading truck 5"
}
# Start voice session
POST /api/voice/start
{
"workerId": "W001"
}# Health check
GET /health
# Test API key
POST /api/test/openai
{
"apiKey": "sk-..."
}
# List voices
GET /api/voicesUsing ngrok (for mobile testing):
# Terminal 1: Start server
npm run server
# Terminal 2: Expose publicly
ngrok http 3000
# Share URL with anyone!
# https://abc123.ngrok.ioUsing Railway.app:
npm install -g @railway/cli
railway login
railway init
railway up
# Live at: https://your-app.railway.appSee DEPLOYMENT.md for complete guides:
- βοΈ Cloud platforms (Railway, Fly.io, DigitalOcean)
- π₯οΈ Self-hosted VPS
- π SSL certificate setup
- π± Mobile testing
- π³ Docker deployment
# 1. Find your local IP
ifconfig | grep "inet " # Mac/Linux
ipconfig # Windows
# 2. Start server
npm run server
# 3. On phone, visit:
http://192.168.1.XXX:3000# 1. Start server
npm run server
# 2. Expose with ngrok
ngrok http 3000
# 3. Visit the https URL on any device!On mobile browser:
- Visit your deployed site
- Tap "Share" β "Add to Home Screen"
- App icon appears!
# Install
npm install
# Development (auto-reload)
npm run dev
# Production
npm run server
# Demo (no API key needed)
npm run demo# Build
npm run docker:build
# Start
npm run docker:up
# Stop
npm run docker:down
# Logs
npm run docker:logsCreate .env:
# Required
OPENAI_API_KEY=sk-proj-your-key-here
# Optional
WORKER_ID=W001
PORT=3000
NODE_ENV=productionWorker: "Finished packing order 1234"
Agent: "Great! That's your 15th order. Next is 1235."
π Tracks: productivity, completion time, order count
Worker: "At the Johnson site, AC unit needs part AC-2847"
Agent: "Got it. I'll have it shipped to your next location."
π Tracks: job progress, parts needed, location
Worker: "Delivered to 123 Main St"
Agent: "Perfect! 12 done. Next stop: 456 Oak Ave."
π Tracks: deliveries, routes, timing
Worker: "Running low on tomatoes"
Agent: "Added to order. ETA 2pm. Need anything else?"
π Tracks: inventory, supply usage
Built-in security features:
- β API key validation
- β Rate limiting (nginx)
- β CORS configuration
- β Input sanitization
- β Environment variables (no hardcoded secrets)
- β HTTPS support (production)
- β Health checks
- β Graceful shutdowns
Before sharing externally:
- Add your
.envfile (never commit!) - Enable HTTPS (Let's Encrypt)
- Configure rate limits
- Review CORS settings
- Set up monitoring
Optimizations:
- Gzip compression (nginx)
- Static file caching
- Real-time updates (3s intervals)
- Lazy loading
- Mobile-first design
- < 1s load time
Scaling:
- Docker Compose (multi-container)
- Horizontal scaling ready
- Database-agnostic design
- Stateless architecture
# Check if server is running
curl http://localhost:3000/health
# Check Docker logs
docker-compose logs -f
# Restart
npm run server- Same WiFi network?
- Firewall blocking port?
- Use local IP, not localhost
- Get fresh key: https://platform.openai.com/api-keys
- Check
.envfile - Test via
/setuppage - Restart server
# Rebuild from scratch
docker-compose down
docker-compose build --no-cache
docker-compose up- DEPLOYMENT.md - Complete deployment guide
- config/agent-config.js - Configuration reference
- API Reference - REST API docs
This is part of Agentic Tribe. Contributions welcome!
- Fork the repo
- Create your feature branch
- Test thoroughly
- Submit pull request
MIT License - Use freely!
π¨ New Features:
- β Complete web UI (setup, dashboard, voice)
- β Mobile-responsive design
- β Docker deployment
- β Real-time analytics dashboard
- β Configuration via web interface
- β Worker management system
- β API key validation
- β Nginx reverse proxy
- β Health monitoring
- β Comprehensive deployment guide
π± Mobile Experience:
- Touch-optimized interface
- Add to home screen (PWA)
- Works offline
- Fast loading
- Responsive design
π³ DevOps:
- Docker containerization
- Docker Compose setup
- Health checks
- Graceful shutdown
- Structured logging
- Rate limiting
- Home: http://localhost:3000
- Setup: http://localhost:3000/setup
- Dashboard: http://localhost:3000/dashboard
- API Docs: http://localhost:3000/api/config
- Health: http://localhost:3000/health
Built with:
- OpenAI Realtime API
- Node.js + Express
- Docker + Docker Compose
- Nginx
- Vanilla JavaScript (no frameworks!)
Part of Agentic Tribe - Find Your Tribe. Build Together.
π https://ruv.io/tribe