An intelligent full-stack AI car assistant that diagnoses problems, gives maintenance advice, and analyzes car images.
| Feature | Description |
|---|---|
| 🤖 AI-Powered | Context-aware responses using LLaMA 4 Scout via Groq API |
| 🖼️ Image Analysis | Upload car photos for AI-powered visual diagnosis |
| 💬 Chat History | Bot remembers previous messages in the session |
| 🎯 Car-Focused | System prompt restricts responses to vehicle topics only |
| 📱 Responsive | Works seamlessly on desktop and mobile |
| ⚡ Typing Indicator | Animated indicator while AI is generating a response |
| 🧹 Clear Chat | Reset conversation and history anytime |
| 🌙 Dark UI | Clean, professional dark-themed interface |
├── Backend → Python, Flask, Flask-CORS
├── AI Model → LLaMA 4 Scout 17B (via Groq API)
├── Frontend → HTML5, CSS3, Vanilla JavaScript
├── Markdown → Marked.js
└── Environment → Python-dotenv
XcarBot/
├── 📄 app.py # Flask backend & API routes
├── 📄 .env # API keys (not committed)
├── 📄 requirements.txt # Python dependencies
├── 📄 .gitignore
├── 📂 static/
│ ├── 🎨 style.css # Frontend styling
│ └── ⚡ script.js # Frontend logic & API calls
└── 📂 templates/
└── 🌐 index.html # Main chat UI
- Python 3.10+
- Free Groq API key → console.groq.com
1. Clone the repository
git clone https://github.com/yourusername/XcarBot.git
cd XcarBot2. Install dependencies
pip install -r requirements.txt3. Create your .env file
GROQ_API_KEY=your_groq_api_key_here4. Run the app
python app.py5. Open in browser
http://127.0.0.1:5000
flask
flask-cors
groq
python-dotenv
- 💬 Text Query — Type any car question and press Enter or click Send
- 📎 Image Upload — Click the attach button to upload a car photo for analysis
- 🏆 Suggestions — Click suggestion cards on the welcome screen to get started quickly
- 🧹 Clear Chat — Click "Clear Chat" in the navbar to reset the conversation
| Variable | Description |
|---|---|
GROQ_API_KEY |
Your Groq API key from console.groq.com |
⚠️ Never commit your.envfile. It is already excluded via.gitignore.
Pull requests are welcome! For major changes, please open an issue first.
This project is licensed under the MIT License.
