admin dashboard - https://support-bot-2-125j.onrender.com/ github repo - https://github.com/FahadIslam09/support-bot-2 connected facebook page - https://www.facebook.com/fahadislam.xyz/

Meta Developer App Under Review

The Meta Developer app is currently in Testing Mode and has not yet been verified for production.

Once the Business Verification process is completed, the Meta Developer app will be switched to Live Mode. At that point, the AI bot will be able to receive and respond to messages from any Facebook account.

For now, while the app remains in Testing Mode, it can only respond to messages sent from my Facebook account.

Inspiration

In emerging markets like Bangladesh, Facebook Messenger isn't just a communication tool—it's the primary storefront for thousands of small and medium businesses (SMBs). However, shop owners struggle to manage the sheer volume of 24/7 customer queries. If a customer messages a page at 2 AM asking for a price and doesn't get a response, that's a lost sale. We were inspired to bridge this gap by building a fully autonomous, hyper-localized AI sales assistant that acts like an experienced, friendly local shopkeeper who knows the inventory, calculates delivery fees, and closes sales.

What it does

Ai Support Bot is a fully automated AI sales assistant and CRM dashboard tailored for local Facebook shops.

  • For Customers: It chats in native Bengali, detects product images, quotes exact prices in BDT (৳), calculates dynamic delivery fees based on their location, and gracefully handles out-of-stock inquiries.
  • For Shop Owners: It provides a beautiful, centralized admin dashboard (inspired by modern SaaS design) to manage live product inventory, view chat history, configure AI persona settings, and toggle the bot on/off.

How we built it

We built a robust, full-stack application designed for speed and reliability:

  • Backend: Node.js with Express.js to handle the complex Facebook Webhook verifications and event parsing.
  • Database: Neon Serverless Postgres integrated with Drizzle ORM for lightning-fast, type-safe queries. The database stores the business configuration, live product inventory, and customer chat histories.
  • AI Engine: We utilized Google's Gemini 3.5 Flash model. We engineered a strict, localized Bengali system prompt that forces the AI to check the live inventory table before making any product claims.
  • Frontend: A custom CRM Admin Dashboard built from scratch using Vanilla JS, HTML, and CSS to guarantee ultra-fast load times without the overhead of heavy frameworks.

Challenges we ran into

  1. The "Rapid-Fire" Message Problem: Customers on Messenger send 4-5 rapid, short messages (e.g., "Hi", "Are you there?", "I want this", "[Image]"). If we triggered the AI on every webhook event, it would reply 5 times and hallucinate. We solved this by implementing an asynchronous debounce buffer that queues messages by PSID (Page-Scoped ID) and processes them as a single logical block after a short delay.
  2. AI Hallucinations: Chatbots love to say "Yes, we have that!" even when they don't. We had to build strict guardrails into the prompt architecture to cross-reference user queries strictly against the dynamically injected Drizzle ORM inventory payload.
  3. Webhook Abuse: To protect our API credits from malicious spam, we had to implement an in-memory sliding-window rate limiter (15 requests/minute).

Accomplishments that we're proud of

  • Successfully taming a generative AI model into acting strictly as a reliable sales agent without breaking character or inventing non-existent products.
  • Engineering a completely custom, beautiful UI from scratch without relying on Bootstrap or Tailwind, giving our platform a premium SaaS feel.
  • Implementing an extremely fast database connection layer using Neon serverless Postgres and Drizzle ORM, ensuring our webhook responds back to Facebook well within their strict timeout limits.

What we learned

We learned how to orchestrate real-time third-party webhooks with LLM context windows efficiently. We pushed the boundaries of prompt engineering in non-English contexts, teaching the model to understand local nuances like "ভাইয়া" (Brother) and quoting prices dynamically.

What's next for Ai Support Bot

  • WhatsApp Integration: Expanding beyond Facebook Messenger to support WhatsApp Business API.
  • Analytics Dashboard: Adding deep graphs and metrics to show business owners exactly how much revenue the AI bot has generated for them.
  • Automated Checkout: Sending dynamic payment gateway links directly in the chat to seamlessly collect payments.
  • Voice Message Understanding: Enabling the AI to understand and respond to customer voice messages using speech-to-text and natural language processing for a more natural support experience.
  • Image Responses: Allowing the AI to send product images, catalogs, promotional banners, invoices, and other relevant images directly to customers during conversations.
  • Multimodal Conversations: Supporting seamless communication through text, voice, and images within a single conversation, making interactions feel more human and engaging.

Built With

Share this project:

Updates

Submission history