Skip to content

Nili-L/HealthCompanion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

HealthCompanion

A comprehensive healthcare management platform with 28+ fully functional modules providing inclusive, patient-centered care with robust mental health support, advanced trend analysis, AI insights, and complete file management. Built with React, TypeScript, Vite, and Supabase.

πŸ”— GitHub Repository: https://github.com/Nili-L/HealthCompanion

Overview

HealthCompanion is a full-featured healthcare portal supporting both patient and provider workflows. The platform emphasizes mental health tracking, evidence-based assessments, inclusive care practices, intelligent data analytics with AI-powered insights, community support, and comprehensive health journey visualization.


🎯 All Modules (28 Fully Functional)

Personal Health Management

  1. Patient Profile - Demographics, providers, emergency contacts, kupat holim
  2. Health History - Mental, physical, familial, genetic history tracking
  3. Period Tracking ✨ NEW - Menstrual cycle monitoring with predictions
  4. Patient Journal ✨ NEW - Private reflections and knowledge base

Medical Records & Documentation

  1. Medical Documents - File upload/download with Supabase Storage
  2. Medical Imaging ✨ NEW - X-rays, MRI, CT scans, ultrasounds
  3. OCR Scanning ✨ NEW - Extract text from medical documents
  4. Media Library ✨ NEW - Art, music, photos, therapeutic content

Clinical Tracking & Monitoring

  1. Medication Tracking - Schedules, adherence, refill requests
  2. Symptom Tracking - Daily logs with AI-powered trend analysis
  3. Lab Results & Vitals - Charts with week-over-week trends
  4. Appointment Scheduling - Calendar-based booking system

Mental Health & Assessments

  1. Mental Health Questionnaires - PHQ-9, GAD-7, PCL-5, ASRS, PSS-10, Y-BOCS with score trends

Communication & Care

  1. Secure Messages - Patient-provider and patient-patient messaging
  2. Community Platform ✨ NEW - Peer support, forums, anonymous posting
  3. Care Team - Healthcare provider directory
  4. Follow-Up Plans ✨ NEW - Post-appointment action tracking

Financial & Insurance

  1. Insurance & Billing - Policies, claims, payment history
  2. Financial Management ✨ NEW - Receipts, refunds, authorizations, permits

Goals & Planning

  1. Health Goals - Goal setting with progress tracking
  2. To-Do Lists ✨ NEW - Manual and OCR-generated tasks

Analytics & Insights

  1. Health Insights ✨ NEW - AI-generated reports with comparisons
  2. Health Timeline ✨ NEW - 3D visualization of health journey

Tools & Organization

  1. Mind Maps ✨ NEW - Visual health factor connections
  2. Request Templates ✨ NEW - Pre-filled forms for common requests

Support & Help

  1. Support Tickets ✨ NEW - Issue tracking system
  2. Help & FAQs ✨ NEW - Documentation and tutorials
  3. Search & Export - Integrated across multiple modules

✨ Latest Features (v1.2.0)

πŸ†• 16 New Modules Added

Health Tracking Enhancements

  • Period Tracking: Cycle monitoring, symptom tracking, flow intensity, predictions
  • Medical Imaging: Comprehensive imaging study management (X-Ray, MRI, CT, Ultrasound, PET, Mammogram)
  • OCR Scanning: Automatic text extraction from medical documents and prescriptions

Personal Tools

  • Patient Journal: Private reflections, mood tracking, searchable entries with tags
  • Media Library: Store art, music, photos, and therapeutic content with categorization
  • To-Do Lists: Task management with manual, OCR-extracted, and system-generated tasks
  • Mind Maps: Node-based visualization of health connections and relationships

Communication & Community

  • Community Platform: Social support network with forums, anonymous posting, likes, and comments
  • Follow-Up Plans: Post-appointment care tracking with due dates and task management

Financial & Administrative

  • Financial Management: Complete system for receipts, refunds, payments, authorizations, and permits
  • Support Tickets: Priority-based issue tracking with categories and status management
  • Request Templates: Pre-filled forms for records, referrals, prescriptions, appointments, and authorizations

Analytics & Visualization

  • Health Insights: AI-generated reports with side-by-side trend comparisons
  • Health Timeline: Interactive 3D visualization of health journey over time

Support & Documentation

  • Help & FAQs: Comprehensive documentation, searchable FAQs, video tutorials

πŸ“Š Intelligent Trend Analysis

