Skip to content
MedAi

MedAi

Diagnose Smarter, Live Healthier.

Created on 8th March 2026

β€’

MedAi

MedAi

Diagnose Smarter, Live Healthier.

The problem MedAi solves

🩺 What is MedAI?

MedAI is an AI-powered healthcare assistant designed to help users quickly understand their symptoms and access reliable medical information. It uses advanced AI models to analyze user input and provide helpful insights related to possible health conditions, precautions, and general medical guidance.


πŸš€ What Can People Use MedAI For?

1️⃣ Quick Symptom Analysis

Users can describe their symptoms (e.g., fever, headache, cough), and MedAI analyzes them to suggest possible conditions and provide basic medical insights.

This helps users:

  • Understand what their symptoms might indicate
  • Decide whether they should seek medical attention
  • Get preliminary health information instantly

2️⃣ Instant Medical Information

MedAI acts as a medical knowledge assistant where users can ask questions such as:

  • "What causes migraines?"
  • "What are the symptoms of dengue?"
  • "How to reduce fever at home?"

The AI provides clear explanations in an easy-to-understand format.


3️⃣ Early Awareness and Preventive Guidance

Many people ignore early symptoms due to lack of information. MedAI helps by providing:

  • Possible health explanations
  • Preventive tips
  • Basic safety precautions

This can encourage users to take early action for their health.


4️⃣ 24/7 AI Health Assistant

Unlike traditional healthcare consultation which may require appointments, MedAI is available anytime and anywhere, allowing users to quickly get health-related insights.


πŸ’‘ How MedAI Makes Existing Tasks Easier

⚑ Faster Access to Health Information

Instead of searching multiple websites for medical information, users can get structured answers instantly from MedAI.

🧠 Simplifies Medical Knowledge

Medical terms can be confusing. MedAI explains symptoms, diseases, and precautions in simple and understandable language.

⏱ Saves Time

Users can quickly understand their symptoms without spending hours researching online.

πŸ“š Consolidated Medical Guidance

MedAI combines medical information, symptom analysis, and guidance into a single AI-powered platform.


⚠️ Important Disclaimer

MedAI is designed for educational and informational purposes only.
It does not replace professional medical advice, diagnosis, or treatment from a licensed healthcare provider.

Users should always consult a qualified doctor for serious medical concerns.


🌍 Potential Impact

MedAI can help improve health awareness and accessibility to medical information, especially for people who need quick guidance before consulting a healthcare professional.

Challenges I ran into

🐞 Challenges & Bugs Faced During Development

1️⃣ API Integration Errors

One of the biggest hurdles during the development of MedAI was integrating the AI model through the OpenRouter API. Initially, the application frequently returned "Server Error" responses when users tried to send messages to the AI chatbot.

πŸ” Problem

The issue occurred because:

  • The API key was not correctly loaded from environment variables.
  • The request headers and body format required by the OpenRouter API were slightly different from the default configuration.

This resulted in failed API requests and prevented the chatbot from generating responses.

πŸ›  Solution

To fix this issue:

  • The API key was moved to a .env file and accessed using import.meta.env in the React application.
  • Proper headers were added to the request, including:
    • Authorization
    • Content-Type
  • The request body was structured according to the chat completion format required by the AI model.

After correcting the API request format and environment variable configuration, the AI responses started working correctly.


2️⃣ Rendering AI Responses Properly

Another challenge was displaying the AI-generated responses in a clean and readable format.

πŸ” Problem

The AI often returned responses containing:

  • Markdown formatting
  • Bullet points
  • Headings

Without proper rendering, these responses appeared as plain text, making them difficult to read.

πŸ›  Solution

To solve this problem, the following libraries were integrated:

  • react-markdown
  • remark-gfm

These libraries allowed the application to render AI responses with proper formatting, including lists, headings, and structured content.


3️⃣ Managing Chat State in React

Maintaining the chat history between the user and the AI was another technical challenge.

πŸ” Problem

Initially, new messages were not properly appended to the existing chat history, which caused messages to disappear or overwrite previous responses.

πŸ›  Solution

This was solved by implementing React state management using the useState hook to store and update the message history dynamically. Each user message and AI response was pushed into a messages array, ensuring the chat conversation remained intact.


🎯 Key Learning

Overcoming these challenges helped improve understanding of:

  • API integration with AI services
  • Environment variable management in React (Vite)
  • State management in React applications
  • Rendering dynamic AI-generated content

These improvements ultimately made MedAI more stable, user-friendly, and reliable.

Tracks Applied (2)

Best Use of Gemini API

πŸ† How MedAI Fits into the Major League Hacking Track MedAI aligns well with the Major League Hacking (MLH) track becau...Read More
Major League Hacking

Major League Hacking

Best Hack Built with Google Antigravity

πŸ† How MedAI Fits into the Major League Hacking Track MedAI is a strong fit for the Major League Hacking (MLH) track be...Read More
Major League Hacking

Major League Hacking

Discussion

Builders also viewed

See more projects on Devfolio