Intelligent Healthcare at Your Fingertips
A modern, full-stack medical application that combines AI-powered symptom analysis with professional medical guidance. Built with React and Flask, featuring Google Gemini AI integration for intelligent medical conversations.
Advanced pattern matching algorithm with comprehensive medical database, severity assessment, and treatment recommendations.
Powered by Google Gemini AI with context-aware conversations, medical terminology support, and 24/7 availability.
Extensive condition catalog with evidence-based treatments, searchable interface, and regular updates.
Fully responsive design with intuitive navigation, fast loading times, and mobile optimization.
Quick access to critical healthcare contacts including ambulance services, mental health support, and specialized helplines.
The application uses a modern separation of concerns with React handling the frontend (deployed on Vercel) and Flask powering the backend API (deployed on Render). The backend integrates with Google Gemini AI for intelligent medical conversations and queries a comprehensive CSV-based medical database.
Frontend: React 18, CSS3, Responsive Design
Backend: Flask 3.x, Gunicorn, CSV Database
AI/ML: Google Gemini AI, Pandas, Natural Language Processing
Deployment: Vercel (Frontend), Render (Backend), CORS enabled
AI-Medical-Symptom-Checker/
│
├── backend/
│ ├── api.py Main API application
│ ├── requirements.txt Python dependencies
│ ├── symptoms.csv Medical database (1000+ conditions)
│ ├── .env Environment variables
│ └── render.yaml Render deployment config
│
├── frontend/
│ ├── src/
│ │ ├── components/ Reusable React components
│ │ │ ├── SymptomChecker.js
│ │ │ ├── GeminiChat.js
│ │ │ ├── MedicalDatabase.js
│ │ │ └── EmergencyServices.js
│ │ ├── config/ Configuration files
│ │ │ └── api.js API endpoint config
│ │ ├── App.css Global styles
│ │ └── App.js Main application
│ ├── public/ Static assets
│ ├── package.json Node dependencies
│ └── vercel.json Vercel configuration
│
├── README.md
└── LICENSE
Backend Deployment on Render:
- Create an account at render.com
- Create a new Web Service and connect your GitHub repository
- Configure build settings:
- Root Directory: backend
- Build Command: pip install -r requirements.txt
- Start Command: gunicorn -b 0.0.0.0:$PORT api:app
- Add environment variable:
- GEMINI_API_KEY with your API key
- Deploy
Frontend Deployment on Vercel:
- Import your project at vercel.com
- Configure settings:
- Root Directory: frontend
- Framework Preset: Create React App
- Add environment variable:
- REACT_APP_API_URL with your backend URL (e.g., https://your-backend.onrender.com)
- Deploy
Step 1: Clone the repository
git clone https://github.com/yourusername/ai-medical-symptom-checker.git
cd ai-medical-symptom-checkerStep 2: Setup Backend
cd backend
python -m venv venv
source venv/bin/activate
# On Windows: venv\Scripts\activate
pip install -r requirements.txt
echo "GEMINI_API_KEY=your_key_here" > .env
python api.pyStep 3: Setup Frontend (in new terminal)
cd frontend
npm install
echo "REACT_APP_API_URL=http://localhost:5000" > .env
npm startApplication will open at http://localhost:3000
Create a .env file in the backend directory:
GEMINI_API_KEY=your_gemini_api_key_here
PORT=5000
FLASK_ENV=production
Get your Gemini API key from Google AI Studio: https://makersuite.google.com/app/apikey
For production deployment:
REACT_APP_API_URL=https://your-backend.onrender.com
For local development:
REACT_APP_API_URL=http://localhost:5000
GET / - Health check endpoint that returns API status
POST /analyze - Analyze symptoms and provide medical guidance Request body: {"symptoms": "fever, cough, headache"}
GET /api/conditions - Retrieve all medical conditions from the database
POST /api/gemini-chat - AI-powered medical consultation Request body: {"message": "What causes fever?"}
GET /api/stats - Get database statistics including total conditions
// Analyze Symptoms
fetch('https://your-api.com/analyze', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ symptoms: 'fever, cough, headache' })
})
// AI Chat
fetch('https://your-api.com/api/gemini-chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ message: 'What causes fever?' })
})108 - Advanced Medical Emergency - Emergency ambulance service
102 - Government Ambulance - Basic medical transport
104 - Medical Advice - Health helpline and blood bank information
1097 - Maternal Care - Pregnancy and maternal health support
14567 - Senior Citizen - Elderly health services helpline
1800-599-0019 - Mental Health - KIRAN psychological support helpline
Separate Deployments - Better performance and reliability with independent scaling
No Build Conflicts - Frontend and backend deploy independently without interference
Fast Loading Times - Each component optimized for its specific platform
Easy Scaling - Scale frontend and backend independently based on demand
Professional Setup - Industry-standard architecture following best practices
Cost-Effective - Free tier available on both Vercel and Render platforms
- Node.js version 14 or higher and npm
- Python version 3.8 or higher
- Git for version control
- Google Gemini API Key
Backend tests:
cd backend
pytestFrontend tests:
cd frontend
npm testBackend follows PEP 8 Python style guidelines
Frontend uses ESLint and Prettier for code formatting
We welcome contributions from the community. Here's how you can help:
- Fork the repository to your GitHub account
- Create your feature branch: git checkout -b feature/AmazingFeature
- Commit your changes: git commit -m 'Add some AmazingFeature'
- Push to the branch: git push origin feature/AmazingFeature
- Open a Pull Request for review
- Write clear, well-commented code
- Follow the existing code style and conventions
- Add tests for any new features
- Update documentation to reflect your changes
IMPORTANT NOTICE
This application is designed for informational and educational purposes only. It is NOT a substitute for professional medical advice, diagnosis, or treatment.
Always seek the advice of qualified healthcare providers with any questions regarding medical conditions. Never disregard professional medical advice or delay seeking it because of information provided by this application.
In case of emergency, call your local emergency services immediately.
MIT License
Copyright (c) 2025 AI Medical Symptom Checker
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Google Gemini AI for intelligent medical conversation capabilities
- React team for the powerful frontend framework
- Flask community for the lightweight and flexible backend framework
- Medical professionals who reviewed and validated the database
- Open-source contributors and the developer community
Email: support@medicalchecker.com
Issues: Report bugs and request features at GitHub Issues
Discussions: Join community discussions at GitHub Discussions
Made with care for better healthcare accessibility
Star this repository if you found it helpful