Symptom Tracking Trends

  • Week-over-week comparison with AI-powered pattern recognition
  • Visual trend indicators (TrendingUp/Down) with color-coded alerts
  • Correlation detection (e.g., "Higher stress correlates with poorer sleep")
  • Multi-metric analysis tracking anxiety, depression, stress, pain, sleep quality
  • Smart insights: "Anxiety improved 25%" or "Pattern: stress affects sleep"

Mental Health Questionnaire Score Trends

  • Latest score prominently displayed on questionnaire cards
  • Percentage change between assessments with visual arrows
  • Progress detection: "Your symptoms have improved by 5 points since your last assessment"
  • Historical comparison in assessment history view

Lab Results & Vitals Trend Indicators

  • Summary Stats Cards showing latest values for key vitals
  • Week-over-week trend badges (improving/declining/stable)
  • Vital sign card comparisons (BP, glucose, heart rate) vs previous readings
  • Lab result trend tracking comparing current vs previous tests
  • Color-coded indicators: green (good), red (concerning), gray (stable)
  • Inverse logic handling (lower BP = better, higher O2 = better)

πŸ“ File Upload/Download System

Medical Documents with Supabase Storage

  • Real file upload (not just references) with 10MB limit
  • Supported formats: PDF, Word docs, images (JPG, PNG, GIF), text files
  • Secure signed URL downloads (60-second expiration)
  • Automatic file deletion when documents are removed
  • File metadata tracking (name, size, type, storage path)
  • Upload progress indicators and file preview
  • See SUPABASE_STORAGE_SETUP.md for configuration details

Media Library

  • Upload art, music, photos, videos, and documents
  • Category-based organization
  • File type detection and validation
  • Download and sharing capabilities

🧠 Mental Health Features

Comprehensive Symptom Tracking with AI Insights

Track symptoms across multiple categories:

  • Depression symptoms (13 specific items)
  • Anxiety symptoms (15 specific items)
  • Panic attack tracking (13 symptoms)
  • PTSD symptoms (12 items)
  • Complex PTSD symptoms (10 items)
  • Dissociation scale
  • EDS/Hypermobility symptoms (15 items + 15 joint locations)
  • Migraine tracking with phases, aura symptoms
  • Hormonal tracking for men and women
  • Cross-cutting: pain scale, fatigue, sleep quality, stress, mood, triggers

AI-Powered Insights Card

  • Automatic pattern detection across all metrics
  • Color-coded insights (green = positive, amber = warning, blue = info)
  • Examples:
    • βœ… "Anxiety levels improved by 25% compared to last week. Keep up the great work!"
    • ⚠️ "Depression symptoms worsened by 30%. Please consult with your provider."
    • ℹ️ "Pattern detected: Higher stress correlates with poorer sleep"
    • πŸŽ‰ "Excellent progress! 3 key metrics are improving this week"
  • Correlation analysis between metrics

Evidence-Based Mental Health Assessments

  • PHQ-9 (Depression): 9-item questionnaire with severity classification
  • GAD-7 (Anxiety): 7-item scale with clinical cutoffs
  • PCL-5 (PTSD): 20-item assessment for trauma symptoms
  • ASRS (ADHD): Adult ADHD Self-Report Scale with Part A & B
  • PSS-10 (Stress): Perceived Stress Scale
  • Y-BOCS (OCD): Yale-Brown Obsessive Compulsive Scale

Features:

  • Interactive questionnaires with progress tracking
  • Score calculation with severity interpretation
  • Historical trend analysis comparing assessments over time
  • Visual indicators showing improvement/decline
  • Detailed results view with item-level breakdown
  • Export functionality for sharing with providers

πŸ‘₯ Community & Communication

Community Platform

  • Forum-style discussions with categories
  • Anonymous posting option for privacy
  • Post likes, comments, and sharing
  • Active member statistics
  • Safe, supportive peer environment

Secure Messaging

  • Patient-to-provider messaging
  • Patient-to-patient communication
  • Threaded conversations
  • Read receipts and urgent flags
  • Attachment support

πŸ—‚οΈ Organizational Tools

To-Do Lists

  • Manual task entry
  • OCR-extracted tasks from documents
  • System-generated tasks from appointments
  • Priority levels and due dates
  • Completion tracking

Mind Maps

  • Node-based visualization system
  • Create connections between health factors
  • Drag-and-drop interface
  • Export and share functionality

Request Templates

Pre-filled forms for:

  • Medical records requests
  • Specialist referrals
  • Prescription refills
  • Appointment requests
  • Insurance authorizations
  • Lab results requests

πŸ’° Financial Management

