This project is a chatbot application that connects a React frontend with an AI-powered backend to create interactive conversations. The frontend takes user input, sends it to the backend, and displays the AI's response.
This project consists of two parts:
- Frontend: A React app built with TypeScript and Vite, which provides the user interface to send messages to the backend.
- Backend: A server (Node.js/Express) that processes the user's message and responds with an AI-generated reply.
- Interactive chat interface where users can send messages and get AI responses.
- Lightweight, fast, and responsive frontend built with React and Vite.
- API-based backend to handle requests and communicate with the AI.
- Deployed both frontend and backend on Vercel for easy access and scalability.
-
Frontend:
- React
- TypeScript
- Vite
- CSS (for styling)
-
Backend:
- Node.js
- Express (optional, depending on your backend setup)
- AI service (could be an OpenAI API or custom AI model)
-
Deployment:
- Vercel (for both frontend and backend)
-
Clone the repository:
git clone https://github.com/saadtahir995/chatbot.git cd client -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Your app will be running at
http://localhost:5173. Open it in your browser to start chatting with the AI.
-
Clone the repository for the backend (or set up your own backend API).
git clone https://github.com/saadtahir995/chatbot.git cd Server -
Install dependencies:
npm install
-
Run the backend server (make sure you set up your server as required):
npm run dev
The backend should be accessible at
http://localhost:5174/api/route/chat. Ensure your frontend is configured to connect to this endpoint.
The chatbot app is deployed on Vercel for easy access. You can deploy both the frontend and backend using the following steps:
- Frontend: After pushing the frontend code to GitHub, link it to Vercel, and deploy.
- Backend: Similarly, push your backend code to GitHub, link it to Vercel, and deploy.
For more detailed deployment instructions, refer to the Vercel documentation.
- Visit the deployed frontend URL.
- Type a message in the chat interface.
- The backend processes the message and returns an AI response.
- The AI response is displayed in the chat interface.
This project is licensed under the MIT License - see the LICENSE file for details.
For any issues or suggestions, feel free to open an issue on the GitHub repository.
- If you plan to connect to an external AI service (like OpenAI), you will need to configure the backend to integrate with their API.
- You may need to set up environment variables (such as API keys) for the AI service on both the frontend and backend when deploying.