Skip to content

Real-Time Blood Shortage Alert and Donor Mobilization System

License

Notifications You must be signed in to change notification settings

Kiran95021/Haemologix

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

58 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

HaemoLogix 🩸

Real-time Blood Alert System

License: MIT Node.js Next.js TypeScript PostgreSQL Deployed on Vercel PRs Welcome Open Source

HaemoLogix connects verified hospitals to nearby, eligible blood donors β€” filtered by blood group, urgency, and location.
Hospitals raise an alert, donors accept in one tap, and donations are tracked with history, eligibility, and analytics.

Because minutes matter. Every second counts when it comes to saving lives. πŸ’‰


🌟 Quick Links


πŸ“‹ Table of Contents


✨ Features

For Hospitals πŸ₯

  • Instant Alert Creation - Raise blood requests in seconds with urgency levels
  • Smart Donor Matching - AI-powered geolocation-based donor matching
  • Real-time Tracking - Monitor alert status and responses live
  • Verified System - Document-based hospital verification with OCR
  • Analytics Dashboard - Track donation history and inventory levels

For Donors 🩸

  • One-Tap Response - Accept or decline requests instantly
  • Eligibility Tracking - Automated eligibility calculations based on WHO guidelines
  • Donation History - Complete record of all donations
  • Smart Notifications - SMS and email alerts for nearby requests
  • Privacy First - Control your visibility and notification preferences

For Administrators πŸ‘¨β€πŸ’Ό

  • Verification Workflow - Approve hospitals and donors with AI assistance
  • System Monitoring - Real-time agent logs and system health
  • Analytics & Insights - Platform-wide metrics and trends
  • User Management - Comprehensive admin controls

Technical Features πŸ€–

  • AI Agent System - 6 intelligent agents (Coordinator, Donor, Hospital, Inventory, Logistics, Screening)
  • Event-Driven Architecture - Scalable and resilient system design
  • Machine Learning - Demand forecasting and intelligent matching
  • Geospatial Queries - Efficient radius-based donor search
  • Multi-Channel Notifications - SMS (Twilio) + Email (SMTP)
  • Document Processing - OCR for automatic data extraction
  • QR Code Integration - Quick donor onboarding

πŸ› οΈ Tech Stack

Frontend

  • Framework: Next.js 15 (App Router)
  • Language: TypeScript 5
  • Styling: Tailwind CSS
  • UI Components: Radix UI + shadcn/ui
  • Icons: Lucide React
  • Animations: GSAP
  • Forms: React Hook Form + Zod validation
  • Charts: Recharts
  • Maps: Google Maps API

Backend

  • Runtime: Node.js 18+
  • API: Next.js Server Actions & API Routes
  • Database: PostgreSQL (NeonDB)
  • ORM: Prisma
  • Authentication: Clerk
  • File Storage: AWS S3
  • Notifications: Twilio (SMS) + Nodemailer (Email)
  • Geocoding: Nominatim + OpenCage

AI & ML

  • OCR: Tesseract.js
  • Document Processing: pdf-lib, pdf-parse, sharp
  • ML Models: Custom training pipeline (PyTorch)
  • Inference: Hugging Face API
  • LLM: Claude 4.5 Sonnet (via OpenRouter)

DevOps & Infrastructure

  • Hosting: Vercel
  • CI/CD: GitHub Actions (via Vercel)
  • Analytics: Vercel Analytics
  • Monitoring: Custom agent logging system

πŸ“š For detailed tech stack information, see TECHSTACK.md


πŸ—οΈ Architecture

HaemoLogix uses an event-driven microservice architecture powered by AI agents:

  • Coordinator Agent: Orchestrates system-wide events
  • Donor Agent: Matches and notifies eligible donors
  • Hospital Agent: Processes alerts and requests
  • Inventory Agent: Monitors blood stock levels
  • Logistics Agent: Coordinates donation logistics
  • Screening Agent: AI-powered document verification

All agents communicate via an event bus, ensuring scalability and fault tolerance.


πŸ“Έ User Journey

Haemologix User Journey

πŸ“š Documentation

Project Documentation

Technical Documentation


πŸš€ Getting Started

