An intelligent sales assistant powered by GPT-4 Turbo with voice interaction capabilities.
- Real-time chat with streaming responses
- Voice input and output support
- Context-aware conversations
- Professional sales agent persona
- Modern, responsive UI
- Node.js v18 or higher
- Docker and Docker Compose
- OpenAI API key
- Smallest.ai API key
- Clone the repository:
git clone <repository-url>
cd sales-agent-prototype
- Set up environment variables: Copy the example .env file and update with your API keys:
cp .env.example .env
- Start Redis using Docker:
docker-compose up -d
This will start Redis on port 6379.
- Install and start the backend server:
cd server
npm install
npm run dev
- In a new terminal, install and start the frontend:
cd client
npm install
npm run dev
The application will be available at http://localhost:3000
OPENAI_API_KEY
: Your OpenAI API keySMALLEST_AI_API_KEY
: Your Smallest.ai API keyREDIS_HOST
: Redis host (default: localhost)REDIS_PORT
: Redis port (default: 6379)JWT_SECRET
: Secret for JWT tokens
VITE_API_URL
: Backend API URLVITE_WS_PATH
: WebSocket pathVITE_WS_RECONNECT_INTERVAL
: WebSocket reconnect intervalVITE_WS_MAX_RECONNECT_ATTEMPTS
: Maximum reconnection attempts
- Frontend: React + Vite + TypeScript
- Backend: Node.js + Express + TypeScript
- Real-time: Socket.IO
- State Management: React Context
- Styling: Tailwind CSS
- Storage: Redis
- AI: GPT-4 Turbo
- Voice: Smallest.ai + Web Speech API
Backend:
npm run dev # Start development server
npm run build # Build for production
npm start # Start production server
Frontend:
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
-
Redis Connection Issues:
- Ensure Docker is running
- Check if Redis container is up:
docker ps
- Verify Redis logs:
docker-compose logs redis
-
WebSocket Connection Issues:
- Check if backend server is running
- Verify WebSocket path in frontend config
- Check browser console for connection errors
-
Voice Input Issues:
- Ensure browser has microphone permissions
- Check if audio recording is supported
- Verify WebSocket connection for streaming