🩸 BloodConnect: Where Every Drop Meets a Need


🌟 Inspiration

As students at SRM University, we frequently observed urgent calls for blood donations circulating through WhatsApp groups and notice boards in common areas like the mess hall. This fragmented, manual system highlighted a critical gap in emergency healthcare coordination — one where every minute of delay can cost a life.

We realized that a centralized, intelligent platform could dramatically improve this process. That's how BloodConnect was born — a smart, community-focused application to digitize and optimize blood donation and requests, seamlessly connecting donors with those in need at the most critical moments.


🧠 What We Learned

Building BloodConnect was as much an educational journey as it was a technical one. We deepened our understanding across several domains:

📱 Full-Stack Mobile Development

Designed and built a complete mobile application — from pixel-perfect UI/UX in React Native (Expo) to a resilient RESTful backend with Node.js and Express.js, handling everything from routing to middleware and error management.

🗄️ Real-World DBMS Design

Implemented a fully normalized relational database in MySQL, progressing through multiple schema iterations to achieve Third Normal Form (3NF). We mastered:

  • Complex SQL queries (multi-table JOINs, aggregate functions)
  • Database Views for abstracted reporting
  • Triggers for automated data integrity enforcement
  • Concurrency control and crash recovery strategies

🤖 Applied AI Concepts

We implemented two core AI systems from the ground up:

1. Knowledge-Based FAQ Chatbot A rule-based system powered by keyword matching, regex parsing, and a multi-variable scoring function — no external AI API required.

2. Heuristic Donor Matching A custom search algorithm that ranks potential donors based on biological compatibility, urgency, and geographic proximity (detailed below).

🔁 Problem-Solving & Iteration

Navigated real-world challenges: debugging across the full stack, managing asynchronous race conditions, and continuously tuning AI scoring logic through testing and iteration.

🎨 User-Centric Design

Invested deeply in crafting an experience that feels intuitive under pressure — for both a panicked requester in an emergency and a casual voluntary donor browsing camps.


🏗️ How We Built It

🧰 Tech Stack

Layer Technology
Frontend React Native (Expo)
Backend Node.js + Express.js
Database MySQL (Local Dev + AWS RDS Production)
Authentication bcrypt password hashing + AuthContext + AsyncStorage
Cloud AWS RDS with environment-based fallback

🤖 AI Features Implemented

1. Rule-Based FAQ Chatbot

Integrated directly into the Explore tab, the chatbot uses a knowledge base of over 50+ curated Q&A entries organized across 7 medical categories. The response engine (getBotResponse) scores each FAQ entry against the user's query using primary keyword weights, secondary keyword weights, and related term weights.

The confidence score $S_i$ for a candidate FAQ entry $i$ is computed as:

$$ S_i = \frac{\displaystyle\sum_{k \in P_i} 3 \cdot \mathbb{1}[k \in q] + \sum_{k \in K_i} 1.5 \cdot \mathbb{1}[k \in q] + \sum_{k \in R_i} 0.5 \cdot \mathbb{1}[k \in q]}{|P_i| \cdot 3 + |K_i| \cdot 1.5} $$

Where:

  • $q$ = tokenized user query
  • $P_i$ = set of primary keywords for entry $i$
  • $K_i$ = set of general keywords for entry $i$
  • $R_i$ = set of related terms for entry $i$
  • $\mathbb{1}[\cdot]$ = indicator function (1 if match found, 0 otherwise)

The entry with the highest $S_i \geq \theta_{min}$ (minimum confidence threshold) is returned as the response.


2. Heuristic Donor Matching Algorithm

The backend endpoint /blood_requests/:id/match filters all registered donors by blood group compatibility and then ranks them using a heuristic scoring function. The match score $S(d, r)$ for donor $d$ responding to request $r$ is:

$$ S(d, r) = \bigl(w_c \cdot C(d,r)\bigr) + \bigl(w_u \cdot U(r)\bigr) - \bigl(w_d \cdot D(d,r)\bigr) $$

Where:

Variable Description
$C(d, r) \in {0, 1}$ Blood group compatibility (binary gate)
$U(r) \in {1, 2, 3}$ Urgency level of request (Low / Medium / High)
$D(d, r) \geq 0$ Normalized geographic distance between donor and requester
$w_c,\ w_u,\ w_d$ Tunable weight constants for each parameter

Donors are ranked in descending order of $S(d, r)$, ensuring the closest, most compatible donor for the most urgent request is always surfaced first.


📱 Core Application Features

  • 🔐 Secure User Registration & Login (bcrypt-hashed passwords)
  • 👤 Profile Management (view & edit personal health data)
  • 🩸 Submit & Track Real-Time Blood Requests
  • 🏥 Discover Nearby Blood Donation Camps
  • 🤖 AI-Powered FAQ Chatbot (50+ Q&As, 7 categories)
  • 🎯 Heuristic Donor Matching & Suggestion System

🧩 Challenges We Faced

🗄️ Database Design & Normalization

We iterated through multiple schema versions — eliminating partial dependencies, transitive dependencies, and redundancy — to arrive at a clean 3NF design that balanced academic rigor with real-world query performance.

🤖 AI Logic Tuning

Achieving meaningful chatbot accuracy without an external ML API required extensive tuning of keyword weights and the minimum confidence threshold $\theta_{min}$. Similarly, calibrating $w_c$, $w_u$, and $w_d$ for the donor matching algorithm required multiple testing rounds.

⚡ Async Operations & State Management

Coordinating backend API calls, live authentication state via AuthContext, and secure local session persistence via AsyncStorage in React Native demanded careful handling of race conditions and loading states.

🔄 Mindset Shift: Manual → Real-Time

The hardest challenge wasn't technical — it was re-imagining a deeply familiar, human process (WhatsApp alerts) into a structured, automated, data-driven system while preserving the urgency and human empathy it carries.

🎨 Diverse User Experience

Designing a single interface that works equally well for a panicked emergency requester and a casual voluntary donor required careful information architecture and extensive UX iteration.

🔒 Data Privacy & Security

Implementing secure password hashing (bcrypt), planning for secure storage of sensitive fields (blood type, phone numbers), and considering role-based data access throughout the system.

☁️ Cloud Environment Configuration

Managing a dual-environment setup — local MySQL for development and AWS RDS for production — including VPC security group rules, connection pooling, and environment variable management.


✅ Outcome

BloodConnect successfully transforms a fragmented, informal blood donation coordination system into a centralized, intelligent, and accessible platform.

By integrating AI-powered donor matching and instant knowledge retrieval through its chatbot, the app:

  • ⚡ Ensures faster and smarter blood request responses
  • 🤝 Facilitates verified donor-recipient connections
  • ❤️ Contributes to saving lives within our campus and beyond
  • 🚀 Lays a strong foundation for scalable humanitarian tech solutions
Share this project:

Updates