An AI-powered chatbot specifically built to integrate into any website, offering intelligent, conversational assistance to users.
This project uses React + Vite for a fast, modern UI and Node.js for securely communicating with OpenAI's ChatGPT API.
- Smart, human-like conversation powered by ChatGPT
- Seamless integration into any website as a floating chatbot widget
- React frontend with clean, responsive UI
- Node.js backend to securely handle OpenAI API requests
- Fast performance with Vite development server
- Mobile-responsive and optimized for smooth user experience
- Frontend: React, Vite, Axios
- Backend: Node.js, Express
- AI Service: OpenAI GPT API (Chat Completion endpoint)
/frontend --> React + Vite app (chat widget UI)
/backend --> Node.js + Express server (API bridge to OpenAI)
/public --> Static files (optional)
/.env --> Environment variables (OpenAI API key, server configs)
README.md --> Project documentation
git clone https://github.com/Tech-Sanji/Ai-Chatbot.git
cd Ai-Chatbotcd backend
npm installCreate a .env file inside /backend/ with the following:
OPENAI_API_KEY=your_openai_api_key_here
PORT=5000
Start the backend server:
npm run devThe backend will listen on
http://localhost:5000
Open a new terminal window:
cd frontend
npm install
npm run devThe frontend will run on
http://localhost:5173/(default Vite port)
- The user interacts with the chatbot widget on the website.
- The frontend sends the user's message to the Node.js backend.
- The backend securely forwards the message to OpenAI's ChatGPT API.
- OpenAI returns the chatbot's reply, which is displayed instantly to the user.
Built with ❤️ by Tech-Sanji