Case Study 03
DiagnoraX AI
Your Personal AI Health Companion
DiagnoraX AI is a Flutter/Dart mobile health companion using Firebase Auth/Firestore and Gemini 2.0 Flash with a Groq fallback. Verified: symptom checking with severity, prescription OCR, lab-report analysis, drug interactions, doctor suggestions, body analysis and reminders UI. Developed building on ML internship experience at Brainery Spot Technologies.
01 · Overview
Overview
- Describe symptoms, scan prescriptions/reports, check interactions, get doctor suggestions, track reminders.
- Routes everyday health chores through one AI service with shared severity/risk language.
- For personal awareness and organisation — not diagnosis or treatment.
- One GeminiService fronts text, vision and fallback paths; Firestore profiles; single dark theme.
02 · The Problem
The Problem
- Everyday questions (concerning symptom? prescription content? report meaning?) lack one organised starting point.
- Handwriting and jargon are hard to parse alone.
- Medication lists grow without interaction visibility.
03 · The Solution
The Solution
- Thirteen screens behind a 6-tab shell covering checker, scanner, analyser, interactions, doctors, body, reminders, dashboard, profile, auth.
- Central service with typed models (SymptomAnalysis, ReportAnalysis, DoctorRecommendation) and shared SeverityBadge widgets.
- Firebase Auth (email, phone OTP, Google) + Firestore profiles.
04 · How It Works
How It Works
01 · 1. Symptoms → analyzeSymptoms → severity low/medium/high/critical + next steps.-
1. Symptoms → analyzeSymptoms → severity low/medium/high/critical + next steps.
02 · 2. Prescription photo → scanPrescription(base64) → medicines + doctor/hospital/date.+
2. Prescription photo → scanPrescription(base64) → medicines + doctor/hospital/date.
03 · 3. Lab image → analyzeMedicalReport → type, findings, riskScore 0–100, insights.+
3. Lab image → analyzeMedicalReport → type, findings, riskScore 0–100, insights.
04 · 4. Med list → checkDrugInteractions → alerts.+
4. Med list → checkDrugInteractions → alerts.
05 · 5. Specialty/location → doctor cards; body analyser → BMI/composition.+
5. Specialty/location → doctor cards; body analyser → BMI/composition.
06 · 6. Reminders+
in-memory list UI; notification scheduling not proven.
Select a stage to expand it. Every stage maps to code in the repository.
05 · System Architecture
System Architecture
dotenv → Firebase.init → portrait lock → dark MaterialApp → splash → 6-tab home; setState.
theme.dart + common widgets (GlassCard, NeonButton, SeverityBadge).
Gemini 2.0 Flash + Groq llama-3.3 fallback via http/dio; dotenv keys.
FirebaseAuth + Firestore users/{uid}; login/profile screens.
06 · Core Features
Core Features
Symptom checker + severity badges.
Symptom checker + severity badges.
Prescription OCR via vision inline_data.
Prescription OCR via vision inline_data.
Lab-report analysis with 0–100 risk.
Lab-report analysis with 0–100 risk.
Drug-interaction warnings.
Drug-interaction warnings.
Doctor recommendations.
Doctor recommendations.
Body analyser.
Body analyser.
Reminders (UI-only
Reminders (UI-only — stated honestly).
07 · Technical Implementation
Technical Implementation
- Flutter/Dart, Material dark, 13 screens, setState.
- No own backend — Firebase + direct AI HTTPS calls.
- Image paths use base64 inline_data.
- firebase_core/auth/firestore, google_sign_in, shared_preferences, dotenv.
- image_picker, compression, url_launcher, permissions.
08 · My Contribution
My Contribution
- 13-screen app, theme + widget system, tab navigation.
- Central GeminiService with text + vision + fallback.
- Firebase email/phone/Google + Firestore docs.
- Setup docs (Firebase, sign-in, API keys).
09 · Tech Stack
Tech Stack
- App
- Flutter · Dart (setState).
- BaaS
- Firebase Auth · Firestore · Google Sign-In.
- AI
- Gemini 2.0 Flash · Groq fallback.
- Media
- image_picker · compression · dotenv.
10 · Challenges & Decisions
Challenges & Decisions
- No backend → direct AI calls with dotenv + setup banner → zero-server deploy.
- Varied image inputs → picker + compression + typed vision outputs.
- Honest scope → reminders as UI-only, no SOS (only disclaimer string).
11 · Result
Result
- Symptom severity, prescription OCR, report scoring, interactions, doctor recs, body analysis, auth, profiles.
- Limits: reminders UI-only; no SOS; no React/Express in this checkout.
- Note: awareness aid, not a replacement for professional medical care.
DiagnoraX is a health-organisation and awareness aid, not a replacement for professional medical care. In an emergency, contact local emergency services.
12 · Links