hauvo/hau-vo-chatbot-nodejs
0
Hau Vo - AI Chatbot ๐ค
Meet Hau Vo through this interactive AI chatbot! Built with NodeJS, TypeScript, and OpenAI SDK Agents.
About This Chatbot
This chatbot represents Hau Vo (also known as Kevin), a product builder, solution architect, and software engineer with over 14 years of experience. The bot can answer questions about:
- ๐ผ Professional Background: 14+ years in tech, from Vietnam
- ๐๏ธ Technical Expertise: Product development, solution architecture, startup scaling
- ๐ Specializations: MVP development, scalable systems, cross-functional leadership
- ๐ Experience: Helping startups turn ideas into viable products
Features
- ๐ค OpenAI SDK Agents: Uses the latest OpenAI SDK with function calling capabilities
- ๐ฌ Real-time Chat: WebSocket-based chat interface using Socket.io
- ๐จ Clean UI: Modern, responsive web interface
- ๐ง Contact Recording: Automatically records user contact information
- ๐ Question Tracking: Logs unknown questions for continuous improvement
- ๐ Pushover Integration: Real-time notifications for new contacts and questions
- ๐ณ Docker Ready: Containerized for easy deployment
- ๐ค Hugging Face Compatible: Ready to deploy on Hugging Face Spaces
Quick Start
Local Development
- Clone and setup:
cd 1_foundations/nodejs-chatbot
yarn install- Environment setup:
cp .env.example .env
# Edit .env with your API keys- Run in development:
yarn dev- Build and run production:
yarn build
yarn startVisit http://localhost:3000 to start chatting!
Environment Variables
OPENAI_API_KEY: Your OpenAI API key (required)PUSHOVER_TOKEN: Pushover application token (optional)PUSHOVER_USER: Pushover user key (optional)PORT: Server port (default: 3000, Hugging Face uses 7860)
Deployment
Hugging Face Spaces
- Create a new Space on Hugging Face
- Choose "Docker" as the SDK
- Upload all files from this directory
- Set your environment variables in the Space settings
- The app will automatically deploy and be available at your Space URL
Docker
docker build -t nodejs-chatbot .
docker run -p 3000:3000 --env-file .env nodejs-chatbotArchitecture
- Backend: Express.js with TypeScript
- Real-time Communication: Socket.io
- AI: OpenAI GPT-4o-mini with function calling
- Frontend: Vanilla JavaScript with modern CSS
- Notifications: Pushover API integration
Tools Available to the AI
- record_user_details: Records user contact information when they express interest
- record_unknown_question: Logs questions the AI cannot answer for improvement
Project Structure
src/
โโโ index.ts # Main server file
โโโ chatbot.ts # Core chatbot logic
โโโ toolsService.ts # AI tools implementation
โโโ notificationService.ts # Pushover integration
โโโ types.ts # TypeScript interfaces
public/
โโโ index.html # Chat interface
me/
โโโ summary.txt # Profile summary
โโโ linkedin.pdf # LinkedIn profile dataLicense
MIT License - feel free to use this as a template for your own chatbot!
