- Clone this repository to your local machine:
git clone https://github.com/mdimado/medbot.git
cd medbot
- Change the current working directory to "frontend"
cd frontend
- Install Dependencies:
npm install-
Set Up Firebase:
- Create a Firebase project at Firebase Console.
- Obtain your Firebase config credentials.
- Add your Firebase config to
src/firebase/firebaseConfig.js.
-
Start the Development Server:
npm startThis will run the React development server. You can view the website at http://localhost:3000.
The project folder structure is organized as follows:
public/: Contains static assets and the mainindex.htmlfile.src/: Contains all the source code for the React.js frontend.assets/: Static assets like images, fonts, etc.components/: Reusable componentsHeader/: Header componentHelmet/: Helmet componentLayout/: Layout componentsModal.jsx: Modal componentPatientForm.jsx: PatientForm componentPatientInfo.jsx: PatientInfo component
custom-hooks/: Custom React hookspages/: Pages of the applicationChatBot.jsx: ChatBot page componentHome.jsx: Home page componentLogin.jsx: Login page componentSignup.jsx: Signup page component
redux/: Redux setuprouters/: Router setupstyles/: CSS stylesApp.css: Global styles
App.js: Main application componentfirebase.config.js: Firebase configurationindex.js: Entry point
- Change the current working directory to "backend"
cd backend
- Create a virtual environment
python -m venv .venv
- Activate .venv
.venv\Scripts\activate
- Install required libraries and install playwright.
pip install -r requirements.txt
playwright install- Download and run Qdrant
For Windows, run these commands from WSL.
First, download the latest Qdrant image from Dockerhub:
docker pull qdrant/qdrant
Then, run the service:
docker run -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage:z \
qdrant/qdrant
Qdrant is now accessible at localhost:6333
-
Add API Keys to
.env -
Check path locations.
For Windows - paths are defined by \\
For Mac OS - paths are defined by /
- Start API
uvicorn app:app Do not use --reload tag, since the API contains async functions. API will break.
- Frontend:
- Setup: React.js
- Dependencies: npm
- Backend:
- Language Used: Python 3.9.13
- API Framework: FastAPI
<json> - Enter patient json here
Functionality - Creating a new patient bucket
<json> - JSON must contain id and prompt
Functionality - Queries the RAG pipeline
Functionality - Returns 200 OK if API is up