Skip to content

SIH problem statment : Development of a Paperless Scholarship Disbursement System for PMSSS team leder : Atishay Tuli

License

Notifications You must be signed in to change notification settings

atishaytuli07/SIH-1728

 
 

Repository files navigation

React-powered Rasa Chatbot

This project demonstrates how to create a chatbot using React for the frontend and Rasa for the backend. The backend is implemented in Python 3.8 using virtualenv for environment management.

Prerequisites

  • Node.js
  • Python 3.8
  • pip
  • virtualenv

Getting Started

1. Clone the Repository

git clone https://github.com/your-username/react-rasa-chatbot.git
cd react-rasa-chatbot

2. Set Up the Backend

2.1. Create and Activate Virtual Environment

cd backend
python3.8 -m venv venv
source venv/bin/activate  # On Windows use `venv\Scripts\activate`

2.2. Install Required Packages

pip install -r requirements.txt

requirements.txt should include:

rasa==3.0.0
rasa-sdk==3.0.0

2.3. Train the Rasa Model

rasa train

2.4. Run the Rasa Server

rasa run

2.5. (Optional) Run Rasa Action Server

If you have custom actions, start the action server:

rasa run actions

3. Set Up the Frontend

3.1. Install Node.js Dependencies

cd ../frontend
npm install

3.2. Start the React Development Server

npm start

4. Configuration

4.1. Update Rasa Server URL

In the React app, update the Rasa server URL to match where your Rasa server is running. This is usually done in the src/App.js file or wherever the Rasa server endpoint is specified.

const rasaServer = 'http://localhost:5005/webhooks/rest/webhook';

5. Project Structure

react-rasa-chatbot/
│
├── backend/
│   ├── actions/
│   ├── data/
│   ├── models/
│   ├── config.yml
│   ├── domain.yml
│   ├── endpoints.yml
│   └── requirements.txt
│
└── frontend/
    ├── public/
    ├── src/
    ├── package.json
    └── README.md

6. Additional Commands

6.1. Stop Running Servers

To stop the Rasa server and React development server, use Ctrl+C in their respective terminal windows.

6.2. Deactivate Virtual Environment

deactivate

Troubleshooting

  • Ensure that both the Rasa and React servers are running on different ports.
  • Verify that the Rasa server URL is correctly configured in the React app.

Contributing

Feel free to contribute by submitting pull requests or issues to this repository. Ensure that your code adheres to the project's coding standards and includes tests where applicable.

License

This project is licensed under the MIT License.

About

SIH problem statment : Development of a Paperless Scholarship Disbursement System for PMSSS team leder : Atishay Tuli

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 95.6%
  • CSS 2.2%
  • HTML 1.2%
  • Other 1.0%