Challenge: Build a plug-and-play platform that helps developers create custom chat agents in just a few steps. These agents should be powered by LLMs (like Groq) and work with content stored in Contentstack.
I built a complete Chat Agent Platform that solves the exact requirements:
- Streaming Chat API (
/chat/send) with real-time token streaming via SSE - Multi-Provider Support - OpenAI, Groq , Gemini with automatic fallback
- Contentstack Integration - Connects to Delivery APIs using MCP to fetch content dynamically
- Domain-Specific Querying - Handles travel tours, recipes, and any Contentstack content type
- Lightweight React SDK published as
doke-chat-sdkon npm - React Hooks Integration (
useChatStream) for seamless state management - Plug-and-Play Widget - Embed in any React/Next.js app with 3 lines of code
- Zero Backend Knowledge Required - Developers just install and configure
| Requirement | Our Implementation |
|---|---|
| LLM Streaming | β Real-time SSE token streaming with multiple providers |
| Contentstack MCP | β Dynamic content fetching via Delivery APIs |
| Developer-Friendly | β
npm install doke-chat-sdk β Ready to use |
| Domain-Specific | β Travel: "Tours for Italy under β¬500", Recipe: "Veg pasta recipes" |
| React Hooks | β
useChatStream hook for complete chat management |
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Chat SDK β β Backend API β
β (Next.js) βββββΊβ (doke-chat-sdk) βββββΊβ (Node.js) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βΌ
βββββββββββββββββββ
β LLM Providers β
β OpenAIβGroqβetc β
βββββββββββββββββββ
npm install doke-chat-sdkimport { ChatWidget } from "doke-chat-sdk";
export default function App() {
return (
<div className="h-screen">
<ChatWidget
apiBaseUrl="https://chatbot-0ij7.onrender.com"
provider="groq"
/>
</div>
);
}Users add their stack credentials in the chat settings:
- Stack API Key
- Delivery Token
- Environment
That's it! The chatbot now answers questions from their Contentstack content.
Query: "What tours are available for Italy?"
Response: The AI fetches from Tour content type, filters by destination, and presents:
- "Rome Historical Tour - β¬299"
- "Venice Canal Experience - β¬450"
- "Tuscany Wine Tour - β¬380"
Query: "Veg pasta recipe"
Response: Fetches from Recipe content type and returns:
- "Veggie Pasta Primavera with ingredients and step-by-step instructions..."
- Node.js + Express server
- Server-Sent Events (SSE) for streaming responses
- Contentstack Delivery API integration via MCP
- Provider fallback logic (OpenAI β Groq β Anthropic)
- Content-aware querying with semantic search
- React components with TypeScript
- useChatStream hook for state management
- TailwindCSS for styling
- Rollup bundling for npm distribution
- Zero external dependencies (except React)
- Dynamic stack configuration - users connect their own stacks
- Content type detection - automatically handles Tours, Recipes, etc.
- Real-time content fetching via Delivery API
- MCP-compliant content delivery integration
| PS1 Requirement | β Implementation |
|---|---|
| LLM API with streaming | Real-time SSE streaming with token-by-token delivery |
| Multiple LLM providers | OpenAI, Groq, Anthropic with automatic fallback |
| Contentstack MCP integration | Dynamic content fetching via Delivery APIs |
| Lightweight Chat SDK | Published doke-chat-sdk package on npm |
| React Hooks support | useChatStream hook for complete chat management |
| Easy embedding | 3-line integration in any React app |
| Domain-specific agents | Travel tours, recipes, and extensible content types |
| Minimal setup | Zero backend knowledge required for developers |
π Live Demo: https://chatbot-rho-liart-17.vercel.app
π¦ NPM Package: https://www.npmjs.com/package/doke-chat-sdk
π Backend API: https://chatbot-0ij7.onrender.com
git clone https://github.com/22Yash/Chatbot.git
cd Chatbot/backend
npm install
npm run server # Runs on http://localhost:3000cd frontend
npm install
npm run dev # Runs on http://localhost:3001cd sdk
npm install
npm run build # Builds the SDK package- Problem Introduction - Show complexity of building chat agents
- Our Solution Demo - Live chat with travel/recipe queries
- Developer Experience -
npm installβ working chatbot in 30 seconds - Contentstack Integration - Show dynamic stack configuration
- SDK Usage - Multiple integration patterns (floating, inline)
Try these in the live demo:
Travel Queries:
- "Mumbai tour "
- "Beach destinations in Goa"
- "Italy tour"
Recipe Queries:
- "Quick veg dinner recipe"
- "Paneer butter masala ingredients"
- "Veg Manchurain "
β
Complete Problem Solution - Addresses every requirement in PS1
β
Production Ready - Live demo, deployed backend, published SDK
β
Developer Experience - Actually easy to use (npm install β done)
β
Contentstack Native - Built specifically for Contentstack workflows
β
Extensible - Works with any content type, not just travel/recipes
β
Modern Tech Stack - React, Node.js, streaming APIs, hooks
Built by: Yash Doke
For: TechSurf 2025 Hackathon - Problem Statement 1
Powered by: Contentstack, Groq, OpenAI, Vercel, Render
MIT Β© 2025 - Feel free to use this SDK in your projects!
Ready to revolutionize how developers build chat agents with Contentstack! π―