{"id":21965135,"url":"https://github.com/23blocks-os/ecg_monitor","last_synced_at":"2026-01-04T17:32:16.346Z","repository":{"id":262916830,"uuid":"888770913","full_name":"23blocks-OS/ECG_Monitor","owner":"23blocks-OS","description":"ECG Monitor with AI and IoT","archived":false,"fork":false,"pushed_at":"2024-11-15T01:21:55.000Z","size":1,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-28T01:18:33.531Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/23blocks-OS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-15T01:19:07.000Z","updated_at":"2024-11-15T01:21:59.000Z","dependencies_parsed_at":"2024-11-15T02:33:49.156Z","dependency_job_id":null,"html_url":"https://github.com/23blocks-OS/ECG_Monitor","commit_stats":null,"previous_names":["23blocks-os/ecg_monitor"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/23blocks-OS%2FECG_Monitor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/23blocks-OS%2FECG_Monitor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/23blocks-OS%2FECG_Monitor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/23blocks-OS%2FECG_Monitor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/23blocks-OS","download_url":"https://codeload.github.com/23blocks-OS/ECG_Monitor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245022074,"owners_count":20548477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T12:33:26.458Z","updated_at":"2026-01-04T17:32:16.340Z","avatar_url":"https://github.com/23blocks-OS.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# ECG Monitor - AI-Powered Portable ECG System\n\n\u003e Professional ECG monitoring for hospitals, clinics, and personal use - powered by AI\n\n**By Juan Pelaez** | [GitHub](https://github.com/23blocks-OS/ECG_Monitor)\n\n🎉 **NEW: Free for Medical Institutions, Non-Profits \u0026 Government Healthcare**\n\n## Overview\n\nA comprehensive IoT health monitoring system that brings hospital-grade ECG monitoring to everyone. Built on Raspberry Pi hardware, AWS cloud infrastructure, and Claude AI analysis, it provides real-time cardiac insights through professional web dashboards.\n\n**Designed to fill the gap:** Consumer devices like Garmin don't detect arrhythmias or use AI for medical-grade pattern recognition. ECG Monitor does both.\n\n---\n\n## Who Is This For?\n\nChoose your path to get started:\n\n| User Type | Description | Get Started |\n|-----------|-------------|-------------|\n| 🛠️ **DIY Technical User** | Build and customize everything yourself | [DIY Guide](#diy-technical-setup) |\n| 🚀 **Click-and-Go User** | Simple one-click installation | [Quick Start](#-one-click-installation-recommended) |\n| 🏥 **Nonprofit Healthcare** | Free for clinics in underserved areas | [Nonprofit Guide](#-for-nonprofit-healthcare) |\n| 🏛️ **Government Facility** | Public health institutions | [Government Guide](#-for-government-institutions) |\n| 🩺 **Medical Practice** | Private practices with licensing | [Medical Practice Guide](#-for-medical-practices) |\n| 💳 **SaaS Customer** | Fully managed service (coming soon) | [SaaS Info](#-managed-saas-coming-soon) |\n\n---\n\n### 🏥 Two Portal System\n\n**Provider Portal** (`dashboard-org`) - For Healthcare Professionals\n- Monitor multiple patients from a single dashboard\n- Search and select patients within your organization\n- View real-time ECG data for any patient\n- Track organization-wide statistics\n- Manage shared device pools\n\n**Patient Portal** (`dashboard-next`) - For Individual Patients\n- Personal health dashboard\n- View own ECG recordings and metrics\n- Access health history and AI insights\n- Track progress over time\n\n### Key Features\n\n- **24/7 Continuous Monitoring** - Track heart activity around the clock\n- **AI-Powered Analysis** - Claude API detects arrhythmias and patterns\n- **Real-time Alerts** - Email notifications for anomalies\n- **Cloud-Based** - AWS infrastructure for scalable processing\n- **Web Dashboard** - Near real-time visualization\n- **Exercise Tracking** - Monitor heart during workouts\n\n### Hardware\n\n- **Raspberry Pi 4** (or 3B+)\n- **CJMCU-1293** (ADS1293 3-channel ECG module)\n- **3-lead ECG electrodes**\n\n### Technology Stack\n\n- **Edge:** Python, SPI, MQTT\n- **Cloud:** AWS (IoT Core, Lambda, DynamoDB, S3, SQS, API Gateway)\n- **AI:** Anthropic Claude API (Claude 3.5 Sonnet)\n- **Frontend:** HTML5, JavaScript, Chart.js\n\n---\n\n## Quick Start\n\n### 🚀 One-Click Installation (Recommended)\n\nThe easiest way to get started! Interactive wizard handles everything:\n\n```bash\n# Clone repository\ngit clone https://github.com/23blocks-OS/ECG_Monitor.git\ncd ECG_Monitor\n\n# Run the installer\n./install.sh\n```\n\nThe installer will:\n- ✅ Validate prerequisites (AWS CLI, Terraform, Python)\n- ✅ Guide you through configuration questions\n- ✅ Deploy complete AWS infrastructure automatically\n- ✅ Generate Raspberry Pi configuration\n- ✅ Provide setup instructions\n\n**Time:** 15-20 minutes | **Cost:** ~$45-75/month\n\n📖 **[Complete Installation Guide →](INSTALL.md)**\n\n---\n\n### 📋 Prerequisites\n\nBefore running the installer, ensure you have:\n\n- **AWS Account** with billing enabled\n- **AWS CLI** configured (`aws configure`)\n- **Terraform** \u003e= 1.5.0\n- **Python** 3.9+\n- **Node.js** 18+ (for dashboards)\n- **Anthropic Claude API key** from [console.anthropic.com](https://console.anthropic.com/)\n\n**Hardware** (for data collection):\n- Raspberry Pi 4 (4GB RAM) or 3B+\n- CJMCU-1293 ECG module\n- 3-lead ECG electrodes\n- 32GB+ microSD card\n\n---\n\n### 🛠️ Manual Deployment (Alternative)\n\nFor advanced users who prefer manual control:\n\n\u003cdetails\u003e\n\u003csummary\u003eClick to expand manual deployment steps\u003c/summary\u003e\n\n#### 1. Configure\n\n```bash\n# Clone repository\ngit clone https://github.com/23blocks-OS/ECG_Monitor.git\ncd ECG_Monitor\n\n# Create Terraform configuration\ncd terraform/environments/poc\ncp terraform.tfvars.example terraform.tfvars\n\n# Edit terraform.tfvars with your values:\n# - alert_email (your email)\n# - anthropic_api_key (Claude API key)\n```\n\n#### 2. Deploy to AWS\n\n```bash\n# Return to project root\ncd ../../..\n\n# Run automated deployment\n./deploy.sh\n\n# This will:\n# - Build Lambda packages\n# - Deploy Terraform infrastructure\n# - Upload web dashboard to S3\n# - Generate Pi configuration\n```\n\n\u003c/details\u003e\n\n---\n\n### 4. Setup Raspberry Pi\n\n```bash\n# Copy generated config to Pi\nscp config/pi-config-deployed.yaml pi@raspberrypi:~/\n\n# On Raspberry Pi:\nssh pi@raspberrypi\n\n# Clone repo and install\ngit clone https://github.com/23blocks-OS/ECG_Monitor.git\ncd ECG_Monitor\n\n# Install dependencies\ncd pi-collector\npip3 install -r requirements.txt\n\ncd ../pi-streamer\npip3 install -r requirements.txt\n\n# Setup certificates (from Terraform output)\nmkdir -p ~/certs\n# Copy device.crt, device.key, AmazonRootCA1.pem to ~/certs/\n```\n\n### 5. Run\n\n```bash\n# On Raspberry Pi - start both services\ncd ~/ECG_Monitor\npython3 pi-collector/main.py \u0026\npython3 pi-streamer/main.py \u0026\n\n# Open web dashboard\n# Visit: https://\u003ccloudfront-url\u003e (from terraform output)\n```\n\n---\n\n## Documentation\n\n- **[Architecture](ARCHITECTURE.md)** - System design and components\n- **[Project Structure](PROJECT_STRUCTURE.md)** - Code organization\n- **[Data Flow](DATA_FLOW.md)** - Detailed data pipeline\n- **[Requirements](REQUIREMENTS.md)** - Hardware, software, and prerequisites\n- **[Setup Guides](docs/)** - Step-by-step instructions\n\n---\n\n## Project Status\n\n✅ **Status:** POC Complete - Ready for Testing\n\n### Completed\n- ✅ Architecture design \u0026 documentation\n- ✅ Terraform infrastructure (IoT, Lambda, DynamoDB, S3, API Gateway)\n- ✅ Raspberry Pi data collector (CJMCU-1293 SPI driver)\n- ✅ Cloud streamer (AWS IoT Core MQTT)\n- ✅ Lambda functions (4 functions):\n  - Preprocessor (metrics calculation)\n  - AI Analyzer (Claude 3.5 Sonnet integration)\n  - Alert Worker (email notifications)\n  - API Handler (REST endpoints)\n- ✅ Web dashboard (Chart.js visualization)\n- ✅ Deployment automation\n\n### Testing\n- ⏳ End-to-end hardware testing\n- ⏳ Long-term stability testing\n- ⏳ Claude API accuracy validation\n\n### Future Enhancements\n- ⏳ Mobile app\n- ✅ Multi-user support (COMPLETED - Provider Portal launched)\n- ✅ Organization management (COMPLETED)\n- ⏳ Advanced ML models\n- ⏳ Integration with EMR/EHR systems\n\n---\n\n## User Journey Guides\n\n### 🛠️ DIY Technical Setup\n\n**For developers and technical enthusiasts who want full control:**\n\n**You'll Need:**\n- Familiarity with: AWS, Terraform, Python, Linux, React\n- Time investment: 3-5 hours first time\n- Total cost: $115 hardware + $45-85/month\n\n**Your Journey:**\n1. Set up AWS account and tools (AWS CLI, Terraform)\n2. Get Claude API key from console.anthropic.com\n3. Clone repo and configure `terraform.tfvars`\n4. Deploy infrastructure: `./deploy.sh`\n5. Set up Raspberry Pi with hardware\n6. Deploy dashboards to Vercel or self-host\n7. Customize code to your needs\n\n**Benefits:**\n- ✅ Complete control and customization\n- ✅ Learn IoT, cloud architecture, AI integration\n- ✅ Contribute back to open source\n- ✅ No vendor lock-in\n\n**Start Here:** [BUILD_GUIDE.md](BUILD_GUIDE.md) | [ARCHITECTURE.md](ARCHITECTURE.md)\n\n---\n\n### 🏥 For Nonprofit Healthcare\n\n**Free for clinics serving underserved communities:**\n\n**Perfect For:**\n- Community health centers\n- Free clinics\n- Charitable hospitals\n- Medical missions\n- Health NGOs\n\n**What You Get:**\n- ✅ **Zero licensing costs** - 100% free\n- ✅ **Complete system** - Provider + patient portals\n- ✅ **Multi-patient monitoring** - Unlimited patients\n- ✅ **Low operating cost** - $25-50/month for 20 patients\n- ✅ **Your own AWS** - Full data control\n- ✅ **Open source** - Customize as needed\n\n**Setup Time:** 2 hours with our guided installer\n\n**Your Journey:**\n1. Run one-click installer: `./install.sh`\n2. Follow questionnaire (validates prerequisites)\n3. Infrastructure deploys automatically\n4. Deploy patient and provider portals\n5. Create organization and add staff\n6. Start monitoring patients\n\n**Cost Example:**\n- 20 patients, 5 devices\n- Hardware: $575 one-time\n- AWS: $25-50/month\n- License: **$0**\n\n**Start Here:** [CLINIC_QUICK_START.md](CLINIC_QUICK_START.md)\n\n---\n\n### 🏛️ For Government Institutions\n\n**Free for public health facilities:**\n\n**Perfect For:**\n- Public hospitals\n- Veterans Affairs facilities\n- Department of Health programs\n- Public health research\n- Emergency response teams\n\n**Why Choose This:**\n- ✅ **No licensing fees** - Free for government use\n- ✅ **Data sovereignty** - Deploy in your own cloud/on-prem\n- ✅ **Compliance ready** - Encryption, audit logs, access control\n- ✅ **Scalable** - From pilot (10 patients) to facility-wide (1000+)\n- ✅ **Customizable** - Adapt to your protocols and requirements\n\n**Deployment Models:**\n- AWS GovCloud (for compliance requirements)\n- Standard AWS (for general use)\n- Future: On-premise deployment option\n\n**Your Journey:**\n1. Security review and approval\n2. Cloud infrastructure setup (AWS/GovCloud)\n3. One-click deployment\n4. User management and training\n5. Integration with existing systems (future)\n\n**Cost Estimate (50 patients):**\n- Hardware: $1,150 (10 devices)\n- AWS: $50-100/month\n- License: **$0**\n\n**Start Here:** [ORGANIZATION_DEPLOYMENT_GUIDE.md](ORGANIZATION_DEPLOYMENT_GUIDE.md)\n\n---\n\n### 🩺 For Medical Practices\n\n**Private practices with clear licensing:**\n\n**Perfect For:**\n- Cardiology practices\n- Primary care with ECG\n- Specialty clinics\n- Private hospitals\n- Telehealth providers\n\n**Licensing:**\n- **Free** if you're operating as non-profit medical institution\n- **Commercial license** required for for-profit practices\n- Contact: GitHub @23blocks-OS for commercial licensing\n\n**What You Get:**\n- Professional-grade ECG monitoring\n- AI-powered arrhythmia detection (Claude 3.5)\n- Provider dashboard for multiple patients\n- Patient portal for self-monitoring\n- Email alerts for abnormalities\n- HIPAA-ready infrastructure\n\n**Important:** This is NOT FDA-approved. Always use alongside standard clinical ECG equipment and protocols.\n\n**Your Journey:**\n1. Determine licensing (non-profit vs for-profit)\n2. If commercial, negotiate license agreement\n3. Deploy infrastructure (2 hours)\n4. Configure organization and staff roles\n5. Integrate into clinical workflow\n6. Train staff on system use\n\n**Cost (for-profit practice, 50 patients):**\n- Hardware: $1,150 (10 devices)\n- AWS: $50-100/month\n- Commercial license: Contact for pricing\n\n**Start Here:** [LICENSE](LICENSE) | [CLINIC_QUICK_START.md](CLINIC_QUICK_START.md)\n\n---\n\n### 💳 Managed SaaS (Coming Soon)\n\n**Fully managed service with device delivery:**\n\n**Perfect For:**\n- Individuals wanting personal health monitoring\n- Practices without technical staff\n- Organizations wanting zero-setup experience\n- Anyone who prefers \"plug and play\"\n\n**What's Included (Planned):**\n- ✅ Pre-configured Raspberry Pi device delivered to you\n- ✅ Pre-installed software and certificates\n- ✅ Cloud infrastructure managed for you\n- ✅ Automatic updates and maintenance\n- ✅ Technical support\n- ✅ Dashboard hosting\n- ✅ Data backup and disaster recovery\n\n**Pricing (Estimated):**\n- Personal: $29/month + $99 device\n- Small practice (5 patients): $99/month + $99/device\n- Medium practice (20 patients): $249/month + $89/device\n- Enterprise: Custom pricing\n\n**Your Journey:**\n1. Sign up and create account\n2. Choose plan and add payment method\n3. Device(s) shipped to your address\n4. Plug in device (auto-connects)\n5. Create user accounts\n6. Start monitoring immediately\n\n**Status:** In development - Join waitlist\n**Interested?** Open an issue on GitHub expressing interest\n\n---\n\n## 🏥 For Healthcare Organizations\n\n### Quick Start for Clinics\n\n**Want to deploy this for your clinic, hospital, or healthcare organization?**\n\n📋 [Clinic Quick Start Guide](CLINIC_QUICK_START.md) - Get running in 2 hours\n📖 [Full Deployment Guide](ORGANIZATION_DEPLOYMENT_GUIDE.md) - Comprehensive setup\n\n### Why Use This for Your Organization?\n\n✅ **Free** - No licensing costs for medical institutions, non-profits, government\n✅ **Complete System** - Both provider and patient portals included\n✅ **Low Operating Cost** - ~$25-50/month AWS for small clinic (20 patients)\n✅ **Own Your Data** - Deploy in your own AWS account, full control\n✅ **HIPAA-Ready** - Encryption, access controls, audit logging built-in\n✅ **Open Source** - Customize to your needs, no vendor lock-in\n\n### What You Get\n\n- **Provider Portal** for doctors/nurses to monitor all patients\n- **Patient Portal** for patients to view their own data\n- **Multi-patient support** with organization management\n- **Device pool management** for shared ECG monitors\n- **Role-based access** (admin, doctor, nurse, patient)\n- **Organization statistics** dashboard\n- **Patient search** and selection\n- **Real-time ECG monitoring** for all patients\n\n### Cost Breakdown\n\n**Small Clinic (20 patients, 5 devices)**\n- AWS: ~$25-50/month\n- Hardware: $115 per device (one-time)\n- License: **$0** (free for medical/non-profit)\n\n**Medium Hospital (200 patients, 50 devices)**\n- AWS: ~$100-150/month\n- Hardware: $5,750 (50 devices, one-time)\n- License: **$0** (free for medical/non-profit)\n\n---\n\n## Cost Estimate\n\n**Hardware (One-time):** ~$115\n- Raspberry Pi 4: $55\n- CJMCU-1293: $25\n- Accessories: $35\n\n**Monthly Operating:** ~$45-85\n- AWS Services: $20-30\n- Claude API: $20-50\n- Electricity: $2-5\n\n---\n\n## Safety \u0026 Disclaimers\n\n⚠️ **Important Notice:**\n\n- This is a **personal research project**, not a medical device\n- **NOT intended for clinical diagnosis or treatment**\n- **NOT FDA approved or CE marked**\n- Always consult healthcare professionals for medical decisions\n- Use at your own risk\n\n---\n\n## Contributing\n\nThis is a personal project, but suggestions and feedback are welcome!\n\n1. Open an issue for bugs or feature requests\n2. Fork the repository for your own experiments\n3. Share your learnings!\n\n---\n\n## License\n\n**Dual-Use License**\n\nThis software is free for:\n- ✅ **Medical institutions** (hospitals, clinics, medical practices)\n- ✅ **Non-profit organizations** providing healthcare\n- ✅ **Government healthcare facilities**\n- ✅ **Research institutions** (with IRB approval)\n- ✅ **Personal use**\n\nFor commercial/for-profit use, a commercial license is required.\n\nSee [LICENSE](LICENSE) for full details.\n\n**Important**: This is NOT a medical device and is NOT FDA approved. Always consult healthcare professionals and follow standard clinical protocols.\n\n---\n\n## Acknowledgments\n\n- **Hardware:** Texas Instruments ADS1293 ECG chip\n- **AI:** Anthropic Claude API\n- **Cloud:** AWS\n- **Inspiration:** Need for better personal heart monitoring\n\n---\n\n## Contact\n\n**Juan Pelaez**\n- GitHub: [@23blocks-OS](https://github.com/23blocks-OS)\n- Project: [ECG_Monitor](https://github.com/23blocks-OS/ECG_Monitor)\n\n---\n\n## References\n\n- [ADS1293 Datasheet](https://www.ti.com/product/ADS1293)\n- [AWS IoT Core Documentation](https://docs.aws.amazon.com/iot/)\n- [Claude API Documentation](https://docs.anthropic.com/)\n- [ECG Signal Processing](https://en.wikipedia.org/wiki/Electrocardiography)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F23blocks-os%2Fecg_monitor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F23blocks-os%2Fecg_monitor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F23blocks-os%2Fecg_monitor/lists"}