How We Built AAROGYASETU: The 2G Telemedicine Platform That Won Our Hackathon (Windows Setup & Presentation Guide)
AAROGYASETU (आरोग्यसेतु) — “Healthcare Beyond Boundaries” The Ultimate Hackathon Blueprint & Windows Execution Guide Expected Outcome Statement: “A working prototype that demonstrates how technology can mak
AAROGYASETU (आरोग्यसेतु) — “Healthcare Beyond Boundaries”
The Ultimate Hackathon Blueprint & Windows Execution Guide
Expected Outcome Statement:
“A working prototype that demonstrates how technology can make basic healthcare services more accessible to people in rural and remote areas.”
🎯 The Core Problem & Our Winning Thesis
If you build a standard telemedicine app with WebRTC video calling and 10MB JavaScript bundles, it will fail the moment it enters a rural Indian village.
Over 700 million rural citizens frequently deal with:
- Severe Geographic Isolation: Traveling 30–80 km over dirt roads to reach a Primary Health Centre (PHC).
- The 2G / EDGE Reality: Data speeds fluctuate between 30 kbps and 100 kbps with massive packet loss. Video streaming is impossible.
- Paper Record Fragility: Paper prescriptions get torn, stained, or lost during bus journeys.
- Delayed Triage: Treatable fevers escalate into emergencies because there is no immediate triage channel.
How AAROGYASETU Solves This:
- Text-First REST Payload Diet: Minimal JSON responses (<15KB) that load in milliseconds on 2G.
- Client-Side Canvas Image Compression: Shrinks 6MB smartphone photos of lab reports down to under 100KB directly in the browser using HTML5 Canvas before uploading.
- Automated Cellular SMS Alerts: Sends automatic appointment status notices to standard feature phones—even if the patient is offline.
- Doctor-Approved Prescriptions: Strict clinical governance where only verified physicians can issue medicine schedules, which patients track with one-tap "Taken" or "Skipped" buttons.
- Smart Lab Report Reader (OCR): Digitizes diagnostic biomarkers (Hemoglobin, Glucose, BP) with mandatory doctor review disclaimers.
- Privacy-Preserving QR Medical Health Profile: Encrypted, time-limited, revocable tokens embedding zero raw medical records.
- AI Health Assistant with Emergency Triage: Answers educational queries without self-diagnosing, and instantly flags acute symptoms ("chest pain") to 108 speed-dialing.
💻 Step-by-Step Windows Laptop Setup (Copy & Paste Ready)
Everything you need to clone, install, and run on a Windows 10 / 11 machine.
Prerequisites (Check these first in PowerShell / CMD):
- Python 3.10+ (Make sure "Add python.exe to PATH" was checked during Python installation)
python --version
- Node.js 18+ and npm
node -v
npm -v
- Git for Windows
git --version
Step 1: Clone the GitHub Repository
Open PowerShell or Command Prompt and run:
git clone https://github.com/hrlpavan/aarogyasetu.git
cd aarogyasetu
Step 2: One-Click Windows Setup
You can either double-click scripts\setup.bat in File Explorer, or run:
.\scripts\setup.bat
What this automated script does under the hood:
- Creates a Python virtual environment at
backend\.venv - Installs
fastapi,uvicorn,python-multipart,pydantic,httpx,reportlab, andpypdfium2 - Initializes the local SQLite database (
aarogyasetu.db) and seeds it with fictional rural test records (Ramesh Patel & Dr. Ananya Sharma) - Installs the React/Tailwind frontend dependencies via
npm install - Runs the automated 13-point verification test suite (
scripts\test_prototype.py)
Step 3: Launch the Application (One-Click)
To start both the FastAPI backend and React frontend concurrently, simply double-click:
.\scripts\start.bat
(Or if you prefer PowerShell: .\scripts\start.ps1)
The script opens two terminal windows and launches your default browser to:
- Frontend Portal: http://localhost:5173
- Backend REST API: http://localhost:8000
- Interactive Swagger Docs: http://localhost:8000/docs
🔑 Pre-Seeded Hackathon Demo Credentials
No need to register from scratch during your pitch! The platform comes pre-seeded with rich clinical data:
| Portal | Username | Password | Persona & Background |
|---|---|---|---|
| Patient Portal | ramesh_patient |
Password123 |
Ramesh Patel (45, M), Holehonnur Village, Shivamogga Rural. Reports 2 days of seasonal fever and fatigue. |
| Doctor Console | dr_ananya |
Password123 |
Dr. Ananya Sharma (MD), Sanjeevani Rural Tele-Centre. General Medicine & Diabetology. |
| Doctor 2 | dr_rajesh |
Password123 |
Dr. Rajesh Verma (MBBS, DCH), Gramin Child Clinic, Bhadravati Taluk. Pediatrician. |
💡 Hackathon Pro-Tip: The Landing Page features "1-Tap Login" buttons for both Ramesh Patel and Dr. Ananya Sharma. You don't even have to type usernames during your presentation!
🏆 The 3-Minute Hackathon Winning Demo Script
Deliver this pitch verbatim to the judges to guarantee maximum points on Impact, Technical Depth, and Clinical Safety:
[0:00 - 0:30] HOOK & PROBLEM STATEMENT
"Judges, 700 million rural citizens in India live 40+ kilometers away from the nearest hospital.
When they try to use modern video-telemedicine apps on rural cell towers, the call crashes because
they are on 2G EDGE connections with speeds below 60 kbps.
We built AAROGYASETU (आरोग्यसेतु) — 'Healthcare Beyond Boundaries' — an ultra-lightweight telemedicine
platform engineered from the ground up to operate reliably on 2G networks, feature phones, and rural clinics."
[0:30 - 1:00] PATIENT ONBOARDING & LOW-BANDWIDTH BOOKING
"Let's click '1-Tap Login as Ramesh Patel' from Holehonnur Village.
Notice the top network indicator: we've built a real-time network simulator. We can switch from 4G to
2G Low-Bandwidth Mode or even Simulated Offline Mode.
Ramesh needs to see a doctor. He goes to 'Find Doctors', selects Dr. Ananya Sharma, selects tomorrow at 10:30 AM,
and clicks 'Confirm Request'.
Notice what just happened: an automated cellular SMS alert was triggered to Ramesh's phone, confirming his booking.
Even if his internet disconnects right now, he stays informed via standard SMS."
[1:00 - 1:40] DOCTOR TRIAGE & CLINICAL GOVERNANCE
"Now, let's open a second tab and log in as Dr. Ananya Sharma on the Doctor Console.
Dr. Sharma sees Ramesh in her triage queue. With one click, she confirms the slot, which immediately
dispatches an automated confirmation SMS to Ramesh.
Next, Dr. Sharma opens the Consultation Workspace. Ramesh uploads a photo of his blood test.
Normally, a phone camera produces a 6MB image that would timeout on 2G.
Our client-side HTML5 canvas pipeline compresses it down to 84KB (>96% reduction) before upload!
Our Smart Report Reader OCR extracts his Hemoglobin (11.2 g/dL) and Glucose (118 mg/dL).
Notice the clinical safety label: '⚠️ Machine-read. Doctor review required.'
Dr. Sharma verifies the report, enters a clinical consultation note into his EMR, and prescribes
Paracetamol 650mg TDS."
[1:40 - 2:20] PATIENT ADHERENCE & PRIVACY-PRESERVING QR
"Back on Ramesh's dashboard:
1. His 'Rx Reminders' is immediately populated with Dr. Sharma's approved prescription. He taps 'Taken'.
AI cannot prescribe; only doctors can.
2. Ramesh is visiting a local village health camp tomorrow. He goes to 'QR Health Token', selects which
fields to share (Name, Blood Group, Allergies), and generates a 15-minute revocable QR token.
Notice: ZERO medical data is stored in the QR code—only an encrypted temporary token. If he loses his phone,
he can revoke it in one tap."
[2:20 - 3:00] AI SAFETY GUARDRAIL, EMERGENCY SOS & CLOSING
"What about AI? If Ramesh asks our AI Assistant about nutrition or blood sugar ranges, it educates him in simple terms.
BUT watch what happens if he types: 'I have severe chest pain and cannot breathe'.
The AI does NOT hallucinate a diagnosis. Our clinical guardrail intercepts acute symptoms immediately and displays
a red emergency alert directing him to our 1-Tap Emergency SOS speed-dial for 108 Ambulance and 112 services.
Judges, AAROGYASETU delivers dignity, accessibility, and clinical safety to rural communities without requiring
expensive broadband or paid API keys. Everything you see is running live locally on SQLite and FastAPI. Thank you!"
🏗️ Technical Architecture Highlights
1. In-Browser Client-Side Image Compression (imageCompression.ts)
// Scales high-res camera photos (4000x3000px, 6MB) down to max 1280px at 0.72 quality
export async function compressImage(file: File, maxWidth = 1280, quality = 0.72): Promise<CompressionResult> {
const img = new Image();
img.src = URL.createObjectURL(file);
await img.decode();
const canvas = document.createElement('canvas');
// Dynamic aspect-ratio bounding box
canvas.width = targetWidth;
canvas.height = targetHeight;
const ctx = canvas.getContext('2d');
ctx.drawImage(img, 0, 0, targetWidth, targetHeight);
// Converts to WebP/JPEG blob under 100KB (96-98% bandwidth reduction)
const blob = await new Promise<Blob>((resolve) => canvas.toBlob(resolve, 'image/jpeg', quality));
return { file: new File([blob], 'lab_report.jpg'), compressedSizeKb: Math.round(blob.size / 1024) };
}
2. Pluggable SMS Gateway with Zero-Cost Demo Logger (sms_service.py)
# Dispatches via Twilio if env credentials exist, else records in SQLite demo log
if TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN:
# Send via Twilio REST API
provider = "twilio"
dispatch_status = "SENT"
else:
# Local fallback: viewable in-app under Doctor Notification Audit
provider = "demo_logger"
dispatch_status = "DEMO_LOGGED"
# Strict medical privacy: Never include symptoms or diagnoses in plain SMS!
message_body = f"AAROGYASETU: Your appointment with Dr. {doctor_name} is CONFIRMED for {appointment_date} at {appointment_time}."
3. Acute Emergency Symptom Intercept (ai_service.py)
CRITICAL_EMERGENCY_KEYWORDS = [
"chest pain", "shortness of breath", "cannot breathe", "unconscious",
"stroke", "heavy bleeding", "poison", "snake bite"
]
def query_health_assistant(user_prompt: str):
for kw in CRITICAL_EMERGENCY_KEYWORDS:
if kw in user_prompt.lower():
return {
"response": "🚨 URGENT MEDICAL ADVISORY: These symptoms indicate a potential life-threatening emergency. Call 108 or 112 immediately.",
"is_emergency": True,
"provider": "SafetyGuardrail_EmergencyTriage"
}
🛠️ Windows Troubleshooting Guide
| Issue | Cause on Windows | Quick Fix |
|---|---|---|
'python' is not recognized |
Python not added to System PATH | Re-run Python Installer, click "Modify", and ensure "Add python.exe to PATH" is checked. |
Execution of scripts is disabled on this system |
PowerShell ExecutionPolicy default restriction | Open PowerShell as Administrator and run: Set-ExecutionPolicy RemoteSigned -Scope CurrentUser, then press Y. |
Port 8000 or 5173 is already in use |
A previous background process is still bound | Open CMD and run: `netstat -ano \ |
{% raw %}npm : The term 'npm' is not recognized
|
Node.js not installed | Download and install Node.js LTS from nodejs.org. |
📦 What to Submit to Hackathon Evaluators
- GitHub Repository: https://github.com/hrlpavan/aarogyasetu
-
Project Statement PDF: Included in
outputs\AAROGYASETU_Project_Statement.pdf -
Editable Blueprint: Included in
docs\AAROGYASETU_Blueprint.md -
Automated Test Check: Run
python scripts\test_prototype.py(Passes all 13 checks in < 2 seconds)
Go crush the hackathon! 🚀
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.