Inspiration

Every year, millions of people in rural India and developing countries die from diseases like brain tumors, diabetes, and heart disease — not because treatment doesn't exist, but because they never get diagnosed in time. Specialist doctors are expensive, hospitals are far away, and by the time symptoms appear, it is often too late.

I built Cure AI to change that. A free, instant, AI-powered medical diagnosis platform that anyone can access from anywhere — no doctor appointment needed, no expensive tests, just upload and get results in seconds.

What it does

Cure AI is a full-stack AI medical diagnosis platform with 3 modules:

🧠 Brain Tumor Detection

  • User uploads any MRI scan image (JPG, PNG, JPEG)
  • AI validates the image — rejects non-MRI images automatically
  • Deep Learning ONNX model classifies into 4 categories: Glioma, Meningioma, Pituitary Tumor, No Tumor
  • Shows confidence score and probability breakdown for all 4 classes
  • Sample MRI images available directly on the website for users who don't have their own scans
  • Medical recommendation shown based on result

🩸 Diabetes Risk Assessment

  • User enters 8 clinical parameters with proper medical units: Pregnancies, Glucose (mg/dL), Blood Pressure (mmHg), Skin Thickness (mm), Insulin (μU/mL), BMI (kg/m²), Diabetes Pedigree Function, Age
  • ML model instantly predicts High Risk or Low Risk
  • Shows risk probability % and confidence score
  • Normal reference ranges displayed for each parameter

❤️ Heart Disease Prediction

  • User enters 13 cardiovascular indicators: Age, Sex, Chest Pain Type, Resting BP, Cholesterol, Fasting Blood Sugar, Resting ECG, Max Heart Rate, Exercise Angina, ST Depression, Slope, Major Vessels, Thalassemia
  • AI model gives cardiac risk stratification instantly
  • Shows risk score % with clinical notes

All 3 modules include:

  • Color-coded results (Green = Safe, Red = Risk)
  • Animated confidence progress bars
  • Medical recommendations
  • Professional disclaimer

How we built it

Frontend — React.js

  • React.js 18 with fully custom CSS3 (no UI library)
  • Premium dark space theme with animated background
  • Glassmorphism cards with backdrop blur effects
  • Animated floating particles and nebula orbs in background
  • Custom CSS design system with CSS variables
  • Syne + Cabinet Grotesk premium typography
  • Axios for API communication
  • Fully responsive layout
  • Deployed on Vercel (auto-deploys on every git push)

Backend — FastAPI (Python)

  • FastAPI REST API with 3 prediction endpoints: POST /predict/brain — accepts image file POST /predict/diabetes — accepts 8 clinical parameters POST /predict/heart — accepts 13 cardiovascular indicators
  • ONNX Runtime for brain tumor deep learning inference
  • OpenCV for MRI image preprocessing (resize to 224x224, normalize)
  • Scikit-learn for diabetes and heart disease ML models
  • Pandas + NumPy for feature engineering and data preprocessing
  • Pydantic for request validation
  • CORS configured for cross-origin requests
  • Deployed on Hugging Face Spaces with Docker

AI Models:

  • Brain Tumor: CNN trained on 2000+ MRI images, exported to ONNX format (handles 80MB+ model file)
  • Diabetes: Trained on Pima Indians Diabetes Dataset with feature engineering (BMI categories, Insulin score, Glucose categories)
  • Heart Disease: Trained on Cleveland Heart Disease Dataset

DevOps & Deployment:

  • GitHub for version control
  • Vercel for frontend (free tier, auto-deploy)
  • Hugging Face Spaces + Docker for backend (chosen specifically to handle large ML model files)
  • Git for version control with .gitignore for model files

Challenges we ran into

1. Large Model File Size brain_tumor_model.onnx was 80.65MB — GitHub recommends max 50MB. Tried Railway.app but it failed due to Python 3.13 incompatibility with pydantic-core. Switched to Hugging Face Spaces with Docker which natively handles large ML model files.

