I Built an AI Customer Service Platform You Can Deploy in One Click
Source: Dev.to
What It Is
An open‑source, production‑ready AI customer service platform that handles:
- 💬 Multi‑channel support – Chat, email, and SMS (via Twilio)
- 🧠 Claude AI integration – Intelligent, context‑aware responses
- 📊 Sentiment analysis – Detects frustrated customers automatically
- 🚨 Smart escalation – Knows when to hand off to humans
- 💾 Full conversation history – PostgreSQL database with analytics
- ⚡ Redis caching – Fast response times at scale
- 🔌 Real‑time WebSockets – Live updates via Socket.io
Why I Built This
Most AI customer‑service solutions fall into one of three categories:
- Enterprise‑only – Expensive and complex
- Code‑heavy – Requires weeks of setup
- Closed‑source – Not customizable
I wanted something that just works: deploy it, add your API key, and you have AI‑powered support in minutes.
The Tech Stack
// Core dependencies
- Claude AI (Anthropic) – The brain
- PostgreSQL – Conversation storage
- Redis – Session caching
- Socket.io – Real‑time connections
- Express.js – API server
- Node.js – Runtime
Key Features I’m Proud Of
Intelligent Escalation
The bot analyzes:
- Customer sentiment (positive/negative/neutral)
- Message intent (question/complaint/request)
- Conversation complexity
When frustration or confusion is detected, it automatically suggests human escalation.
Multi‑Channel Support
// Customer starts on chat
POST /api/conversations
// Switches to email
POST /api/conversations/:id/messages
// Bot maintains context across channels
Built‑in Knowledge Base
const kbArticles = await aiService.searchKnowledgeBase(query);
const response = await aiService.generateResponse(
conversation,
messages,
kbArticles
);
One‑Click Deploy
The whole stack deploys to Railway in about 60 seconds:
- Click the button
- Add your Anthropic API key
- Done – PostgreSQL and Redis are auto‑configured
Live Demo
Try it live:
The /health endpoint shows all services connected:
{
"status": "healthy",
"timestamp": "2026-04-23T00:34:08.719Z",
"ai": true
}
API Endpoints
GET /health # Health check
POST /api/customers # Create/get customer
POST /api/conversations # Start conversation
POST /api/conversations/:id/messages # Send message
GET /api/conversations # List conversations
POST /api/conversations/:id/escalate # Escalate to human
GET /api/dashboard # Analytics
How AI Responses Work
- Search knowledge base for relevant articles
- Analyze sentiment of the customer message
- Extract intent (question/issue/request)
- Generate response using Claude with context
- Check escalation – does this need a human?
- Save everything to PostgreSQL
- Broadcast via WebSocket for real‑time updates
const aiResponse = await aiService.generateResponse(
conversation,
messageHistory,
knowledgeBaseArticles
);
if (aiResponse.needsEscalation) {
await escalateToHuman(conversationId);
}
What’s Next
- Voice support (Twilio Voice API)
- Multi‑language detection
- Custom AI training on conversation history
- Slack integration
- API rate limiting per customer
Try It Yourself
- GitHub:
- Deploy:
- Stack: Node.js, Claude AI, PostgreSQL, Redis, Socket.io
Built this because I needed it for my own projects—hoping it helps others ship AI‑powered support faster. What features would you add? Drop a comment! 👇