Frontend & UI Features, Functionality Features, and Tech Highlights of your chatbot
🎨 Frontend & UI Features
-
Responsive Chat Layout
-
Mobile-first design with max-width of 480px (perfect for mobile devices).
-
Full-height chat interface (
height:100vh
) with center alignment.
-
-
Chat Header
-
Bot profile image (circular with border).
-
Bot name “Excel Tech Bot” and online status indicator.
-
Language selection dropdown (English, Hindi, Malayalam) in the header.
-
-
Chat Messages Section
-
Scrollable conversation area (
overflow-y:auto
). -
User messages: Green (
#dcf8c6
) with right-side alignment (WhatsApp style). -
Bot messages: White with border, left-side alignment.
-
Rounded bubble-style chat design with timestamps.
-
-
Typing Indicator
-
Shows
"Bot is typing..."
while processing a query.
-
-
Chat Input Area
-
Rounded text input field with placeholder
"Type a message..."
. -
Send button styled as a circle with an arrow ➤.
-
Gesture-based mic activation (button turns into 🎤 if swiped up).
-
-
UI Enhancements
-
Soft shadows, rounded corners.
-
Sticky header & footer for mobile usability.
-
Auto-scroll to the latest message.
-
⚙️ Functionality Features
-
User & Bot Messages
-
Messages added dynamically to the chat window.
-
Timestamps included for each message.
-
-
Blogger Integration
-
Uses Google Blogger API to fetch answers from your Prime Academy blog.
-
Extracts Q&A pairs from blog posts.
-
Best answer chosen using Jaccard similarity (semantic word overlap).
-
If no answer is found → returns a fallback message.
-
-
MathJax Support
-
Supports LaTeX formulas rendering (useful for Electrical/Math Q&A).
-
-
Multilingual Support
-
Text-to-Speech (TTS):
-
English & Hindi → uses browser’s SpeechSynthesis.
-
Malayalam → uses ResponsiveVoice API (external TTS service).
-
-
Speech-to-Text (STT):
-
Uses
webkitSpeechRecognition
(Google Chrome API). -
Captures voice input in the selected language.
-
-
-
Voice/Mic Mode
-
Normal tap → sends message.
-
Swipe up (or drag) on send button → activates mic mode 🎤.
-
Real-time speech recognition for asking questions.
-
-
Error Handling
-
If Blogger API fails → returns error message.
-
If no relevant Q&A found → fallback
"❌ No matching content found in the blog."
.
-
💡 Tech Highlights
-
Frontend Stack
-
HTML5: Structure.
-
CSS3: Custom styling, WhatsApp-like theme.
-
JavaScript (Vanilla): Core chatbot logic, no frameworks used (lightweight).
-
-
APIs & Libraries
-
Google Blogger API: Fetching blog Q&A content.
-
MathJax: Rendering LaTeX equations in answers.
-
ResponsiveVoice.js: Malayalam text-to-speech.
-
SpeechRecognition (Web Speech API): Voice input.
-
-
Algorithms
-
Text Cleaning: Removes HTML tags, trims answers.
-
Q&A Extraction: Regex-based extraction of
Q... Answer...
. -
Similarity Matching: Jaccard similarity for best answer selection.
-
-
Accessibility & UX
-
Multilingual speech input/output.
-
Mic gesture for voice-friendly usage.
-
Auto-scroll, sticky header/footer for smooth chat flow.
-
-
Scalable Design
-
Ready for embedding into WordPress, custom websites, or mobile WebView apps.
-
API-driven (can extend to other data sources beyond Blogger).
-
Easy to expand with more features (admin panel, DB storage, AI integration).
-
✅ In short:
This chatbot is a lightweight, mobile-optimized, multilingual educational assistant that fetches Q&A from Blogger, supports voice input/output, renders math equations, and has a WhatsApp-like UI for familiarity.