JavaScript Chatbot Web App is a complete, ready-to-use chatbot interface built with vanilla JavaScript β no React, no Vue, no frameworks. Just clean, modern ES2023 code that runs directly in the browser.
It ships with a built-in rule-based response engine for immediate use, but it's designed to plug into any LLM API (OpenAI, Anthropic, Ollama, etc.) in just a few lines of code.
π‘ Perfect for: Portfolio projects, learning how chat UIs work, embedding a lightweight assistant on a website, or prototyping an LLM frontend.
| π¬ Chat UI | π§ Response Engine | π LLM-Ready |
|---|---|---|
| Clean bubbles, typing indicator & timestamps |
Rule-based bot out of the box |
Swap in OpenAI, Claude or Ollama in minutes |
| π¨ Themeable | πΎ Local History | π± Responsive |
|---|---|---|
| CSS variables for colors, fonts & radius |
Persists chats vialocalStorage |
Works on mobile, tablet & desktop |
| π Advantage | π Description |
|---|---|
| β‘ Zero Dependencies | No npm install, no build step β just open index.html and it works |
| π¨ Modern UI | Beautiful, smooth animations and a clean design that feels native |
| π§ Dual-Mode Engine | Use the built-in rule bot, or connect to any LLM via a single config flag |
| π¦ Tiny Footprint | Under 15kb total β faster than any chat widget on the market |
| πΎ Full History | Chats are saved locally so users never lose a conversation |
| π― Beginner-Friendly | Extremely readable code β ideal for learning and forking |
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π¬ JavaScript Chatbot v2.7.0 β
β βββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β
β π€ Hi there! How can I help you today? β
β 10:24 AM β β
β β
β π€ Tell me a fun fact about JavaScript β
β 10:25 AM β
β β
β π€ JavaScript was created in just 10 days! β
β Brendan Eich built it in May 1995 β and β
β it became the language of the web. π β
β 10:25 AM β β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
β β Type a message... [β] β β
β ββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββ
π¬ javascript-chatbot-web-app/
βββ π― src/
β βββ chat/ # Chat UI & rendering
β β βββ chat.js
β β βββ messages.js
β βββ engine/ # Response engine
β β βββ rule-bot.js
β β βββ llm-adapter.js
β βββ storage/ # localStorage history
β βββ theme/ # CSS variable theming
βββ π¨ styles/
β βββ main.css
βββ π index.html
βββ π§ͺ tests/ # Vitest unit tests
βββ π docs/ # Usage & LLM setup guide
Want to add a feature? Found a bug? Share your chatbot fork!
Distributed under the MIT License. See LICENSE for details.
