Skip to content

About

Haemologix - India's real-time emergency blood network connecting hospitals and blood banks with nearby eligible donors.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

29 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

181 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Haemologix 🩸

India's real-time emergency blood network β€” haemologix.in

License: MIT Node.js Next.js TypeScript PostgreSQL Live PRs Welcome Open Source

Haemologix is an Indian emergency blood network that connects hospitals and blood banks with nearby eligible blood donors through real-time alerts, so urgent blood, plasma and platelet requirements are met in minutes.

Hospitals raise an alert, matched donors (by blood group, distance and eligibility) are notified instantly and accept in one tap, and every donation is tracked with history, eligibility and analytics. Built and operated by Haemologix Private Limited, Howrah, West Bengal, India β€” www.haemologix.in.

Not to be confused with HaemaLogiX (haemalogix.com), an unrelated Australian biotech company.

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. Run with Docker (Optional)

Docker runs the production Next.js server and uses the PostgreSQL/NeonDB connection configured in .env.local.

docker compose up --build

Or build and run the image directly:

docker build --secret id=env,src=.env.local -t haemologix .
docker run --env-file .env.local -p 3000:3000 haemologix

The build secret makes build-time values available to Next.js without copying the environment file into an image layer. Stop Compose with docker compose down.

7. (Optional) Generate Synthetic Data for ML

npm run generate:data
npm run export:data

8. (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.in
  • βœ… 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 © 2026 Haemologix Pvt. Ltd. | MIT License

About

Haemologix - India's real-time emergency blood network connecting hospitals and blood banks with nearby eligible donors.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

29 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages