Sh.
0%
TeaBlendAI – AI-powered Tea Auction Platform preview 1

Key Features & Highlights

Digital Auction Management — Create, manage, and monitor tea auction lots and bidding activities.
AI-Powered Chatbot — Natural-language interaction with tea data, analytics, industry knowledge, and auction operations.
Advanced Analytics Dashboard — Interactive insights into auctions, sales, purchases, blends, and buyer behavior.
MCP & LangChain Integration — Modular AI architecture connecting databases, web search, visualizations, and auction tools.
High-Performance Data Platform — DuckDB OLAP, analytics snapshots, and optimized data processing for fast business insights.

Technologies & Architecture

Next.js 16 (App Router)TypeScript 5.9Tailwind CSS v4Shadcn UI / Lucide ReactRechartsFastAPIWebsocketPython 3.11+DuckDB — OLAP / analytical processingMicrosoft SQL Server (MSSQL)Google Gemini 1.5 FlashModel Context Protocol (MCP)LangChainTavily Search API

Business Value & Impact

TeaBlendAI enables tea businesses to make faster, data-driven decisions by providing real-time insights into auction performance, pricing, procurement, blend profitability, inventory, and buyer behavior. It improves price transparency and helps sellers and buyers identify profitable market opportunities. The AI Chatbot further increases operational efficiency by allowing users to query business data, access Ceylon tea knowledge, generate visual insights, and manage authorized auctions through natural language. This reduces manual work and makes complex tea-market intelligence more accessible.

TeaBlendAI – AI-powered Tea Auction Platform

Live Demo

About Project

TeaBlendAI is an industry-focused digital platform designed to modernize the Sri Lankan tea auction and trading process by combining online tea auctions, business analytics, AI-powered insights, and conversational automation in one system.

The platform enables tea producers, sellers, buyers, and administrators to manage and analyze tea auction activities digitally. Users can work with auction lots, bidding, purchases, tea grades, suppliers, blends, and buyer activity while gaining insights through interactive analytics dashboards.

A key part of the platform is its AI-powered chatbot, which allows users to interact with the system using natural language. Instead of manually searching through different pages and reports, users can ask questions about auction and business data, obtain tea-industry information, generate visualizations, and—where authorized—perform auction-related operations through conversation.

My Contribution to this Project

AI Chatbot & MCP Platform

What the module does

I developed an AI-powered conversational assistant that allows users to interact with TeaBlendAI using natural language for business analytics, Ceylon tea knowledge, data visualization, and authorized auction operations. The chatbot supports multi-turn conversations and can generate dynamic charts, tables, and interactive auction actions.

How I implemented it

I built the platform using Next.js, FastAPI, LangChain, Google Gemini, and Model Context Protocol (MCP). I designed and implemented four specialized MCP servers, each responsible for a specific capability: • tea_database — Converts natural-language business questions into T-SQL queries, validates them using read-only SQL safety rules, executes them against the database, and returns structured analytical data. • tea_search — Performs web-based Ceylon tea research using Tavily and Gemini, allowing the assistant to answer domain-specific questions about tea regions, grades, production, brewing, and market knowledge. • tea_visualization — Transforms analytical datasets into dynamic Chart.js configurations and structured tables, enabling the chatbot to present results as interactive visualizations. • tea_auction — Provides controlled access to auction management operations, including creating, retrieving, updating, and deleting auctions while enforcing seller authorization and validation. Beyond the MCP layer, I implemented natural-language-to-SQL generation, intent classification, parameter extraction, multi-turn slot filling, conversation-state persistence, timezone-aware date/time parsing, and AI-generated auction descriptions. The frontend provides a rich conversational experience with interactive charts, tables, auction cards, confirmation actions, dynamic form inputs, conversation search, and PNG/CSV export functionality.

Technical Challenges & Solutions

I addressed challenges such as unsafe AI-generated SQL, ambiguous natural-language inputs, lost conversation state, and MCP subprocess handling on Windows. I implemented SELECT-only SQL validation, two-level AI guardrails, timezone-aware parameter extraction, MSSQL-backed conversation persistence, and resilient MCP client management to improve security and reliability.

Analytics Dashboard Module

What the module does

I developed a comprehensive analytics platform that provides insights into tea auctions, sales, purchases, blend profitability, and buyer behavior through KPIs, interactive charts, and analytical tables. The dashboard transforms complex tea-industry data into practical business insights for monitoring performance and decision-making.

How I implemented it

I built five responsive analytics views using Next.js, TypeScript, Recharts, FastAPI, MSSQL, and DuckDB, connecting frontend dashboards to dedicated backend analytics repositories and REST APIs. I also implemented a Kimball-based OLAP data model, asynchronous snapshot generation, and SWR-style polling with stale-data fallback for reliable and efficient analytics delivery.

Technical Challenges & Solutions

The main challenge was handling complex analytical queries without impacting the operational database or dashboard performance. I addressed this using DuckDB columnar analytics, pre-aggregated data snapshots, asynchronous background processing, and optimized repository queries, significantly improving analytical query performance while maintaining reliable data refresh and fallback behavior.