MedBot is a dual-mode AI medical assistant that identifies possible diseases based on user-entered symptoms, severity levels, and personal data.
It provides interactive health conversations, personalized prescriptions, specialist recommendations, and generates structured medical reports — powered by NLP, fuzzy logic, and OpenAI.
MedBot is designed to bridge the gap between self-diagnosis and early medical awareness.
It intelligently processes user symptoms — even with spelling errors or incomplete inputs — and maps them to probable diseases with corresponding treatment guidance.
- 💬 Conversational UI – Natural, chat-style medical interaction
- 🧠 Two Intelligent Modes
- 🔹 Normal Mode (Offline NLP) → Uses Fuse.js + NLTK for fuzzy disease mapping
- 🔹 API Mode (Online AI) → Uses OpenAI API for advanced medical reasoning
- 🔍 Symptom Recognition with fuzzy text matching
- 📊 Severity Level Slider (0–10)
- 🧬 Disease Probability Estimation
- 💊 Age-Based Medicine Suggestions (child, adult, elderly)
- 🧑⚕️ Specialist Recommendations
- 📄 Organized Medical Report Generation (Downloadable PDF)
- 🧩 Auto-Fallback System – Switches to demo/local mode when API fails
- 💡 Clean, responsive UI built with React + Tailwind
| Layer | Technologies |
|---|---|
| Frontend | React 18 + TypeScript, Tailwind CSS, Vite |
| Backend (Dev Mode) | Node.js + Express |
| NLP / Fuzzy Logic | Fuse.js, NLTK |
| AI Mode | OpenAI API |
| Build Tooling | Vite, Cross-Env |
| Report Generator | jsPDF |
MEDBOT
│
│
├── attached_assets/
│ └── generated_images/
│ ├── Medical_chatbot_robot_icon_8...
│ └── User_avatar_icon_71630caa.png
│
├── client/
│ ├── index.html
│ └── src/
│ ├── components/
│ │ ├── AnimatedBackground.tsx
│ │ ├── ApiToggle.tsx
│ │ ├── ChatMessage.tsx
│ │ ├── ConversationInput.tsx
│ │ ├── DiseaseReport.tsx
│ │ ├── ProgressTimeline.tsx
│ │ └── SymptomVerification.tsx
│ │ ├── examples/
│ │ │ ├── AnimatedBackground.tsx
│ │ │ ├── ApiToggle.tsx
│ │ │ ├── ChatMessage.tsx
│ │ │ ├── ConversationInput.tsx
│ │ │ ├── DiseaseReport.tsx
│ │ │ ├── ProgressTimeline.tsx
│ │ │ └── SymptomVerification.tsx
│ │ ├── ui/
│ │ │ └── ... (other ui components if any)
│ │ ├── hooks/
│ │ │ ├── use-mobile.tsx
│ │ │ └── use-toast.ts
│ │ ├── lib/
│ │ │ ├── medicalData.ts
│ │ │ ├── queryClient.ts
│ │ │ └── utils.ts
│ │ ├── pages/
│ │ │ ├── MedicalChatbot.tsx
│ │ │ ├── not-found.tsx
│ │ ├── App.tsx
│ │ ├── index.css
│ │ └── main.tsx
│
├── node_modules/
│ └── ...
│
├── server/
│ ├── index.ts
│ ├── routes.ts
│ ├── storage.ts
│ └── vite.ts
│
├── shared/
│ └── schema.ts
│
├── .gitignore
├── components.json
=======
├── design_guidelines.md
├── drizzle.config.ts
├── package-lock.json
├── package.json
├── postcss.config.js
├── tailwind.config.ts
├── tsconfig.json
└── vite.config.ts| Step | Command | Description |
|---|---|---|
| 1️⃣ | cd /path/to/medbot |
Navigate to your project folder |
| 2️⃣ | npm install |
Install dependencies |
| 3️⃣ | npm install --save-dev cross-env |
Fix environment variables (Windows only) |
| 4️⃣ | npm run dev |
Start the development server |
Then open http://localhost:5000/ in your browser.
- Uses local NLP + fuzzy logic
- Works without any API key
- Detects spelling errors and symptom variations
- Maps symptoms → diseases → medicines
- Generates report with:
- User Profile (Name, Age, Weight, Height, Gender)
- Entered Symptoms
- Predicted Disease
- Specialist Suggestion
- Probability (%)
- Medicines per Age Group with Dosage & Timing
- Uses OpenAI API for high-level symptom interpretation
- Handles natural language, misspellings, and complex medical queries
- Returns detailed and context-aware diagnoses
- Falls back to Normal Mode automatically when API errors occur
| Section | Example |
|---|---|
| Patient Info | Name: John Doe, Age: 26, Weight: 70kg |
| Entered Symptoms | Fever, Fatigue, Headache |
| Predicted Disease | Dengue (87% probability) |
| Specialist Recommendation | General Physician / Infectious Disease Specialist |
| Suggested Medicines | Paracetamol 500mg (Adult) – Twice daily after meals |
| Additional Notes | Stay hydrated and avoid NSAIDs unless prescribed |
- 🧬 TensorFlow-based Disease Prediction
- 🌐 Multi-Language Input (English + Local)
- 📱 Progressive Web App (PWA) support
- 🩺 Doctor Dashboard + Consultation Portal
- ☁️ Cloud Report Sync
- 🔒 Privacy-first architecture (HIPAA-like compliance)
👨💼 Honey…
Student Entrepreneur | Future Startup Founder
Building one of the first AI-powered medical assistants in his city — blending healthcare, AI, and human empathy.
MedBot is for educational and research purposes only.
It should not replace a certified medical diagnosis or doctor consultation.
If you find this project valuable:
- Star ⭐ this repo
- Fork & contribute
- Suggest improvements via Issues or PRs

