๐ Built for the Google Healthcare Hackathon by EPITA Students
An automated pre-diagnosis tool and patient scheduling prioritization system powered by MedGemma AI
MedAI is an innovative healthcare application that combines AI-powered pre-diagnosis with realistic virtual consultations. The platform uses Google's MedGemma AI model and HeyGen's streaming avatar technology to provide interactive medical consultations and intelligent patient prioritization.
- ๐ค AI Virtual Doctor: Interactive consultations with HeyGen streaming avatars
- ๐ Smart Prioritization: Automated patient scheduling based on urgency assessment
- ๐ Medical Reports: Comprehensive patient dashboard with PDF report viewing
- ๐ Patient Timeline: Historical tracking of medical consultations and reports
- ๐จ Modern UI: Beautiful, responsive interface built with React and Tailwind CSS
- ๐ Homepage: Access the main platform interface
- ๐ Virtual Consultation:
/call/:id- Interactive AI consultation with HeyGen avatar - ๐ Doctor Dashboard:
/report/:doctorID- Patient management interface - ๐ Report Details:
/report/:doctorID/:reportID- Detailed patient reports with PDF viewing
user-interface/
โโโ ๐ src/
โ โโโ ๐ญ animations/ # Framer Motion animations
โ โ โโโ callAnimations.ts # Call interface animations
โ โโโ ๐ api/ # API integrations
โ โ โโโ heygen-token/ # HeyGen authentication
โ โ โโโ getAccessToken.ts
โ โโโ ๐งฉ components/ # React components
โ โ โโโ callComponents/ # Video call interface
โ โ โ โโโ CallVideo.tsx # HeyGen avatar video component
โ โ โ โโโ CallNavbar.tsx # Call controls
โ โ โ โโโ CallSidebar.tsx # Chat sidebar
โ โ โ โโโ ...
โ โ โโโ mainComponents/ # Shared components
โ โ โ โโโ AnimatedBackground.tsx
โ โ โ โโโ Footer.tsx
โ โ โโโ reportComponents/ # Medical reports interface
โ โ โโโ DoctorNavbar.tsx
โ โ โโโ PatientRow.tsx
โ โ โโโ PatientTimeline.tsx
โ โ โโโ ...
โ โโโ ๐จ constants/ # App constants
โ โ โโโ colors.ts # Theme colors
โ โโโ ๐ค heygen/ # HeyGen integration
โ โ โโโ StreamingAvatarContext.tsx
โ โโโ ๐ pages/ # Route components
โ โ โโโ Home.tsx # Landing page
โ โ โโโ Call.tsx # Virtual consultation
โ โ โโโ DoctorReports.tsx # Patient dashboard
โ โ โโโ ReportDetail.tsx # Individual reports
โ โ โโโ NotFound.tsx # 404 page
โ โโโ ...
โโโ ๐ public/ # Static assets
โ โโโ team/ # Team member photos
โ โโโ sample-report.pdf # Sample medical report
โโโ ๐ฆ package.json # Dependencies & scripts
โโโ โ๏ธ vite.config.ts # Vite configuration
โโโ ๐จ tailwind.config.js # Tailwind CSS config
โโโ ๐ README.md # This file
The HeyGen streaming avatar integration is the heart of our virtual consultation system:
// Key features implemented:
- Real-time video streaming with WebRTC
- Voice emotion and speech synthesis
- Speech-to-text integration with Deepgram
- Avatar state management (connecting, ready, speaking)
- Session lifecycle managementDISCONNECTED- Initial stateCONNECTING- Establishing connectionCONNECTED- Connected but not readyREADY- Ready for interactionSPEAKING- Avatar is currently speakingERROR- Connection error
- ๐๏ธ Voice Chat: WebSocket-based real-time communication
- ๐ญ Avatar: "Ann_Doctor_Sitting_public" medical avatar
- ๐ฃ๏ธ TTS: Text-to-speech with emotional voice settings
- ๐ STT: Speech-to-text using Deepgram provider
- ๐น High Quality: HD video streaming with optimized performance
// Token-based authentication
const HEYGEN_API_KEY = import.meta.env.VITE_HEYGEN_TOKEN;
// Secure token retrieval
export async function get_access_token() {
const res = await fetch(`https://api.heygen.com/v1/streaming.create_token`, {
method: "POST",
headers: { "x-api-key": HEYGEN_API_KEY },
});
return res.json().data.token;
}// In Call component
const { speakText, isReady, mediaStream, status } = useStreamingAvatar();
// Send message to avatar
await speakText("Hello, how can I help you today?");
// Video rendering
<video ref={videoRef} autoPlay muted playsInline />;- Node.js (v18 or higher)
- npm or yarn
- HeyGen API Key (for avatar functionality)
-
Clone the repository
git clone <repository-url> cd user-interface
-
Install dependencies
npm install
-
Environment Setup
# Create .env file echo "VITE_HEYGEN_TOKEN=your_heygen_api_key_here" > .env
-
Start development server
npm run dev
-
Open in browser
http://localhost:5173
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint- ๐ฅ Medical-First: Clean, professional healthcare interface
- โฟ Accessible: WCAG compliant design patterns
- ๐ฑ Responsive: Mobile-first responsive design
- ๐ญ Animated: Smooth Framer Motion animations
- ๐ Modern: Glass morphism and modern UI patterns
/* Primary Healthcare Colors */
--color-primary: #2563eb /* Professional blue */
--color-accent: #60a5fa /* Light blue accent */
--color-success: #10b981 /* Medical green */
--color-warning: #f59e0b /* Attention yellow */
--color-critical: #ef4444 /* Critical red */- ๐ง Enhanced AI: Integration with more advanced MedGemma models
- ๐ Security: HIPAA compliance and data encryption
- ๐ Analytics: Advanced patient insights and reporting
- ๐ Internationalization: Multi-language support
- ๐ฑ Mobile App: Native mobile applications
- ๐ API Integration: Real EHR system connections
This project is part of the Google Healthcare Hackathon and is intended for educational and demonstration purposes.