Complete Financial Tracking

  • Receipts: Download and organize medical receipts
  • Refunds: Track refund requests and status
  • Payments: Payment history with status badges
  • Authorizations: Pre-authorization tracking for procedures
  • Permits: Medical parking permits, equipment permits

πŸ“ˆ Analytics & Visualization

Health Insights Reports

  • AI-generated trend analysis
  • Side-by-side metric comparisons
  • Mental health trends (anxiety, stress, sleep)
  • Physical health trends (BP, pain, energy)
  • Comprehensive 30-day health summary
  • PDF export and email to provider

Health Timeline

  • Interactive 3D visualization
  • Scroll through health history
  • Key events timeline
  • Trend summaries by period
  • Week/month/year/all-time views

πŸ› οΈ Technical Stack

Frontend

  • React 18 with TypeScript
  • Vite for fast build tooling
  • Tailwind CSS for styling
  • shadcn/ui component library (50+ Radix UI components)
  • Recharts for data visualization
  • Lucide React for icons

Backend

  • Supabase for authentication and storage
  • Hono server framework on Deno
  • Edge Functions for serverless API
  • KV Store for data persistence

Features

  • File Upload: Supabase Storage with signed URLs
  • Authentication: JWT-based with Supabase Auth
  • Real-time Updates: Optimistic UI updates
  • Responsive Design: Mobile-first approach

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Supabase account (free tier works)

Installation

# Clone the repository
git clone https://github.com/Nili-L/HealthCompanion.git
cd HealthCompanion

# Install dependencies
npm install

# Start development server
npm run dev

The app will open at http://localhost:3000

Demo Accounts

Demo accounts start with empty profiles for users to fill in their own information.

  • Patient: patient@demo.com / demo123

    • Empty profile ready to be completed
    • No pre-filled data - start fresh
  • Provider: provider@demo.com / demo123

Note: Demo accounts provide a clean slate for testing the application with your own data.


πŸ“‘ API Endpoints

Authentication

  • POST /make-server-50d6a062/signup - Create new account
  • POST /make-server-50d6a062/login - User login
  • GET /make-server-50d6a062/user - Get user info

Health Records

  • GET/PUT /make-server-50d6a062/profile - Patient profile
  • GET/PUT /make-server-50d6a062/health-history - Health history

Medications & Providers

  • GET/POST/PUT/DELETE /make-server-50d6a062/medications
  • GET/POST/PUT/DELETE /make-server-50d6a062/providers
  • GET/POST/PUT/DELETE /make-server-50d6a062/emergency-contacts
  • GET/POST/PUT/DELETE /make-server-50d6a062/kupat-holim

Documents & Imaging

  • GET/POST/DELETE /make-server-50d6a062/documents
  • POST /make-server-50d6a062/documents/upload - File upload
  • GET /make-server-50d6a062/documents/:id/download - Signed URL
  • GET/POST /make-server-50d6a062/imaging - Medical imaging

Clinical Data

  • GET/POST/PUT/DELETE /make-server-50d6a062/appointments
  • GET/POST /make-server-50d6a062/lab-results
  • GET/POST /make-server-50d6a062/vitals
  • GET/POST/DELETE /make-server-50d6a062/symptoms

Mental Health

  • GET/POST/PUT/DELETE /make-server-50d6a062/questionnaires
  • GET/POST /make-server-50d6a062/questionnaire-responses
  • GET/PUT /make-server-50d6a062/assigned-questionnaires

Communication

  • GET/POST /make-server-50d6a062/messages
  • GET/POST/DELETE /make-server-50d6a062/care-team

Financial & Planning

  • GET/PUT /make-server-50d6a062/insurance
  • GET/POST/PUT/DELETE /make-server-50d6a062/goals
  • GET/POST /make-server-50d6a062/follow-up-plans

New Module Endpoints ✨

  • GET/POST /make-server-50d6a062/periods - Period tracking
  • GET/POST/DELETE /make-server-50d6a062/media - Media library
  • GET/POST/DELETE /make-server-50d6a062/journal - Patient journal
  • GET/POST/PUT /make-server-50d6a062/todos - To-do lists
  • GET/POST /make-server-50d6a062/tickets - Support tickets
  • GET/POST /make-server-50d6a062/community/posts - Community posts
  • POST /make-server-50d6a062/community/posts/:id/like - Like post

πŸ—‚οΈ Project Structure

