Architecture

MedsBuddy System Architecture

MedsBuddy is an AI Patient Advocate powered by Qwen Cloud and deployed through Alibaba ECS backend APIs. It supports patients before, during, and after a doctor visit.

Architecture Diagram

Judge-ready visual showing how the frontend, Alibaba ECS backend, Qwen Cloud, voice services, and visit memory connect.

Open Diagram
MedsBuddy architecture diagram showing patient, frontend, Alibaba Cloud ECS backend, Qwen Cloud, voice services, and visit memory database.

End-to-End Flow

Demo
Before Visit
Patient talks naturally

Qwen extracts symptoms, medications, concerns, timeline, and questions.

During Visit
Agent speaks with doctor

With consent, speech-to-text transcribes speech and Qwen decides when MedsBuddy should answer.

After Visit
Summary and memory

Qwen generates medications, follow-up, warning signs, and visit memory stored on ECS.

Runtime Architecture

MedsBuddy App

Patient interface for Prepare Visit, Doctor Visit, Emergency QR, and Visit Memory.

Alibaba ECS FastAPI Backend

Owns API routes, Qwen calls, voice forwarding, and SQLite visit memory.

Qwen Cloud

Structured extraction, doctor-agent reasoning, care-plan gap detection, and summaries.

Speech-to-Text + ElevenLabs TTS

Speech-to-text creates corrected transcripts, and ElevenLabs speaks MedsBuddy responses aloud.

Visit Memory DB

Stores patient-approved visit summaries for later doctor questions and continuity.

Trust Boundary

Patient context is approved before the live doctor visit. During the appointment, MedsBuddy only responds from approved patient information or doctor-stated care-plan details.

The backend stores approved visit memory and uses it for continuity when the doctor asks about prior visits or medication context.