An AI-powered symptom screening application that uses Gemini to provide dynamic medical questionnaires and recommendations.
- Dynamic Question Generation: Uses Google's Gemini AI to generate contextual follow-up questions based on user responses
- Body Area Selection: Interactive body selector for targeted symptom assessment
- Intelligent Diagnosis: AI-powered analysis providing diagnosis confidence levels and recommendations
- Appointment Booking: Integration with family doctor scheduling
- Clinic Finder: Locate nearby medical facilities
Frontend:
- React + TypeScript
- Vite
- Tailwind CSS
- shadcn/ui components
Backend:
- Flask (Python)
- SQLAlchemy + Alembic
- Google Gemini AI
- CORS enabled for frontend integration
- Node.js (v16 or higher)
- Python 3.8+
- Pipenv (for Python dependency management)
-
Navigate to the server directory:
cd server -
Install Python dependencies:
pipenv install pipenv shell
-
Set up environment variables: Create a
.envfile in the server directory:# Required for production GEMINI_API_KEY=your_gemini_api_key_here DATABASE_URL=sqlite:///./symptify.db # Optional: Use mock responses for development USE_GPT_MOCK=1
-
Run database migrations:
alembic upgrade head
-
Start the Flask server:
python -m app.main
The server will run on
http://localhost:5001
-
Navigate to the client directory:
cd client -
Install dependencies:
npm install
-
Create environment file: Create a
.envfile in the client directory:VITE_API_URL=http://localhost:5001
-
Start the development server:
npm run dev
The client will run on
http://localhost:5173
For development without a Gemini API key, set USE_GPT_MOCK=1 in your server .env file. This will use predefined mock responses instead of calling the Gemini API.
-
POST /api/questions/generate- Generate next question or final diagnosis
- Body:
{ "answers": {}, "body_location": "head" } - Returns: Question object or diagnosis result
-
GET /api/questions/status- Get API status and available conditions
- Select Body Areas: Choose areas of discomfort using the interactive body selector
- Answer Questions: Respond to AI-generated questions tailored to your symptoms
- Receive Diagnosis: Get AI analysis with confidence level and recommendations
- Take Action: Follow self-care advice or book medical appointments
The frontend maps detailed body regions to general categories:
head,neck→headchest→chestabdomen,pelvis→abdomenback→back*arm*,*hand*→arms*thigh*,*shin*,*foot*→legs
interface GeminiQuestion {
question: string;
question_id: string;
type: "yes/no" | "multiple_choice";
options: string[];
is_final: boolean;
question_number: number;
total_questions: number;
}
interface GeminiDiagnosis {
diagnosis: string;
confidence: "high" | "medium" | "low";
recommendation: "self_care" | "see_doctor";
advice: string;
}- Fork the repository
- Create a feature branch
- Make your changes
- Ensure TypeScript compilation passes:
tsc --strict - Test the end-to-end flow
- Submit a pull request
MIT License