src/
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ ui/                          # shadcn/ui components (50+)
β”‚   β”œβ”€β”€ PatientProfile.tsx           # Profile management
β”‚   β”œβ”€β”€ HealthHistory.tsx            # Health intake
β”‚   β”œβ”€β”€ MedicationManager.tsx        # Medication tracking
β”‚   β”œβ”€β”€ MedicalDocuments.tsx         # Document management
β”‚   β”œβ”€β”€ AppointmentScheduling.tsx    # Appointments
β”‚   β”œβ”€β”€ LabResultsVitals.tsx         # Labs & vitals with trends
β”‚   β”œβ”€β”€ SymptomTracking.tsx          # Symptom tracking with AI
β”‚   β”œβ”€β”€ SecureMessages.tsx           # Messaging system
β”‚   β”œβ”€β”€ CareTeam.tsx                 # Provider directory
β”‚   β”œβ”€β”€ InsuranceBilling.tsx         # Insurance & billing
β”‚   β”œβ”€β”€ HealthGoals.tsx              # Goal tracking
β”‚   β”œβ”€β”€ MentalHealthQuestionnaires.tsx # Assessments
β”‚   β”œβ”€β”€ PeriodTracking.tsx           # ✨ NEW
β”‚   β”œβ”€β”€ MediaLibrary.tsx             # ✨ NEW
β”‚   β”œβ”€β”€ OCRScanning.tsx              # ✨ NEW
β”‚   β”œβ”€β”€ CommunityPlatform.tsx        # ✨ NEW
β”‚   β”œβ”€β”€ PatientJournal.tsx           # ✨ NEW
β”‚   β”œβ”€β”€ TodoLists.tsx                # ✨ NEW
β”‚   β”œβ”€β”€ InsightReports.tsx           # ✨ NEW
β”‚   β”œβ”€β”€ FollowUpPlans.tsx            # ✨ NEW
β”‚   β”œβ”€β”€ FinancialManagement.tsx      # ✨ NEW
β”‚   β”œβ”€β”€ TicketSystem.tsx             # ✨ NEW
β”‚   β”œβ”€β”€ TimelineVisualization.tsx    # ✨ NEW
β”‚   β”œβ”€β”€ RequestTemplates.tsx         # ✨ NEW
β”‚   β”œβ”€β”€ MindMaps.tsx                 # ✨ NEW
β”‚   β”œβ”€β”€ HelpManual.tsx               # ✨ NEW
β”‚   β”œβ”€β”€ MedicalImaging.tsx           # ✨ NEW
β”‚   └── HealthcareDashboard.tsx      # Main dashboard
β”œβ”€β”€ supabase/
β”‚   └── functions/
β”‚       └── server/
β”‚           β”œβ”€β”€ index.tsx            # API server (440+ endpoints)
β”‚           └── kv_store.tsx         # Data persistence
└── utils/
    └── supabase/
        β”œβ”€β”€ client.tsx               # Supabase client
        └── info.tsx                 # Configuration

πŸ” Security & Privacy

  • HIPAA-Aware Design: Secure data handling practices
  • Authentication: JWT tokens with Supabase Auth
  • Private Storage: RLS policies on Supabase Storage
  • Signed URLs: Time-limited file access (60s)
  • User Isolation: Data segregated by user ID
  • Anonymous Options: Community posts can be anonymous

🌟 Inclusive Care Features

  • Chosen Name & Pronouns: Respect patient identity
  • Gender-Affirming Care: Specialized tracking
  • Customizable Forms: Flexible intake questions
  • Accessibility: WCAG 2.1 considerations
  • Cultural Sensitivity: Inclusive language throughout

πŸ“¦ Build & Deploy

# Development
npm run dev

# Production build
npm run build

# Preview production build
npm run preview

Build output: build/ directory

  • Bundle size: ~1,280 KB (334 KB gzipped)
  • 2,428 modules transformed
  • Build time: ~22 seconds

πŸ—ΊοΈ Roadmap

Near-Term

  • Implement dynamic imports for code splitting
  • Add unit tests for components
  • Provider-specific module variations
  • Enhanced data visualization
  • Mobile app (React Native)

Future Enhancements

  • Virus scanning for uploaded files
  • PDF preview in browser
  • Image thumbnail generation
  • Batch file upload
  • File versioning
  • Encrypted storage
  • OCR for scanned documents
  • File sharing between patient and provider
  • Telehealth video integration
  • Wearable device integration
  • AI chatbot for health questions
  • Multi-language support

πŸ“„ License

MIT License - see LICENSE file for details


🀝 Contributing

Contributions welcome! Please read CONTRIBUTING.md for guidelines.


πŸ“ž Support


πŸ™ Acknowledgments


Version: 1.2.0 Last Updated: 2025-10-02 Status: βœ… Production Ready - 28 Fully Functional Modules

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors