Your Intelligent, Real-Time AI Health Companion
Built to revolutionize personal health management through AI-driven insights.
CareFlow is a modern, privacy-focused health management platform designed for the future. Built from the ground up for our hackathon presentation, CareFlow centralizes your medical timeline, analyzes complex medical reports using AI OCR, tracks medication adherence in real-time, and provides an active AI companion (CareBot) to answer your health queries based strictly on your actual medical history.
Modern healthcare data is heavily fragmented. Patients struggle to understand complex medical terminology in their lab reports, frequently miss critical medication doses, and lack a centralized timeline of their own health history. This leads to anxiety, poor adherence, and a disconnect between doctor visits.
CareFlow bridges the gap between clinical data and patient comprehension. By leveraging Large Language Models (LLMs) and advanced OCR, we translate raw medical data into actionable, easy-to-understand insightsβall accessible via an interactive, gamified dashboard connecting patients directly to their healthcare providers in real-time.
- Dual-Sided Real-Time Portal:
- π§βπΌ Patients: Can request appointments, view assigned medications with adherence charting, and interact with their AI CareBot.
- π¨ββοΈ Doctors: Can approve/decline appointments instantly, view detailed patient profiles, and dynamically prescribe medications that instantly sync to the patient's dashboard.
- π€ Interactive AI CareBot: A vectorized, physics-based companion that lives natively on your dashboard. It doesn't just chat; it holds context of your entire medical timeline, providing instant, personalized health insights.
- π Smart Report Analyzer: Upload PDFs or images of blood tests or medical reports. The built-in Vision OCR (powered by Groq) and LLM pipeline automatically extracts key metrics, flags abnormal values, and suggests critical follow-up questions for your next doctor's appointment.
- β±οΈ Unified Health Timeline: A chronologically generated, highly interactive visualization of your past appointments, uploaded reports, and medication histories. Never lose track of a diagnosis again.
- π Web Push Notifications: Real-time VAPID-based push notifications ensure patients never miss a medication dose and doctors are instantly alerted of new appointment requests.
- π Zero-Trust Security Layer: Health data requires the utmost privacy. We built a fully fledged JWT authentication and Role-Based Access Control (RBAC) system to protect highly sensitive records.
CareFlow uses a decoupled, highly scalable microservice architecture. It combines a lightning-fast Edge-rendered frontend with a heavy-lifting Python AI backend.
graph TD
subgraph Frontend ["Next.js (Edge-Rendered UI)"]
direction TB
PatientUI["Patient Portal<br/>(Dashboard, Insurance, Timeline)"]
ProviderUI["Provider Portal<br/>(Patient List, Adherence Analytics)"]
State["Zustand + React Query"]
PatientUI -.-> State
ProviderUI -.-> State
end
subgraph Backend ["FastAPI (Python 3.12 Core)"]
direction TB
Auth["JWT & RBAC Middleware"]
API_Patient["Patient & Insurance Routers"]
API_Provider["Dashboard & Provider Routers"]
Auth --> API_Patient
Auth --> API_Provider
end
subgraph AI_Engine ["LangChain AI Engine"]
direction TB
OCR["Vision OCR<br/>(Medical Reports)"]
Bot["CareBot LLM<br/>(Contextual Chat)"]
InsuranceAI["Insurance Chain<br/>(Coverage Analysis)"]
VectorDB[("FAISS Vector Store")]
OCR --> Bot
Bot <--> VectorDB
InsuranceAI <--> VectorDB
end
subgraph Database ["Persistence Layer"]
direction TB
NeonDB[("NeonDB (Serverless Postgres)")]
ORM["SQLAlchemy & Alembic"]
ORM --> NeonDB
end
%% Flow connections
State <-->|REST API| Auth
API_Patient <--> OCR
API_Patient <--> InsuranceAI
API_Patient <--> ORM
API_Provider <--> ORM
| Category | Technologies Used |
|---|---|
| Frontend UI/UX | Next.js 14, React, Tailwind CSS, Shadcn UI, Framer Motion |
| State Management | Zustand, React Query |
| Backend API | Python 3.12, FastAPI, Pydantic |
| AI & NLP | Groq (Llama 3 / Qwen Vision), LangChain, FAISS Vector Store |
| Database & ORM | NeonDB (PostgreSQL), SQLAlchemy, Alembic Migrations |
| Cloud Services | Cloudinary (File Storage), Web Push (VAPID) |
To run CareFlow locally, you must configure the environment variables for the backend. Create a .env file inside the backend/ directory with the following keys:
# Database Configuration (We recommend NeonDB for serverless Postgres)
DATABASE_URL=postgresql://[user]:[password]@[neon_hostname]/[dbname]?sslmode=require
# Security
SECRET_KEY=your_super_secret_jwt_key_here
# AI & LLM (Groq)
GROQ_API_KEY=your_groq_api_key_here
# Cloudinary (For Medical Report PDF/Image Uploads)
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
# Web Push Notifications (Generate via `vapid --generate`)
VAPID_PRIVATE_KEY=your_vapid_private_key
VAPID_SUBJECT=mailto:admin@yourdomain.comWant to run CareFlow locally? Follow these steps to get the microservices up and running.
- Node.js >= 18.x
- Python >= 3.10
git clone https://github.com/AshrafGalaxy/CareFlow.git
cd CareFlowCareFlow uses Alembic to manage database migrations. Make sure your DATABASE_URL is set in the .env file first.
# Set up the python virtual environment
cd backend
python -m venv venv
# Activate on Windows:
.\venv\Scripts\activate
# Activate on Mac/Linux:
source venv/bin/activate
# Install requirements
pip install -r requirements.txt
# Initialize the Database Schema (CRITICAL STEP)
alembic upgrade head
# Start the FastAPI Server (runs on http://localhost:8000)
uvicorn main:app --reload --port 8000Open a new terminal window:
# Install dependencies
cd frontend
npm install
# Start the Next.js development server (runs on http://localhost:3000)
npm run devBuilt with β€οΈ by passionate developers aiming to revolutionize digital health.
Sharayu |
Shweta |
Ronit |
Ashraf |
Distributed under the MIT License. See LICENSE for more information.