Prerequisites

  • Node.js 18+ and npm/pnpm
  • PostgreSQL database (we recommend NeonDB)
  • Git

1. Clone the Repository

git clone https://github.com/Aftab48/Haemologix.app.git
cd haemologix

2. Install Dependencies

npm install
# or
pnpm install

3. Configure Environment Variables

Copy the example environment file and fill in your credentials:

cp .example.env .env.local

Required environment variables:

  • Clerk (Authentication): Get keys from clerk.com
  • NeonDB (Database): Get connection string from neon.tech
  • Twilio (SMS): Get credentials from twilio.com
  • AWS S3 (File Storage): Configure S3 bucket
  • SMTP (Email): Configure email service
  • OpenCage (Geocoding): Get API key from opencagedata.com

See .example.env for all required variables.

4. Set Up Database

npx prisma generate
npx prisma db push

5. Run the Development Server

npm run dev

Open http://localhost:3000 to see the application.

6. (Optional) Generate Synthetic Data for ML

npm run generate:data
npm run export:data

7. (Optional) Set Up ML Pipeline

cd ml
# Follow instructions in ml/README.md

🚒 Deployment

We recommend deploying via Vercel for the best experience:

Deploy with Vercel

Manual Deployment

  1. Connect your GitHub repository to Vercel
  2. Configure environment variables in the Vercel dashboard
  3. Deploy! Vercel will automatically build and deploy your app

Environment Variables in Production

Make sure to set all required environment variables in your deployment platform. See .example.env for the complete list.


🀝 Contributing

We welcome contributions from the community! HaemoLogix is open source and built with ❀️ for saving lives.

How to Contribute

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: Add AmazingFeature')
  4. Push to your branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contribution Areas

We especially welcome contributions in:

  • πŸ§ͺ Test coverage - Unit tests, integration tests
  • 🌍 Internationalization - Hindi, Bengali, Tamil, Telugu translations
  • β™Ώ Accessibility - ARIA labels, keyboard navigation
  • πŸ“± Mobile app - React Native development
  • πŸ€– ML improvements - Better forecasting models
  • πŸ“ Documentation - Guides, tutorials, API docs

Guidelines

Please read our Contributing Guide for detailed information on:

  • Code style and standards
  • Commit message conventions
  • Pull request process
  • Testing requirements
  • Documentation standards

Important: All contributors are expected to follow our Code of Conduct to ensure a welcoming and inclusive community.


πŸ”’ Security

Security is critical for a healthcare application. If you discover a security vulnerability, please follow our Security Policy.

Do NOT open a public issue for security vulnerabilities.

Report security issues to: mdalam4884@gmail.com


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright (c) 2025 Haemologix Private Limited

πŸ‘₯ Team

HaemoLogix is developed and maintained by Haemologix Private Limited.

Core Contributors

Special Thanks

We're grateful to all contributors who help make HaemoLogix better!


πŸ’¬ Support

Get Help

Community

  • ⭐ Star this repo if you find it useful!
  • 🐦 Share HaemoLogix with your network
  • 🀝 Contribute to make it better

πŸ“Š Project Status

  • βœ… Version: 0.5.1
  • βœ… Status: Active Development
  • βœ… Production: Live at haemologix.vercel.app
  • βœ… License: MIT (Open Source)

🎯 Roadmap

See CHANGELOG.md for version history and future roadmap.

Coming Soon

  • Machine learning model deployment
  • Multi-language support
  • Mobile application (React Native)
  • Government health database integration
  • Advanced analytics dashboard

🌟 Show Your Support

If HaemoLogix helps your organization or inspires your project, please:

  • ⭐ Star this repository
  • πŸ”„ Share it with others
  • 🀝 Contribute to the project
  • πŸ’¬ Spread the word about efficient blood donation

Join HaemoLogix - Because Minutes Matter 🩸

Try HaemoLogix Now | Documentation | Contributing

Made with ❀️ for humanity | Copyright © 2025 Haemologix Private Limited | MIT License

About

Real-Time Blood Shortage Alert and Donor Mobilization System

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.9%
  • Python 7.8%
  • HTML 3.1%
  • CSS 0.9%
  • JavaScript 0.1%
  • Shell 0.1%
  • Batchfile 0.1%