Skip to content

WhatsUpDoc-Google-Hackathon/web-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

38 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿฉบ MedAI - Intelligent Pre-diagnosis Platform

Google Healthcare Hackathon React TypeScript HeyGen

๐Ÿ† Built for the Google Healthcare Hackathon by EPITA Students

An automated pre-diagnosis tool and patient scheduling prioritization system powered by MedGemma AI

๐ŸŒŸ Project Overview

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.

๐ŸŽฏ Key Features

  • ๐Ÿค– 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

๐Ÿš€ Live Demo

  • ๐Ÿ  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

๐Ÿ—๏ธ Project Structure

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

๐Ÿค– HeyGen Integration Deep Dive

๐Ÿ”ง Core Implementation

The HeyGen streaming avatar integration is the heart of our virtual consultation system:

StreamingAvatarContext (src/heygen/StreamingAvatarContext.tsx)

// 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 management

Avatar States

  • DISCONNECTED - Initial state
  • CONNECTING - Establishing connection
  • CONNECTED - Connected but not ready
  • READY - Ready for interaction
  • SPEAKING - Avatar is currently speaking
  • ERROR - Connection error

Key Features

  • ๐ŸŽ™๏ธ 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

๐Ÿ” Authentication Flow

// 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;
}

๐ŸŽฏ Usage in Components

// 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 />;

๐Ÿ› ๏ธ Technology Stack

Frontend Framework

  • React - Latest React with concurrent features
  • TypeScript - Type-safe development
  • Vite - Fast build tooling

Styling & Animation

  • Tailwind CSS - Utility-first CSS
  • Framer Motion - Advanced animations

AI & Media Processing

  • HeyGen - Streaming avatar technology
  • React PDF - PDF document viewing
  • PDF.js - PDF rendering engine

State Management & Routing

  • Zustand - Lightweight state management
  • React Router - Client-side routing

๐Ÿš€ Getting Started

Prerequisites

  • Node.js (v18 or higher)
  • npm or yarn
  • HeyGen API Key (for avatar functionality)

Installation

  1. Clone the repository

    git clone <repository-url>
    cd user-interface
  2. Install dependencies

    npm install
  3. Environment Setup

    # Create .env file
    echo "VITE_HEYGEN_TOKEN=your_heygen_api_key_here" > .env
  4. Start development server

    npm run dev
  5. Open in browser

    http://localhost:5173
    

๐Ÿ”ง Available Scripts

npm run dev      # Start development server
npm run build    # Build for production
npm run preview  # Preview production build
npm run lint     # Run ESLint

๐ŸŽจ UI/UX Features

Design Principles

  • ๐Ÿฅ 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

Color Scheme

/* 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 */

๐Ÿ‘ฅ Team

๐ŸŽ“ EPITA Students - Google Healthcare Hackathon Team

Name LinkedIn
Armand Blin LinkedIn
Arthur Courselle LinkedIn
Aurรฉlien Daudin LinkedIn
Khaled Mili LinkedIn
Lucas Duport LinkedIn
Samy Yacef LinkedIn

๐Ÿ”ฎ Future Enhancements

  • ๐Ÿง  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

๐Ÿ“„ License

This project is part of the Google Healthcare Hackathon and is intended for educational and demonstration purposes.


๐Ÿ† Proudly built for the Google Healthcare Hackathon 2025

Google HeyGen

Revolutionizing healthcare through AI-powered pre-diagnosis and virtual consultations

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages