An AI-powered health data analysis tool built with Next.js, Clerk authentication, and Google's Gemini AI.
- 🧠 AI chat interface for answering health questions
- 📊 Upload health reports and lab results for AI analysis
- 📈 Health Trends for tracking changes in lab results over time
- 💉 Lab Analyzer for detailed bloodwork and test result analysis
- 💬 Chat History for saving and retrieving past conversations
- 🔐 Clerk user authentication for secure, personalized experience
- ⚙️ Admin console for system configuration and API key management
- 🌙 Elegant, dark-themed UI focused on readability and usability
- 📄 Multi-format upload support (PDF, JPEG, CSV, Excel, TXT)
- 🏥 Educational health explanations with simplified medical terminology
- 📱 Responsive design for desktop, tablet, and mobile devices
- Node.js 18 or higher
- npm or yarn
- Google Gemini API key (get from Google AI Studio)
- Clerk account for authentication (sign up at clerk.dev)
# Clone the repository
git clone https://github.com/yourusername/health-insights-ai.git
cd health-insights-ai
# Install dependencies
npm install
# Set up environment variables
cp .env.example .env.local
# Edit .env.local with your API keys and settings
# Set up the database
npm run db:setup
# Start development server
npm run dev
The app will be available at http://localhost:3000
- Implementation Guide - Complete setup and development guide
- Database Setup - Database configuration and migration instructions
- Authentication - Clerk authentication setup and configuration
- Developer Documentation - Technical architecture and code organization
The main interface allows users to:
- Ask health-related questions directly to the AI
- Upload health reports for AI analysis
- Receive educational explanations about health metrics
Upload bloodwork or other lab reports to get a detailed analysis of your health metrics, including:
- Explanation of each biomarker and its significance
- Visual indicators for values outside normal ranges
- Educational context about body systems and health implications
- Personalized insights based on your specific values
Track changes in your health metrics over time:
- Upload multiple reports from different dates
- Select specific biomarkers to compare
- Visualize trends and changes
- Understand the significance of changing health metrics
When signed in, the app saves your conversation history:
- View all previous conversations with the AI assistant
- Continue past conversations where you left off
- Delete unwanted chat threads
- Access insights from previous analyses
Access the admin console at /admin
to:
- Configure the system prompt that guides the AI behavior
- Update API keys without redeploying the application
- Set fallback models and output parameters
- Monitor system status and API usage
Key environment variables for configuration:
# Authentication with Clerk
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
CLERK_SECRET_KEY=your_clerk_secret_key
# Google Gemini AI
GEMINI_API_KEY=your_gemini_api_key
# Admin Access
ADMIN_PASSWORD=your_admin_password
See .env.example for a complete list of configuration options.
This app is optimized for deployment on Vercel:
- Push your code to a GitHub repository
- Import your repository in the Vercel dashboard
- Configure environment variables
- Deploy
- Development: SQLite (default)
- Production: PostgreSQL recommended (set via
DATABASE_URL
)
- Frontend: Next.js 14+, React 18+, TypeScript
- Authentication: Clerk
- Database: Prisma ORM with SQLite/PostgreSQL
- Styling: Tailwind CSS with custom health-themed components
- AI: Google Gemini API, AI SDK
- File Processing: Server-side PDF and image processing
Health Insights AI provides educational information only, not medical advice. Always consult qualified healthcare professionals for medical decisions.
Contributions are welcome! Please check out our contribution guidelines for details.