An AI-powered chatbot built using React.js, Node.js, Express.js, MongoDB Atlas, and the Groq API. The chatbot supports AI conversations, voice input, document uploads, OCR-based image text extraction, and persistent chat history.
π https://ai-chat-bot-beryl-two.vercel.app/
π https://ai-chatbot-production-9b90.up.railway.app
- Real-time AI conversations using Groq API
- Fast and intelligent responses
- Context-aware responses
- Conversation history stored in MongoDB Atlas
- Speech-to-text support
- Microphone-based message input
- Built using React Speech Recognition
- Stores previous conversations
- MongoDB Atlas integration
- Persistent chat history
Supports:
- PDF files
- DOCX files
- TXT files
Users can upload documents and ask questions about their contents.
Supports:
- JPG
- JPEG
- PNG
The chatbot can extract text from images using OCR and answer questions about the extracted content.
- Clears current conversation
- Resets voice transcript
- Fresh chat experience
- React.js
- Vite
- Axios
- React Speech Recognition
- Node.js
- Express.js
- MongoDB Atlas
- Mongoose
- Groq API
- Llama 3.3 70B Versatile
- Multer
- PDF Parse
- Mammoth
- Tesseract OCR
- Vercel (Frontend Hosting)
- Railway (Backend Hosting)
- GitHub (Version Control)
AI-ChatBot/
β
βββ client/
β βββ src/
β βββ public/
β βββ package.json
β
βββ server/
β βββ controllers/
β βββ models/
β βββ routes/
β βββ uploads/
β βββ server.js
β βββ package.json
β
βββ .gitignore
βββ README.md
git clone https://github.com/moksha622/AI-ChatBot.gitcd AI-ChatBotcd client
npm install
npm run devFrontend:
http://localhost:5173
Open a new terminal:
cd server
npm install
npm run devBackend:
http://localhost:5000
Create a .env file inside the server folder:
PORT=5000
MONGO_URI=your_mongodb_connection_string
GROQ_API_KEY=your_groq_api_keyCreate a .env file inside the client folder:
VITE_API_URL=http://localhost:5000For production:
VITE_API_URL=https://ai-chatbot-production-9b90.up.railway.app- Create a MongoDB Atlas cluster
- Create a database user
- Add IP access in Network Access
- Copy the MongoDB connection string
- Add it to
.env
- Create a Groq account
- Generate an API key
- Add the key to
.env - Restart the backend
- Push code to GitHub
- Import repository into Vercel
- Set Root Directory:
client
- Add Environment Variable:
VITE_API_URL=https://ai-chatbot-production-9b90.up.railway.app- Deploy
- Import GitHub repository into Railway
- Set Root Directory:
server
- Add Variables:
MONGO_URI=your_mongodb_connection_string
GROQ_API_KEY=your_groq_api_key
PORT=5000- Deploy
| File Type | Supported |
|---|---|
| β | |
| DOCX | β |
| TXT | β |
| JPG | β |
| JPEG | β |
| PNG | β |
- User Authentication
- Multiple Chat Sessions
- Dark Mode
- Export Chat to PDF
- Drag & Drop Uploads
- Streaming AI Responses
- Mobile App Version
- Multi-language Support
- Advanced Document Analysis
Moksha Higgoda
GitHub: https://github.com/moksha622
This project is licensed under the MIT License.
β If you found this project useful, please consider giving it a star on GitHub.