2. Python Version Compatibility Railway deployment kept failing — pydantic-core couldn't build wheels for Python 3.13. Fixed by using Docker with Python 3.10 on Hugging Face Spaces.

3. CORS Configuration Connecting React frontend (Vercel) to FastAPI backend (Hugging Face) across different domains required proper CORS middleware setup in FastAPI.

4. MRI Image Validation Users could upload any random image — selfies, landscapes, etc. Built a canvas-based pixel analysis function in React that samples 50x50 pixels and checks color ratio. If more than 35% pixels have high R/G/B difference (colorful), it rejects the image as non-MRI.

5. Git Submodule Issue Backend folder accidentally became a git submodule (had its own .git folder). Fixed by removing nested .git and force-pushing correct structure.

6. Sample Images CORS Initially tried loading sample MRI images directly from GitHub raw URLs — browser blocked them due to CORS. Fixed by serving sample images from the React public folder directly.

Accomplishments that we're proud of

  • 🚀 Fully deployed and live — real users can access it right now at cure-ai-bay.vercel.app — no setup needed
  • 🧠 3 AI models working in production simultaneously
  • 🎨 Premium hospital-grade UI — dark theme with animations, looks like a real medical SaaS product
  • 🧪 Sample MRI images built into the website — users without MRI scans can still test the platform instantly
  • ⚠️ Smart image validation — rejects non-MRI images with helpful error messages
  • 🌍 Free for everyone — no login, no payment, works on any device, any browser
  • 📱 Fully responsive — works on mobile and desktop

What we learned

  • How to build and deploy full-stack AI applications end-to-end
  • FastAPI for serving ML models as production REST APIs
  • ONNX Runtime for efficient deep learning inference
  • React.js advanced patterns and custom CSS design systems
  • Docker containerization for ML applications with large files
  • How to handle model deployment challenges (file sizes, Python version compatibility, CORS)
  • The importance of UX in medical tools — a good interface can make life-saving technology accessible to everyone
  • Git best practices — gitignore, submodule issues, force push

What's next for Cure AI

  • 🫁 Pneumonia Detection from chest X-rays (model ready)
  • 🔐 User Login System with Firebase — save reports, track health history over time
  • 📄 PDF Report Download — professional medical reports that patients can share with doctors
  • 🌐 Hindi & regional language support for rural India
  • 👨‍⚕️ Doctor consultation booking feature
  • 🏥 Hospital API integration for research purposes

⚠️ **Medical Disclaimer:**
Cure AI is a proof-of-concept AI healthcare platform created for educational and research purposes only.
The predictions generated by the system should not be considered professional medical advice or clinical diagnosis.

Why it fits for UOE Summer of Code?

Cure AI perfectly aligns with the vision of UOE Summer of Code 2026 because it directly addresses the Healthcare & HealthTech theme — focusing on diagnostics, accessibility, and patient support systems through the power of Artificial Intelligence.

UOE Summer of Code was designed to empower participants to create impactful solutions through collaboration, creativity, and innovation — and Cure AI was built with exactly that philosophy at its core.

Instead of building just another demo application, we focused on developing a real-world healthcare platform that enables early disease awareness and AI-powered medical insights — making healthcare technology more accessible to everyone.

The project demonstrates:

  • Real-world AI & ML implementation
  • Full-stack development with production deployment
  • Deep Learning integration for medical diagnostics
  • User-focused product design & accessibility
  • Scalable and feasible healthcare innovation

Cure AI also reflects the core spirit of UOE Summer of Code:

  • Solving meaningful real-world problems through technology
  • Encouraging originality, creativity, and technical depth
  • Showcasing industry-level development from UI to deployed AI models
  • Contributing to global healthcare innovation on an open platform

From designing the UI to deploying AI models in production, every part of Cure AI was built with the goal of creating something practical, accessible, and impactful — exactly what UOE Summer of Code stands for.

We believe Cure AI represents the next generation of AI-powered healthcare innovation — a solution built not just to compete, but to create real change.

Submission Link

🔗GitHub Repository (Source Code):
https://github.com/JayendraUpadhyay/Cure_AI

Built With

Share this project:

Updates