OpenMed AI is an open-source platform designed to democratize health data analysis by giving individuals the power to understand their own medical data through AI-powered insights. Upload your blood work, genetic testing results, and get personalized health insights through natural language conversations. Open med can also run 100% locally including local LLM support for complete data privacy! Check out the Live Demo
Healthcare data should be accessible and understandable to everyone. OpenMed AI empowers individuals to:
- Take ownership of their health data
- Gain insights from complex medical reports
- Make informed decisions about their health
- Bridge the gap between raw data and actionable knowledge
- Upload lab results (PDF, CSV, JSON formats)
- Automatic biomarker extraction and interpretation
- Reference range comparisons with visual indicators
- Trend analysis across multiple test dates
- Out-of-range value identification with explanations
- Support for 23andMe, AncestryDNA, and other raw genetic data
- RSID-based variant lookup and interpretation
- Disease risk assessment based on genetic variants
- Pharmacogenomics insights for drug metabolism
- Evidence-based genetic recommendations
- Real-time PubMed and medical database searches
- Evidence-based explanations for findings
- Latest research integration for personalized insights
- Citation-backed recommendations
- Natural language conversations about your health data
- Multi-step analysis with tool calling
- Personalized insights based on your medical profile
- Interactive data visualizations and cards
- Local data processing options
- Encrypted data storage
- Row-level security policies
- Custom OpenAI API key support (bypass usage limits)
- Complete data ownership and control
- Usage limits with premium/basic tiers
- Demo mode with sample data
- Conversation history and management
- Medical profile integration
- Multi-model AI support (GPT-4, GPT-5 variants, local Ollama)
- Frontend: Next.js 15, React 18, TypeScript, Tailwind CSS
- UI Components: shadcn/ui, Radix UI primitives
- Backend: Next.js API routes with serverless functions
- Database: Supabase (PostgreSQL) with Row Level Security
- AI/ML: OpenAI GPT models (GPT-4, GPT-4 Turbo, GPT-o1), Local Ollama models
- Authentication: Supabase Auth with social providers
- File Processing: PDF parsing, CSV processing, genetic data formats
- Deployment: Vercel (recommended) with Supabase cloud integration
Before you begin, ensure you have the following installed:
- Node.js 20+ (managed with nvm recommended)
- Docker Desktop (required for local Supabase)
- Git for version control
- OpenAI API key for AI features
# Clone the repository
git clone https://github.com/ianrowan/OpenMed.git
cd OpenMed
# Use Node 20 (recommended)
nvm use
# Install all dependencies
npm install# Start local Supabase (requires Docker Desktop)
npx supabase startThis will:
- Start PostgreSQL, Auth, Realtime, Storage, and Edge Functions
- Create a local Supabase instance on
http://localhost:54323 - Provide local development keys
# Copy environment template
cp .env.example .env.localAfter running npx supabase start, you'll see output with local credentials. Update .env.local:
# OpenAI Configuration
OPENAI_API_KEY=your_openai_api_key_here
# Local Supabase Configuration (from supabase start output)
NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_local_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_local_service_role_key
# Optional: Production Supabase (for deployment)
# NEXT_PUBLIC_SUPABASE_URL=your_production_supabase_url
# NEXT_PUBLIC_SUPABASE_ANON_KEY=your_production_anon_key
# SUPABASE_SERVICE_ROLE_KEY=your_production_service_role_keyChoose one of these methods to set up the database:
Option A: Command Line (Recommended)
# Apply database schema and seed data
cat complete_database_setup.sql | supabase db queryOption B: Supabase Dashboard
- Visit the local dashboard: http://localhost:54323/
- Navigate to SQL Editor
- Copy and paste the contents of
complete_database_setup.sql - Execute the SQL
# Start the development server
nvm use && npm run devOpen http://localhost:3000 to view the application.
OpenMed/
βββ app/ # Next.js 15 app router
β βββ api/ # API routes
β βββ auth/ # Authentication pages
β βββ chat/ # Chat interface
β βββ dashboard/ # User dashboard
βββ components/ # Reusable React components
β βββ chat/ # Chat-related components
β βββ dashboard/ # Dashboard components
β βββ ui/ # shadcn/ui components
βββ lib/ # Utility functions and configurations
βββ supabase/ # Database migrations and types
βββ tools/ # AI function calling tools
βββ types/ # TypeScript type definitions
IMPORTANT: This application is for informational and educational purposes only. It is not intended to diagnose, treat, cure, or prevent any disease. Always consult with a qualified healthcare professional for medical advice. Do not make medical decisions based solely on this application.
- Visit the application without signing up to explore sample data
- Try uploading the provided sample files in
/sample-data/ - Experience the full feature set with test medical data
- Create an account or sign in
- Upload your medical data:
- Blood work (PDF lab reports, CSV exports)
- Genetic data (23andMe, AncestryDNA raw files)
- Chat with your data using natural language
- Explore insights through AI-powered analysis
- Optional: Add your own OpenAI API key to bypass usage limits
# Development
nvm use && npm run dev # Start development server
npm run build # Build for production
npm run start # Start production build
# Database
npx supabase start # Start local Supabase
npx supabase stop # Stop local Supabase
npx supabase db reset # Reset local database
npx supabase db query # Run SQL queries
# Code Quality
npm run lint # Run ESLint
npm run type-check # TypeScript type checking-
Deploy to Vercel:
# Deploy with Vercel CLI npx vercel --prod -
Set up production Supabase:
- Create a new project at supabase.com
- Run the database setup SQL in the Supabase dashboard
- Update environment variables in Vercel
-
Configure environment variables in Vercel dashboard with production values
We welcome contributions to democratize health data analysis! Here's how to get involved:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Follow the local development setup above
- Make your changes and test thoroughly
- Submit a pull request
- Follow existing code style and TypeScript patterns
- Add tests for new features
- Update documentation for user-facing changes
- Keep medical accuracy and user privacy as top priorities
- 𧬠Additional genetic data format support
- π New data visualization components
- π Enhanced medical literature search capabilities
- π Internationalization and accessibility
- π± Mobile application development
- π Additional privacy and security features
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Join community discussions in GitHub Discussions