FoodWhizz Recipe Chatbot
Overview
This project implements a Recipe Chatbot with a React frontend and a Node.js backend. The chatbot allows users to inquire about recipes, and it provides information on various dishes based on user queries.
Project Structure
Project Structure
- Frontend (React):
- File: App.js
- Component: ChatbotComponent.js , Header.js, InputSection.js, Message.js, MessageSection.js , TextMessage.js
- Interaction: Users can communicate with the chatbot to get recipes.
- Backend (Node.js with Express and Socket.IO):
- File: recipe.js
- Server: Express with Socket.IO for real-time communication
- Interaction: Handles incoming messages from the client, processes them using the findAnswer function, and sends back recipe information.
Installation
-
Backend Dependencies:
- Open a terminal in the project's root directory.
- Run the following command to install the necessary backend dependencies:
cd backend-socket.io npm install express socket.io
-
Frontend Dependencies:
- Navigate to the frontend directory (or the directory containing your React app).
- Run the following command to install frontend dependencies:
cd frontend-react npm install
Running the Application
-
Backend:
- In the root directory, run the following command to start the backend server:
cd backend-socket.io node recipe.js
- The server will start running on port 3000. You should see a message indicating that the server is listening.
-
Frontend:
- Navigate to the frontend directory (or the directory containing your React app).
- Run the following command to start the React development server:
cd frontend-react npm start
- The React app will be available in your browser at
http://localhost:3000.
Usage
- Open your web browser and go to http://localhost:3000 to interact with the Recipe Chatbot.
- Type messages in the chat to inquire about recipes. The chatbot will respond with recipe information based on the user's queries.