Inspiration
AvaBuddie was conceived from the vision of creating a comprehensive, AI-driven telemedicine platform that bridges the gap between patients, healthcare workers, and doctors. The core inspiration was to leverage artificial intelligence to enhance accessibility to healthcare, provide intelligent assistance for medical inquiries, and streamline communication within the healthcare ecosystem. The goal was to build a system that offers 24/7 support, making healthcare guidance more immediate and personalized, while also empowering medical professionals with advanced tools for patient management and analysis.
What it does
AvaBuddie serves as an advanced AI-powered telemedicine platform designed to connect various stakeholders in healthcare. Its primary function is to provide intelligent assistance and seamless communication for medical needs.
Key functionalities include:
- AI Health Assistant (Dr. Ava): Powered by Google Gemini AI, it offers instant responses to health questions, symptom assessment, and general medical guidance.
- Video Consultations: Facilitates real-time video calls, including AI-powered interactions and potential connections with human doctors.
- Voice Messages: Supports speech-to-text and text-to-speech capabilities for hands-free interaction with the AI assistant.
- Medical Image Analysis: Allows users to upload images of symptoms for AI-powered visual assessment.
- Multi-Role Support: Caters to distinct user roles—Patients, Healthcare Workers, and Doctors—each with tailored dashboards and features.
- Secure Authentication: Implements robust, role-based access control to ensure data privacy and security.
- Real-time Notifications: Provides instant updates and alerts for important events, such as doctor requests or report receptions.
- Patient-Doctor Relationships: Manages secure connections and communication channels between patients and their chosen doctors.
How we built it
AvaBuddie was constructed using a modern, full-stack architecture, emphasizing performance, scalability, and a rich user experience.
Frontend:
The user interface was developed with React 18 and TypeScript, providing a robust and type-safe foundation. Vite was chosen as the build tool and development server for its speed and efficiency. Styling was handled using Tailwind CSS, a utility-first CSS framework that enabled rapid UI development and consistent design. React Router was utilized for client-side routing, ensuring a smooth single-page application experience, and Lucide React provided a comprehensive set of customizable icons.
Backend & Services:
The backend infrastructure is powered by Supabase, which serves as the PostgreSQL database, handles user authentication, and provides real-time capabilities for dynamic updates. For AI functionalities, Google Gemini AI was integrated to drive the core AI health assistant. ElevenLabs was used for advanced speech-to-text and text-to-speech functionalities, enabling voice interactions. Tavus was integrated to provide AI-powered video consultation features, offering realistic virtual doctor interactions.
Database Schema:
The application utilizes a comprehensive PostgreSQL schema managed by Supabase, including tables such as profiles (extended user information), doctors (doctor credentials and specialties), patient_doctor_requests (relationship requests), patient_doctor_relationships (confirmed relationships), ai_consultations (AI chat sessions), consultation_reports (medical reports), notifications (system notifications), and chat_sessions (for storing chat history).
Deployment:
The application is deployed to Netlify
Challenges we ran into
Developing AvaBuddie presented several significant challenges:
Complex Supabase RLS Policies: Implementing and refining Row Level Security (RLS) policies across multiple interconnected tables (profiles, doctors, patient_doctor_requests, patient_doctor_relationships, ai_consultations, notifications, chat_sessions) was particularly intricate. Ensuring that each user role had precisely the correct read, write, and update permissions while maintaining data privacy and security required careful planning and iterative adjustments, as evidenced by numerous Supabase migration files.
Multi-API Integration: Integrating diverse external AI services like Google Gemini, ElevenLabs, and Tavus, each with its own API specifications, authentication methods, and data formats, proved challenging. This involved handling API keys securely, managing rate limits, and ensuring seamless data flow between the frontend, Supabase, and these third-party services.
Real-time Data Synchronization: Implementing real-time chat and notification features required careful management of WebSocket connections and data synchronization to ensure messages and alerts were delivered instantly and reliably across all connected clients.
Media Handling (Voice & Image): Managing microphone access for voice messages, handling audio recording and transcription, and processing image uploads for AI analysis (including converting images to base64 and handling various MIME types) added layers of complexity. Ensuring cross-browser compatibility for media streams was also a consideration.
Error Handling and User Feedback: Providing clear and actionable error messages to users, especially when dealing with complex backend or API failures, was crucial for a good user experience. This involved implementing robust try-catch blocks and user-friendly alerts.
Profile Creation and Role Management: Ensuring a smooth user signup process where profiles are correctly created and associated with the right roles, and handling edge cases like duplicate profiles or race conditions during initial setup, required careful attention to database triggers and authentication flows.
Accomplishments that I'm proud of
Despite the challenges, we achieved several key accomplishments:
- Seamless AI Integration: Successfully integrated multiple cutting-edge AI services (Google Gemini, ElevenLabs, Tavus) to create a truly intelligent and interactive health companion.
- Robust Multi-Role System: Developed a comprehensive system that effectively supports distinct user roles (Patient, Healthcare Worker, Doctor) with tailored dashboards and functionalities, ensuring a personalized experience for each user type.
- Secure and Scalable Backend: Built a secure and scalable backend using Supabase, leveraging its RLS capabilities, authentication, and real-time features to manage sensitive medical data effectively.
- Intuitive User Experience: Designed a responsive and modern user interface with Tailwind CSS and React, providing a smooth and intuitive experience across various devices.
- Functional Media Capabilities: Successfully implemented voice messaging with transcription and AI-powered image analysis, adding significant value to the consultation process.
- Comprehensive Database Schema: Created a well-structured and interconnected database schema that efficiently stores and manages diverse medical and user-related data.
- High Performance: Achieved excellent performance metrics, including high Lighthouse scores, demonstrating an optimized and efficient application.
What we learned
Throughout the development of AvaBuddie, we gained valuable insights and deepened our understanding in several areas:
Supabase Mastery: I gained extensive experience with Supabase, particularly in designing complex RLS policies, managing database migrations, and leveraging its real-time capabilities for dynamic application features.
Advanced AI API Integration: I learned the intricacies of integrating and orchestrating multiple sophisticated AI APIs, understanding their data requirements, response formats, and effective error handling strategies.
Secure Development Practices: I reinforced the importance of robust authentication, authorization, and data security, especially when handling sensitive medical information, and how to implement these effectively using RLS and secure API key management.
Frontend State Management for Complex Interactions: refined our skills in managing complex application states in React, especially for real-time chat, media processing, and multi-step user flows.
Optimizing User Experience for Healthcare: Also learned the importance of clear communication, empathy in AI responses, and intuitive design in a healthcare context, where clarity and trust are paramount.
Deployment Automation: gained practical experience in setting up and automating deployment pipelines for modern web applications using tools like Netlify.
What's next for AvaBuddie
Our roadmap for AvaBuddie includes exciting enhancements and expansions:
Mobile App Development: Developing native mobile applications for iOS and Android using React Native to provide a more integrated and accessible experience.
Advanced Analytics Dashboard: Implementing more sophisticated analytics for healthcare workers and doctors, offering deeper insights into patient data and care metrics.
Multi-language Support: Expanding the platform to support multiple languages, making AvaBuddie accessible to a global audience.
Prescription Management: Integrating features for electronic prescription management and refill requests.
Wearable Device Integration: Exploring connectivity with wearable health devices to incorporate real-time vital signs and activity data into patient profiles.
Enhanced AI Diagnostics: Further advancing AI capabilities for more nuanced diagnostic support and predictive analytics.
Telemedicine Marketplace: Potentially creating a marketplace for patients to discover and connect with a wider network of specialized doctors.
Insurance Integration: Streamlining the process of insurance claims and verification directly within the platform.
Plugin Ecosystem / AvaBuddie API: Enabling third-party integrations and custom features via APIs.
Offline-First Mode (for Low-Connectivity Regions): Critical for rural or underserved areas with limited internet — expanding global healthcare equity.
Global Healthcare Network: Building partnerships and expanding services to create a broader, interconnected healthcare network.
Built With
- bolt.new
- elevenlabs
- gemini
- superbase
- tavus
Log in or sign up for Devpost to join the conversation.