Skip to content

Latest commit

 

History

History
180 lines (113 loc) · 3.59 KB

File metadata and controls

180 lines (113 loc) · 3.59 KB

🤖 RAG AI Chat Bot

An intelligent AI-powered chatbot built with React, Express, and MongoDB that allows users to interact with AI based on admin-provided knowledge.


🚀 Features

✨ User Authentication

  • Register new account
  • Secure login system

💬 AI Chat System

  • Ask questions in real-time
  • AI responds based on admin posts

🧠 Admin Knowledge Control

  • Admin can create posts (knowledge base)
  • AI answers are generated from stored content

📦 Full-Stack Architecture

  • Frontend: React
  • Backend: Express.js
  • Database: MongoDB

🛠️ Tech Stack

Frontend Backend Database Other
React.js Express.js MongoDB Node.js, REST API

⚙️ Installation

1️⃣ Clone the repository

git clone https://github.com/feyyu120/ChatBot.git
cd ChatBot

2️⃣ Install dependencies

frontend

cd frontend
npm install

backend

cd backend
npm install

▶️ Run the App

Start Backend

cd backend
npm  run start

Start Frontend

cd frontend
npm run dev

🔐 Environment Variables

Create a .env file inside /server:

MONGO_URI= " "
JWT_SECRET= " "
PORT=5000

📡 API Overview

Auth Routes

  • POST /api/auth/register
  • POST /api/auth/login

🧠 How It Works

  1. Admin creates posts → stored in MongoDB
  2. User asks a question
  3. Backend processes the question
  4. AI generates response based on stored posts
  5. Response is sent back to user

🎯 Future Improvements

  • 🤖 Integrate advanced AI (OpenAI API or similar)
  • 📊 Admin dashboard analytics
  • 🗂️ Categories for knowledge posts
  • 🌍 Multi-language support
  • ⚡ Real-time chat (WebSockets)

📸 Screenshots

Register.jsx

Screenshot 2026-02-14 175849 - - - login.jsx Screenshot 2026-02-14 175830 - - - bot.jsx Screenshot 2026-02-14 175009 Screenshot 2026-02-14 175038 - - - admin.jsx Screenshot 2026-02-14 083201 Screenshot 2026-02-14 083133 - - - on mobile Screenshot 2026-02-14 082532 Screenshot 2026-02-14 082559

on database like this Screenshot 2026-02-14 191207


🤝 Contributing

Contributions are welcome! Feel free to fork this repo and submit a pull request.


👨‍💻 Author

Feysel Yassin


⭐ Support

If you like this project, give it a ⭐ on GitHub!

Feysel Yassin