Thanks to visit codestin.com
Credit goes to github.com

Skip to content

hmmftg/charity-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Healthcare Management System

A comprehensive healthcare management system designed for charity clinics, built with React, Material-UI, and Supabase.

πŸš€ Features

Core Functionality

  • Multi-role Authentication: Secure login with Admin, Doctor, and Patient roles
  • Patient Management: Complete patient records with medical history and demographics
  • Visit Logging: Comprehensive visit documentation for dental and general healthcare
  • Appointment Scheduling: Full calendar integration for therapy and consultation scheduling
  • Medical Records: Secure document management with file upload capabilities
  • Analytics Dashboard: Real-time clinic statistics and performance metrics

User Roles & Permissions

Admin Users

  • Full system access and user management
  • Clinic statistics and analytics dashboard
  • Patient and doctor data oversight
  • System configuration and settings

Doctor Users

  • Patient visit logging and documentation
  • Medical record access and updates
  • Appointment management
  • Treatment planning and follow-up scheduling

Patient Users

  • Personal medical history access
  • Appointment viewing and management
  • Therapy schedule tracking
  • Secure communication with healthcare providers

πŸ›  Technology Stack

  • Frontend: React 18 + TypeScript
  • UI Framework: Material-UI (MUI) v5
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth with RLS
  • State Management: React Context + Hooks
  • Build Tool: Vite
  • Styling: Material-UI Components + Custom Theme

πŸ“‹ Prerequisites

  • Node.js 18+ and npm
  • Supabase account and project
  • Modern web browser (Chrome, Firefox, Safari, Edge)

πŸš€ Setup Instructions

1. Environment Configuration

  1. Copy the environment template:

    cp .env.example .env
  2. Update .env with your Supabase credentials:

    VITE_SUPABASE_URL=your_supabase_project_url
    VITE_SUPABASE_ANON_KEY=your_supabase_anon_key

2. Database Setup

  1. Connect to Supabase: Click the "Connect to Supabase" button in the top right
  2. Run Migrations: The database schema will be automatically created
  3. Demo Data: Sample data is included for testing (optional)

3. Install Dependencies

npm install

4. Development Server

npm run dev

The application will be available at http://localhost:5173

πŸ‘₯ Demo Accounts

For testing purposes, create these accounts in Supabase Auth:

πŸ“Š Database Schema

Core Tables

  • users - User profiles and role management
  • patients - Patient demographics and medical information
  • visits - Visit records with diagnoses and treatments
  • treatments - Detailed treatment information and medications
  • medical_records - Document storage and file management
  • appointments - Scheduling and calendar management

Security Features

  • Row Level Security (RLS) enabled on all tables
  • Role-based access control policies
  • Encrypted data storage with Supabase
  • Audit trails with created/updated timestamps

πŸ”’ HIPAA Compliance Considerations

Data Security

  • All patient data encrypted at rest and in transit
  • Role-based access controls with principle of least privilege
  • Secure authentication with Supabase Auth
  • Regular security audits and access logging

Privacy Protection

  • Patient data access restricted by role
  • Audit trails for all data access and modifications
  • Secure file upload and storage for medical documents
  • Data retention policies and backup procedures

Compliance Checklist

  • Business Associate Agreement (BAA) with Supabase
  • Staff HIPAA training and access controls
  • Incident response and breach notification procedures
  • Regular security risk assessments
  • Physical safeguards for clinic devices

πŸš€ Production Deployment

Quick Vercel Deployment (Recommended for Demo)

  1. Deploy to Vercel:

    # Install Vercel CLI
    npm install -g vercel
    
    # Navigate to frontend directory
    cd frontend
    
    # Deploy
    vercel --prod
  2. Or use the deployment script:

    # Windows
    deploy-vercel.bat
    
    # Linux/Mac
    ./deploy-vercel.sh
  3. Set Environment Variables in Vercel Dashboard:

    VITE_APP_NAME=Healthcare Management System
    VITE_APP_VERSION=1.0.0
    VITE_APP_ENV=production
    VITE_DEMO_MODE=true
    VITE_SHOW_DEMO_DATA=true
    VITE_ENABLE_MOCK_DATA=true

Alternative Deployment Options

  1. Frontend: Netlify, Vercel, or GitHub Pages
  2. Database: Supabase Pro for production workloads
  3. CDN: Cloudflare for global content delivery
  4. Monitoring: Sentry for error tracking and performance

Build Command

cd frontend
npm run build

πŸ“± Mobile Optimization

The application is fully responsive and optimized for:

  • Tablets (iPad, Android tablets) - Primary clinic use case
  • Mobile phones - Emergency access and patient portal
  • Desktop - Administrative tasks and detailed documentation

πŸ”§ Development

Project Structure

src/
β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ Auth/           # Authentication components
β”‚   β”œβ”€β”€ Dashboard/      # Dashboard widgets and charts
β”‚   β”œβ”€β”€ Layout/         # Layout components (Sidebar, AppLayout)
β”‚   β”œβ”€β”€ Patients/       # Patient management components
β”‚   └── Visits/         # Visit logging components
β”œβ”€β”€ context/            # React Context providers
β”œβ”€β”€ lib/                # Utility libraries and configurations
β”œβ”€β”€ pages/              # Main page components
β”œβ”€β”€ types/              # TypeScript type definitions
└── main.tsx           # Application entry point

Available Scripts

  • npm run dev - Start development server
  • npm run build - Build for production
  • npm run preview - Preview production build
  • npm run lint - Run ESLint

πŸ†˜ Alternative Solutions

Open Source Healthcare Systems

If you need more comprehensive features, consider these established solutions:

  1. OpenMRS - Complete medical record system

    • Pros: Mature, feature-rich, international support
    • Cons: Complex setup, requires significant customization
  2. GNU Health - Hospital management system

    • Pros: Comprehensive, includes pharmacy and lab modules
    • Cons: Python-based, requires medical knowledge for setup
  3. OpenEMR - Electronic medical records

    • Pros: HIPAA compliant, extensive features
    • Cons: PHP-based, traditional architecture

Recommended Tech Stack Alternatives

For larger implementations:

  • Backend: Node.js + Express + PostgreSQL
  • Frontend: Next.js + Chakra UI or React + Ant Design
  • Database: PostgreSQL with TimescaleDB for analytics
  • Authentication: Auth0 or AWS Cognito
  • File Storage: AWS S3 with encryption
  • Deployment: AWS or Google Cloud with container orchestration

πŸ“ž Support

For production deployment and HIPAA compliance assistance, consider consulting with:

  • Healthcare IT specialists
  • HIPAA compliance attorneys
  • Cloud security experts
  • Medical informatics professionals

⚠️ Important Disclaimers

  1. Medical Compliance: This system requires proper HIPAA compliance setup for production use
  2. Security Audit: Conduct thorough security audits before handling real patient data
  3. Legal Review: Consult healthcare attorneys for regulatory compliance
  4. Backup Strategy: Implement robust backup and disaster recovery procedures
  5. Staff Training: Ensure all users receive proper training on system use and data handling

Built with ❀️ for charity clinics and healthcare accessibility

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published