LifePulse

PACT Analysis Framework
People β€’ Activities β€’ Contexts β€’ Technologies
P

People

Understanding the diverse user groups: donors driven by altruism, recipients under urgent stress, and administrators ensuring system integrity.

A

Activities

Core interactions including creating blood requests, receiving proximity notifications, verifying eligibility, and coordinating donations.

C

Contexts

Emergency healthcare environments in Nepal's urban areas with varying connectivity and high-stress situations requiring immediate response.

T

Technologies

Django REST Framework with GeoDjango, MariaDB spatial queries, Expo location services, push notifications, and secure JWT authentication.

P

People

Primary
🩸

Blood Donors

Altruistic individuals willing to provide blood support

βœ“
Health-conscious and privacy-aware
⏰
Time-constrained schedules
πŸ›‘οΈ
90-day donation cooldown compliance
πŸ“±
Mobile-first accessibility needs
Critical
πŸš‘

Recipients

Patients, family members, or hospital staff seeking blood

⚑
Under extreme stress and urgency
πŸ“
Hospital or emergency room settings
πŸ‘₯
May include non-technical users
⏱️
Critical time-sensitive needs
Support
βš™οΈ

Administrators

System managers ensuring platform integrity

πŸ”
Profile management and monitoring
βš–οΈ
Request and donation oversight
πŸ“Š
Request history analytics
πŸ›‘οΈ
Safety compliance enforcement
A

Activities

Donor Journey

1
Profile Setup

Register with blood group and location data

2
Update Status

Manage availability and donation history

3
Receive Alert

Get proximity-based notifications

4
Verify Eligibility

Check 90-day cooldown status

5
Accept Request

Commit to donation and coordinate

Recipient Journey

1
Create Request

Specify blood group and urgency level

2
Set Location

Use the current request location for nearby matching

3
Wait for Match

System alerts nearby eligible donors

4
Receive Response

Get donor contact information

5
Coordinate

Finalize donation details and timing

C

Contexts

πŸ₯

Urgency

Hospital emergency rooms and critical care units
Late-night or off-hours emergency situations
Life-threatening medical conditions requiring immediate transfusion
High-stress, time-critical decision making
πŸ“±

Mobile Environment

Unstable internet connectivity in various regions
Range of device types from budget to premium
Power constraints and battery limitations
Public spaces with varying privacy levels
πŸ—ΊοΈ

Geographic Scope

Kathmandu Valley urban areas (primary focus)
Bhaktapur and Lalitpur metropolitan zones
5–20 km urgency-aware matching for a focused response
High population density enabling quick matches
⏰

Health Tracking

90-day donation cooldown period enforcement
Personal health history and eligibility tracking
Profile updates for availability status
Privacy-protected medical information
T

Technologies

Technology Stack

Robust, scalable architecture for critical healthcare operations

Backend Framework
πŸ”§
Django REST Framework
πŸ—ΊοΈ
GeoDjango for spatial operations
πŸ”Œ
Atomic request acceptance and status transitions
Database
πŸ’Ύ
MariaDB 11.4 with spatial extensions
πŸ“
Spatial indexing for geo-queries
⚑
Optimized radius calculations
Mobile Platform
πŸ“±
React Native (iOS & Android)
πŸ“
Native location services
πŸ””
Push notification integration
Security & Auth
πŸ”
JWT token authentication
πŸ”’
HTTPS/TLS encryption
πŸ›‘οΈ
Refresh-token rotation and queued API retries
Updates & Notifications
⚑
Expo push notifications
πŸ”„
Foreground location updates
πŸ“‘
Polling for current request status
Infrastructure
☁️
Docker Compose services
πŸ“Š
Gunicorn application server
πŸ”§
Cloudflare Tunnel ingress

Design Implications

Critical considerations derived from the PACT analysis

⚑

Simplicity & Trust

βœ“
Minimal steps for critical tasks (Request/Accept flows)
βœ“
Clear, immediate feedback on all actions
βœ“
Strong privacy safeguards and cooldown enforcement
βœ“
Transparent communication of system status
🎯

Speed & Clarity

βœ“
Instant push notifications for matching requests
βœ“
Precise GPS location for accurate distance calculation
βœ“
One-tap accept or temporary dismiss for donor responses
βœ“
Timely status updates visible to both parties
πŸ›‘οΈ

Robustness & Alerts

βœ“
Push notifications with in-app request refresh
βœ“
Simple, high-contrast UI for stressed users
βœ“
Low-battery-impact location tracking
βœ“
Server-backed donation history and rewards
βš™οΈ

Integration & Performance

βœ“
Efficient spatial queries with GeoDjango indexing
βœ“
JWT tokens for fast, stateless authentication
βœ“
Polling and push updates for the MVP
βœ“
Atomic acceptance prevents two donors claiming one request
πŸ”Œ

API Endpoints

Admin Panel Core

GET /admin/
Django admin interface for system management

Profiles Auth

POST /api/profiles/register/
POST /api/profiles/token/
POST /api/profiles/token/refresh/
POST /api/profiles/logout/
GET /api/profiles/me/
PATCH /api/profiles/me/
PATCH /api/profiles/me/location/

Password Recovery Security

POST /api/profiles/password/reset/
POST /api/profiles/password/verify/
POST /api/profiles/password/reset/confirm/

Blood Requests Core

POST /api/requests/create/
GET /api/requests/history/me/
GET /api/requests/history/donor/
POST /api/requests/{id}/cancel/
POST /api/requests/{id}/accept/
POST /api/requests/{id}/complete/
POST /api/requests/{id}/no-show/
GET /api/requests/rewards/me/

Donor Matching Location

GET /api/requests/nearby/
GET /api/requests/pending/nearby/
GET /api/requests/pending/by-blood-group/

Documentation Docs

GET /api/docs/schema/
GET /api/docs/
GET /api/docs/redoc/