DonateNow
Right blood. Right donor. Right now.
An AI-powered emergency blood donation and coordination network that transforms scattered requests into structured, prioritized, and actionable opportunities to save lives.
Inspiration
In an emergency, finding the right blood donor should not depend on how quickly someone can forward a WhatsApp message to hundreds of groups.
In many communities, including Pakistan, emergency blood requests are circulated through WhatsApp groups, personal contacts, and social media. These requests often contain unstructured information, inconsistent formats, voice notes, and incomplete medical details.
Someone urgently looking for blood might have to manually search through messages, contact potential donors individually, and figure out whether the information being circulated is even reliable.
Meanwhile, potential donors may be nearby but never see the request. Worse, fraudulent requests, payment scams, and duplicate posts can exploit the urgency and trust associated with blood donation.
We wanted to approach this problem differently.
What if emergency blood coordination could work like an intelligent dispatch network, with automated safeguards against abuse?
Instead of making people search through endless messages, we built DonateNow to intelligently process requests, organize emergencies, evaluate donor compatibility, detect suspicious activity, and connect people who need blood with potential donors.
What it does
DonateNow is a peer-to-peer emergency blood donation and coordination platform designed to make the process of finding and coordinating blood donations faster, safer, and more organized.
1. AI-powered emergency request extraction
Emergency requests don't always arrive in clean, structured formats.
Users can paste forwarded WhatsApp messages written in English, Urdu, or Roman Urdu. DonateNow uses Meta Llama 3.1 8B Instruct to extract relevant information and transform unstructured messages into structured blood donation requests.
This includes information such as:
- Required blood group.
- Hospital and location.
- Number of blood units required.
- Patient and requester information.
- Emergency details.
Instead of manually filling out every field, users can turn an existing emergency message into a structured request.
2. Voice note processing
Not everyone communicates through text.
DonateNow supports voice-based emergency request intake. Users can upload audio recordings, which are transcribed using OpenAI Whisper through Cloudflare Workers AI.
The resulting text can then be processed through the AI extraction pipeline, making it easier to convert spoken requests into structured information.
3. AI-assisted hospital document screening
To introduce an additional layer of trust, users can provide hospital admission slips, prescriptions, or medical receipts.
DonateNow uses Meta Llama 3.2 11B Vision Instruct through Cloudflare Workers AI to inspect submitted documents and assist with verification.
This helps identify relevant medical information and supports the request-review process. AI screening is not a substitute for independent hospital verification or medical judgment.
4. Intelligent donor matching and emergency prioritization
Instead of presenting requests as an ordinary chronological list, DonateNow uses a wave-sorted emergency feed.
Requests are organized using several factors:
- Blood group compatibility.
- Donor proximity.
- Emergency urgency.
- Request fulfillment status.
The goal is to make relevant and urgent donation opportunities easier for potential donors to discover.
5. Automated AI-powered spam and fraud protection
An emergency blood donation platform must protect people from exploitation. Fraudulent blood requests, commercial blood-selling attempts, payment demands, and repeated spam can undermine trust and waste valuable time.
DonateNow addresses this through a layered, automated moderation system that does not depend on human administrators manually reviewing every submission.
Every incoming request passes through a pre-publication moderation pipeline.
AI-powered scam detection
Meta Llama 3.1 analyzes incoming requests for suspicious patterns, including:
- Money demands through JazzCash, EasyPaisa, or bank transfers.
- Commercial blood-selling attempts.
- Fabricated emergency claims.
- Abusive content.
- Advertisements and unrelated submissions.
The model returns structured moderation results containing a verdict, confidence score, and explanation.
If AI inference fails, a keyword-based fallback system checks for suspicious payment-related terms and patterns.
Duplicate request detection
DonateNow checks requests submitted by the same user during the previous hour. Identical raw inputs, compared case-insensitively, are flagged as potential duplicate spam.
Risk-based moderation
Instead of relying on a simple spam/not-spam classification, DonateNow calculates a normalized risk score between 0 and 1.
The moderation engine uses this score to determine the appropriate action:
| Risk score | Action |
|---|---|
| Below 0.50 | Allow |
| 0.50–0.74 | Warn and apply low-trust handling where applicable |
| 0.75–1.00 | Throttle the user and apply a strike |
Severe moderation verdicts, such as payment demands, spam, fabricated emergencies, abusive content, and advertisements, can also trigger request rejection when the configured rejection threshold is reached.
Suspicious requests that are not rejected can still be created with a low_trust verification state, alongside their risk score and risk signals.
Account-level enforcement and strike management
DonateNow maintains account-level moderation states:
- Active
- Throttled
- Suspended
- Blocked
Blocked and suspended accounts cannot submit requests. Throttled accounts are prevented from posting during a 30-minute cooldown.
After the cooldown expires, an account can automatically return to active status. Users with a clean history for seven or more days can also have one accumulated strike removed.
Persistent moderation audit logs
Every moderation decision is recorded in PostgreSQL through a dedicated moderation_events table.
The records include the user, verdict, confidence, reason, action, strike changes, and input hash.
This creates an auditable moderation pipeline that combines AI detection, deterministic fallback rules, duplicate checks, risk scoring, account restrictions, and backend enforcement.
Our goal is to keep emergency blood requests accessible to genuine users while making the platform significantly harder to exploit.
6. Donor health and recovery tracking
Blood donation coordination must also consider donor recovery.
DonateNow implements a 56-day donor cooldown mechanism to track recent donations and prevent donors from being treated as immediately available again.
This is an application-level safeguard, not a universal medical eligibility determination. Actual donation eligibility must be assessed by qualified medical professionals.
7. Interactive regional emergency map
DonateNow includes an interactive regional map that allows users to explore and filter active blood requests across different administrative regions and cities.
This provides geographical context to emergency requests and makes discovering nearby opportunities easier.
8. Unified donation and emergency experience
A persistent intent switcher allows users to move between two primary workflows:
- I want to donate: Discover relevant emergency requests and potential donation opportunities.
- I need blood: Create an emergency request through manual entry, WhatsApp message extraction, or voice input.
The platform also tracks donation fulfillment and confirmation events.
How we built it
We designed DonateNow as a modern full-stack web application with an emphasis on structured data, server-side processing, practical AI integration, and automated backend enforcement.
Technology Stack
Frontend
- React Router v7 Framework Mode
- TypeScript
- Tailwind CSS
- shadcn/ui
Backend and Database
- Supabase
- PostgreSQL
- Supabase Authentication
- Supabase Functions
Artificial Intelligence
- Cloudflare Workers AI
- Meta Llama 3.1 8B Instruct for unstructured text extraction and scam detection
- OpenAI Whisper for voice transcription
- Meta Llama 3.2 11B Vision Instruct for hospital document screening
Infrastructure
- Vercel for deployment
- Supabase for authentication and database infrastructure
- Cloudflare Workers AI for model inference
Architecture and AI Workflow
DonateNow uses multiple AI-powered workflows to process different types of incoming information and convert them into actionable emergency requests.
Text input:
WhatsApp message → Llama 3.1 → Structured request data → Request processing
Voice input:
Audio recording → Whisper transcription → Llama 3.1 → Structured request data
Document input:
Hospital document → Vision AI analysis → Extracted medical information → Request screening
Moderation pipeline:
New request → Account status gate → AI scam detection + duplicate checks → Risk scoring → Reject / allow / low-trust → Audit logging + strike enforcement
Once a request passes the required enforcement checks, it enters the emergency coordination workflow, where compatibility, proximity, urgency, and fulfillment status determine how it is presented to potential donors.
Database Design
We use PostgreSQL to maintain structured relationships between the platform's main entities.
The core database includes:
- Profiles: Donor information, blood groups, availability, location, donation history, account status, and accumulated moderation strikes.
- Hospitals: Hospital information and geographical coordinates.
- Requests: Blood requirements, urgency, units needed, fulfillment, verification state, risk score, and risk signals.
- Donations: Donation records and fulfillment tracking.
- Confirmations: Arrival logs and confirmation events.
- Moderation Events: Persistent audit records containing moderation verdicts, confidence, reasons, actions, strike changes, and input hashes.
This relational structure allows the application to maintain a consistent record of emergency requests, donation activity, and moderation decisions.
Automated Moderation Architecture
We implemented the moderation system as a backend service rather than relying on frontend validation.
Two important services handle this workflow:
moderation.service.server.ts: Performs AI-assisted fraud detection, fallback rule checks, duplicate detection, risk scoring, and moderation decisions.request.service.server.ts: Enforces account restrictions and moderation results when creating requests.
This separation keeps moderation logic independent from the request creation workflow while ensuring that the backend enforces every decision.
Challenges we ran into
Building DonateNow involved more than integrating AI models into a web application.
1. Handling unstructured, multilingual information
Emergency requests are rarely standardized. They can contain abbreviations, mixed languages, incomplete details, and forwarded messages.
We needed an extraction workflow that could transform these inputs into predictable structured data rather than simply generating a natural-language response.
2. Integrating different AI modalities
Text extraction, voice transcription, document analysis, and scam detection each require different model capabilities and input handling.
Connecting these different inference workflows into one consistent application required careful coordination between the frontend, backend, and AI services.
3. Designing donor matching and prioritization
Showing blood requests in chronological order is not sufficient for emergency coordination.
We needed to account for compatibility, proximity, urgency, and fulfillment so that the most relevant opportunities could surface first.
4. Building automated fraud and spam protection
A platform dealing with emergency medical requests cannot blindly trust every submission.
We needed a moderation system capable of identifying suspicious payment demands, fabricated emergencies, advertisements, and duplicate submissions without relying on human administrators.
Combining probabilistic AI classifications with deterministic fallback rules, normalized risk scoring, account-level strikes, cooldown enforcement, and persistent audit logging was a significant engineering challenge.
5. Maintaining donor recovery safeguards
A donation platform cannot treat donors as endlessly available resources.
We implemented donation history tracking and cooldown enforcement to incorporate donor recovery into the coordination process.
6. Designing a relational data model
Requests, donors, hospitals, donations, confirmations, and moderation events are interconnected.
Designing the database around these relationships was important to support request fulfillment, donor tracking, moderation, and the overall coordination workflow.
Accomplishments that we're proud of
- Built a complete emergency blood donation coordination platform rather than another static blood donor directory.
- Integrated three different AI capabilities: LLM-based text extraction and scam detection, speech-to-text transcription, and vision-based document screening.
- Enabled emergency request intake through manual forms, WhatsApp messages, and voice recordings.
- Implemented a wave-sorted emergency feed incorporating compatibility, proximity, and urgency.
- Developed a layered automated moderation engine combining AI fraud detection, deterministic fallback rules, duplicate detection, and risk-based decisions.
- Implemented account-level strike management, temporary throttling, and automatic cooldown recovery.
- Built persistent moderation audit logs to record and track every moderation decision.
- Developed donor recovery cooldown enforcement.
- Built an interactive regional map for exploring emergency blood requests.
- Designed a relational PostgreSQL database around the complete donation coordination and moderation lifecycle.
Most importantly, we brought several fragmented steps of emergency blood coordination into one application while building automated safeguards to protect the platform from abuse.
What we learned
This project reinforced an important lesson: AI is most useful when it removes friction from an actual workflow.
A model that extracts information from a WhatsApp message is useful, but its real value becomes apparent when that extracted information can immediately become an actionable emergency request.
We also learned that building a meaningful AI-powered product requires much more than model integration. Database design, validation, application logic, user experience, backend enforcement, and safety considerations are equally important.
Another important lesson was that AI alone should not be responsible for every decision. By combining probabilistic model outputs with deterministic rules, risk thresholds, account-level enforcement, and audit logs, we created a more structured approach to automated moderation.
What's next for DonateNow?
We see DonateNow as a foundation for a broader emergency blood coordination network.
Our next areas of development include:
- Hospital partnerships and verified hospital accounts.
- Stronger human-in-the-loop document verification.
- Real-time donor notifications for matching emergency requests.
- Improved geographical donor discovery.
- More robust request authenticity and fraud prevention.
- Donation center integrations and fulfillment tracking.
- Expanded multilingual support.
- Better analytics for regional blood demand and availability.
- More advanced duplicate and coordinated spam detection.
Our long-term vision is to make finding and coordinating blood donations faster, more accessible, and more reliable.
DonateNow is built around a simple idea: when someone needs blood, finding the right donor should be easier, faster, and safer.
Built With
- cloudflare-workers-ai
- meta-llama-3.1
- meta-llama-3.2-vision
- openai-whisper
- postgresql
- react
- react-router
- shadcn/ui
- supabase
- tailwind-css
- typescript