MedTrace

Carry critical health history anywhere, even offline.

MedTrace is a consent-based, offline-first health passport for patients who move between villages, cities, employers, and hospitals. It helps clinicians access only the minimum critical information they need in an emergency, even when internet, language, or institutional interoperability are limited.

Business Goals

  • Achieve a working demo with 100% completion of the emergency-share flow by the end of week 4.
  • Reach at least 70% of demo users completing onboarding in under 2 minutes during judge testing.
  • Demonstrate a 30%+ reduction in time to retrieve critical patient information versus a paper-only flow in usability tests.
  • Show at least 3 meaningful API integrations in the demo, with 95% success rate on test data.
  • Generate at least 5 high-quality pilot conversations with hospitals, NGOs, or public-health stakeholders within 30 days of demo launch.

User Goals

  • Let a patient create or import a basic health profile quickly.
  • Allow a clinician to view an emergency minimum record in under 10 seconds.
  • Enable temporary consent sharing with an expiry window and audit trail.
  • Support offline access to the core record and sharing workflow.
  • Highlight antibiotic history clearly so repeated or inappropriate prescribing is easier to spot.

Non-Goals

  • Not a full electronic medical record replacement for hospitals.
  • Not a diagnostic or treatment recommendation engine.
  • Not dependent on continuous internet connectivity for core emergency access.
  • Not a production-grade national identity verification system in the MVP.

Migrant Worker Rani, 34 - Rani moves between districts for seasonal work and often visits different clinics. She has allergies, a chronic condition, and a history of antibiotics that she struggles to remember under stress.

Migrant Worker Rani, 34

  • As a patient, I want to store my allergies and medications in one secure profile, so that any clinician can quickly see what matters in an emergency.
  • As a patient, I want to share my record using a QR card or PIN without internet, so that I can get care even in remote areas.
  • As a patient, I want to revoke or limit access after a visit, so that my data stays under my control.

Emergency Doctor Ahmed, 41 - Ahmed works in a busy emergency room where patients often arrive unconscious, alone, or without paperwork. He needs the fastest possible way to see key information before prescribing or treating.

Emergency Doctor Ahmed, 41

  • As a doctor, I want to scan a patient’s code and see a 30-second emergency summary, so that I can treat safely without searching multiple systems.
  • As a doctor, I want the antibiotic timeline and recent prescriptions visible, so that I can avoid duplicate or inappropriate medication.
  • As a doctor, I want to see a clear access log, so that I know which fields were shared and under what consent.

Community Health Worker Nia, 29 - Nia supports families in rural communities and disaster-relief settings. She often helps patients set up records on low-cost phones and needs a simple, guided experience.

Community Health Worker Nia, 29

  • As a health worker, I want to onboard a patient with a guided flow, so that even low-literacy users can complete setup confidently.
  • As a health worker, I want to print or issue a QR card, so that patients have a durable offline access method.
  • As a health worker, I want to update a patient profile on behalf of the patient with permission, so that the record stays current when they cannot manage it themselves.

Authentication and Onboarding · High priority

  • Provide secure account creation and fast onboarding so users can reach the emergency record quickly.
  • Support email sign-up and sign-in plus Google and GitHub OAuth.
  • Include an animated walkthrough that explains offline access, consent, and sharing in 3 to 4 screens.
  • Use React Hook Form with Zod validation for all forms.
  • Allow guest/demo mode with synthetic data for judges and first-time exploration.
  • Surface trust cues such as encrypted storage, access logs, and consent expiration during onboarding.

Core Emergency Sharing Flow · High priority

  • Deliver the primary use case end-to-end: create a record, generate a share token, and let a clinician view minimum emergency data offline.
  • Let a patient create or load a synthetic profile with allergies, blood group, medications, conditions, contacts, and antibiotic history.
  • Generate a QR code and optional PIN-based access token for sharing a time-limited emergency record.
  • Let the clinician view a minimal card first, then drill into approved fields only.
  • Support access expiry and explicit consent revocation from the patient dashboard.
  • Handle no-network scenarios gracefully using local cached data and clear fallback states.

Data Insights Dashboard · Medium priority

  • Show a compelling, real-time analytics view that tells the story of adoption, consent, and medication safety.
  • Display counters for profiles created, shares issued, accesses granted, expirations, and emergency views.
  • Use charts for antibiotic usage over time, access trends, and record completeness.
  • Include filters for date range, patient type, and access channel.
  • Refresh dashboard metrics from local demo data or seeded API data in near real time.
  • Present insights in a way that helps a judge understand product value within 10 seconds.

Mobile-First UI and Accessibility · High priority

  • Create a polished responsive interface that works on phones first and remains accessible and visually modern on desktop.
  • Use Tailwind CSS and Framer Motion for fluid transitions and micro-interactions.
  • Support dark mode and high-contrast states with WCAG-compliant color contrast.
  • Make touch targets large enough for one-handed mobile use.
  • Design reusable cards, timeline components, and summary panels for clarity.
  • Ensure keyboard navigation, screen-reader labels, and focus states across all primary actions.

External Integrations · Medium priority

  • Add at least two meaningful third-party integrations to increase realism and demo value.
  • Use Google OAuth and GitHub OAuth for authentication.
  • Use Twilio to send a demo SMS containing a secure access link or one-time PIN.
  • Use OpenAI for local-language note summarization or administrative summary generation, restricted to non-diagnostic text.
  • Optionally use Mapbox or Google Maps for clinic or hospital lookup in the onboarding flow.
  • Optionally use Stripe only if a pilot pricing or donation screen is needed, but keep it out of the MVP critical path.

Fast Onboarding to First Share

  • Open the landing page and immediately see the emergency-use promise and demo CTA.
  • Choose sign up, sign in, or try a synthetic patient demo in one tap.
  • Complete a short onboarding walkthrough explaining offline access, consent, and sharing.
  • Create a sample patient profile or load a seeded one with one guided form.
  • Generate a QR card or one-time PIN in under 2 minutes from first visit.
  • Show the clinician emergency view as the first success moment, targeting time-to-value under 60 seconds for demo mode.

1. Create the Patient Profile

  • The user enters or loads essential medical data into a structured offline-first record.
  • Validate required fields such as name, blood group, allergies, and emergency contact.
  • Allow optional fields for chronic conditions, medications, pregnancy status, and recent tests.
  • Persist locally first so the flow works without internet and syncs later if enabled.

2. Generate the Emergency Minimum Record

  • The app condenses the record into a fast clinician-facing summary.
  • Create a 30-second summary showing only critical data and latest antibiotic history.
  • Exclude non-essential personal details unless explicitly consented.
  • If the profile is incomplete, show a warning and missing-data checklist.

3. Share by QR, PIN, or SMS

  • The patient chooses a secure temporary access method for a clinician or caregiver.
  • Generate a scannable QR code and a fallback one-time PIN.
  • Use Twilio SMS for sending a secure access reference in the demo.
  • Set a visible access expiry timer and allow manual revocation at any time.

4. Clinician Emergency View

  • A clinician scans or enters the token and sees approved information instantly.
  • Show the emergency summary first, then expandable approved sections.
  • Log the access event with timestamp, role, and fields viewed.
  • If access has expired or consent is missing, show a blocked-state explanation and next-step CTA.

5. Audit and Insights

  • The user and admin can review who accessed what and understand usage patterns.
  • Display a consent chain with access history and expiry status.
  • Show dashboard charts for accesses, shares, and antibiotic usage.
  • Handle duplicate scans, expired tokens, and offline queueing without data loss.

Advanced and Edge-Case Capabilities

  • Temporary caregiver delegation with revocable access.
  • Offline-first local cache with encrypted storage and re-authentication on resume.
  • Optional language selection for local-language summaries and UI labels.
  • Printable QR card generation for low-connectivity or low-smartphone environments.
  • Emergency mode that prioritizes allergies, critical conditions, medications, and contacts above all other data.

Polished, Trust-Building Interface

  • Mobile-first layout with large cards, bottom actions, and clear primary CTA hierarchy.
  • Framer Motion transitions for onboarding, card expansion, and share confirmation states.
  • Dark mode with strong contrast and subtle neumorphic depth for modern appeal.
  • Accessible design with semantic landmarks, keyboard support, and screen-reader labels.
  • Fast perceived performance through skeleton loaders, optimistic UI, and local-first rendering.

Rani is a seasonal worker who rarely visits the same clinic twice. When she feels sick in a new town, she cannot remember her allergy list or the exact antibiotic she took last month, and the clinic has no access to her old paper files.

With MedTrace, she opens the app, confirms her emergency profile, and generates a QR card with a 30-minute access window. The doctor scans it and instantly sees her critical history, antibiotic timeline, and emergency contact, which reduces treatment delay and helps avoid a dangerous medication error.

For the clinic, the benefit is speed and confidence. For public health stakeholders, the platform creates an auditable, privacy-preserving pathway to better continuity of care without requiring every patient to have a modern phone or constant connectivity.

User-Centric Metrics

  • 80% of test users can create and share a record in under 2 minutes.
  • 90% of clinicians can locate allergies and medications in under 10 seconds.
  • At least 75% of demo users correctly understand consent expiry after the walkthrough.
  • 95% of scans or PIN entries successfully open the intended emergency view in the demo environment.
  • At least 60% of users complete the onboarding without facilitator assistance.

Business Metrics

  • 25%+ increase in return demo engagement across judges or pilot stakeholders.
  • 40%+ of trial users export or reuse the patient card after first creation.
  • At least 3 pilot-ready conversations with NGOs, clinics, or employers within 30 days.
  • 50%+ of invited users finish onboarding after starting it in the demo funnel.

Technical Metrics

  • 99.5% uptime for the hosted demo.
  • Emergency summary loads in under 2 seconds on a typical 4G connection and under 1 second from local cache.
  • All sensitive local data remains encrypted at rest.
  • Zero critical security issues in the demo build and dependency audit.

Tracking Plan

  • onboarding_started
  • onboarding_completed
  • patient_profile_created
  • emergency_summary_generated
  • qr_or_pin_shared
  • clinician_view_opened
  • access_expired_or_revoked
  • antibiotic_timeline_viewed
  • sms_link_sent
  • demo_mode_entered

Technical Needs

  • Next.js with TypeScript for the frontend and server actions or API routes where useful.
  • React Hook Form and Zod for form validation and safe data entry.
  • Framer Motion for onboarding and interaction polish.
  • Recharts or Chart.js for dashboard visualizations.
  • SQLite or IndexedDB for local offline storage in the demo, with encrypted fields where possible.
  • FastAPI or Next.js API routes backed by PostgreSQL for any remote demo services.
  • FHIR-shaped data models for future interoperability, even if the MVP uses synthetic records.

Integration Points

  • Google OAuth and GitHub OAuth for authentication.
  • Twilio for SMS-based token delivery or demo alerts.
  • OpenAI for constrained administrative summarization or translation support.
  • Mapbox or Google Maps for clinic lookup and routing in the onboarding/demo flow.
  • A FHIR-compatible endpoint or mocked FHIR service for record exchange demonstrations.

Data Storage & Privacy

  • Store only synthetic data in the hackathon MVP unless explicitly configured for test users.
  • Encrypt sensitive local data at rest and use short-lived access tokens for sharing.
  • Log consent and access events with minimum necessary metadata.
  • Design for GDPR and CCPA principles such as data minimization, purpose limitation, and deletion requests.
  • Clearly separate demo data from any real pilot data and include reset controls for judges.

Scalability & Performance

  • Keep the emergency view lightweight so it renders instantly on mobile devices.
  • Use pagination or virtualization for audit logs and dashboards if record counts grow.
  • Cache frequently used lookup data and summary cards locally.
  • Design API responses to return the minimum record first, then expand on demand.

Potential Challenges

  • Identity verification may be weak in the MVP; mitigate by focusing on consent workflow and synthetic demo identities.
  • Legal and regulatory complexity around medical data can slow pilots; mitigate by using a non-production demo scope and explicit disclaimers.
  • Offline synchronization conflicts may occur; mitigate with local-first writes, versioning, and clear conflict resolution states.
  • Clinical interoperability is hard; mitigate by modeling data in FHIR-like structures and supporting export rather than full integration first.
  • Users may not trust the privacy model; mitigate with visible audit logs, expiry timers, encryption messaging, and simple language throughout.

Team & resourcing - Small cross-functional team - 2 full-stack engineers, 1 product designer, part-time PM, optional QA/support for demo polish.

Phase 1: UX and Data Model · Week 1

  • Landing page, onboarding flow, and mobile-first design system.
  • Synthetic patient schema for allergies, conditions, medications, blood group, emergency contacts, and antibiotic timeline.
  • Authentication shell with email and OAuth wiring.
  • Clickable prototype of the emergency summary and dashboard.

Phase 2: Core MVP · Weeks 2-3

  • Create/load patient profile flow.
  • QR and PIN sharing workflow with expiry and revocation.
  • Clinician emergency view with minimum record and audit log.
  • Offline local storage and demo-safe seeded data.
  • Validation with React Hook Form and Zod.

Phase 3: Dashboard and Integrations · Week 4

  • Insights dashboard with charts and counters.
  • Twilio SMS integration for secure access delivery.
  • OpenAI summary/translation integration with guardrails.
  • Google or GitHub OAuth login flows fully functional.
  • Accessibility pass, dark mode, and motion polish.

Phase 4: Demo Hardening · Week 5

  • Performance optimization and error handling.
  • Edge-case states for expired access, missing data, and offline mode.
  • Analytics event tracking and judge-ready demo script.
  • Final visual polish, copy refinement, and deployment on Vercel or similar.

Paste this into Cursor, Bolt, Lovable, or v0 to start building.

Build a mobile-first offline-first web app called MedTrace for emergency continuity of care.

Tech stack:
Next.js with TypeScript, Tailwind CSS, Framer Motion, React Hook Form, Zod, Recharts, and a lightweight backend using Next.js API routes or FastAPI mock endpoints. Use local-first storage for demo mode with encrypted fields if possible. Use Google OAuth and GitHub OAuth for auth. Integrate Twilio for SMS sending and OpenAI for constrained administrative summarization/translation only.

Core product:
A consent-based health passport that lets a patient create a synthetic or demo patient profile, generate an emergency minimum record, share it via QR code or one-time PIN with expiry, and let a clinician view only approved fields. Include an audit log of access and a dashboard with live metrics and charts.

Primary screens and flows:
Landing page with strong CTA and trust messaging
Auth screens for email, Google, and GitHub sign-in
Animated onboarding walkthrough explaining offline access, consent, and emergency sharing
Patient profile creation/edit form with validation
Emergency summary generator with a 30-second minimum record
QR code and PIN share modal with expiry timer and revoke action
Clinician emergency view with allergies, medications, conditions, blood group, emergency contact, and antibiotic timeline
Insights dashboard with counters and charts for shares, accesses, expirations, and antibiotic usage
Settings page for dark mode, language selection, and privacy controls

Data model:
User, PatientProfile, Allergy, Medication, Condition, EmergencyContact, AntibioticEvent, ConsentGrant, AccessLog, ShareToken, DashboardMetric.
Include fields for timestamps, expiry, access role, field-level visibility, and versioning.

Behavior requirements:
Support offline-first local persistence and clear no-network states.
Show the emergency summary first and make the main CTA understandable in under 10 seconds.
Use Framer Motion for onboarding and micro-interactions.
Validate all forms with React Hook Form and Zod.
Make the UI WCAG-compliant, responsive, and optimized for mobile.
Include dark mode and modern card-based visuals.
Instrument analytics events for onboarding, profile creation, share generation, clinician view, access expiry, and SMS send.

Important constraints:
Use synthetic demo data by default.
Do not build diagnosis or treatment recommendation features.
Keep the emergency flow simple, fast, and visually impressive for a hackathon demo.

Business Idea

You are a senior full-stack developer, product strategist, and hackathon mentor with 10+ Project Idea: MedTrace Offline Problem Statement Patients who move between villages, cities, employers, and hospitals frequently lose continuity of care. Medical records may remain on paper, inside disconnected hospital systems, or in a patient’s memory. This becomes dangerous during emergencies when doctors do not know allergies, previous prescriptions, chronic conditions, pregnancy status, or recent test results. The problem is particularly serious for migrant workers, elderly people, people with disabilities, and families affected by disasters. At the same time, antibiotic resistance caused an estimated 1.27 million deaths globally in 2019, making accurate medication history and responsible antibiotic use increasingly important. � Existing digital health platforms often assume smartphones, stable internet, English literacy, and institutional interoperability—conditions many patients do not have. Target Audience Migrant workers, rural patients, elderly people, people with chronic diseases, and disaster-displaced families. Primary-health-center staff, emergency doctors, pharmacies, NGOs, and public-health departments. They are underserved because current records are fragmented and many systems fail offline or are difficult to use in local languages. Why Now? Digital health infrastructure, interoperable health IDs, edge computing, and privacy-preserving technologies are advancing. The need for resilient health records is also growing because climate events and migration frequently disrupt access to a familiar hospital or doctor. � Proposed Solution MedTrace Offline is a consent-based, multilingual health passport that works without internet and shares only the minimum information needed in an emergency. A patient can carry it through a QR card, NFC tag, or feature-phone interface. Three innovative features: Emergency Minimum Record: Automatically creates a 30-second summary containing allergies, critical conditions, medicines, blood group, and emergency contacts. Offline Consent Chain: Records who accessed which field and allows patients to grant temporary access using a PIN, QR code, or trusted caregiver. Antibiotic Timeline: Displays previous antibiotic use and prompts clinicians to record diagnosis, duration, and outcome, helping reduce duplicate or inappropriate prescriptions. Technology Stack & Architecture Frontend: Flutter mobile app plus progressive web app. Offline storage: SQLite with encrypted local data. Backend: FastAPI, PostgreSQL, and FHIR-compatible APIs. Security: Public-key encryption, role-based access, audit logs, and optional blockchain anchoring for tamper evidence. AI: Local-language speech-to-text and summarization, restricted to administrative summaries rather than diagnosis. Implementation: Build a simulated patient record, offline QR sharing, access expiry, and an emergency dashboard for a clinician. Technical Feasibility Score: 8/10 The core record-sharing workflow is straightforward to prototype. The major challenges are legal compliance, identity verification, and clinical interoperability; the hackathon MVP should use synthetic patient data and explicitly demonstrate privacy controls. Real-World Impact & Scalability Hospitals, NGOs, employers, pharmacies, and health-insurance providers could adopt the platform. It could become a public digital-health layer integrated with national health infrastructure or a B2B continuity-of-care product. Funding opportunities may exist through public-health programs, global-health foundations, humanitarian agencies, and hospital networks. OBJECTIVE: Develop a high-impact, demo-ready web application that balances technical depth, visual CORE MODULES TO IMPLEMENT Break the application into the following must-have modules: fr 1. Authentication & Onboarding Secure login/signup system (email + OAuth options like Google/GitHub) Smooth, animated onboarding walkthrough to explain the product quickly Copy 2. Core Functional Flow Build the primary problem-solving feature end-to-end (describe your use-case) Ensure the UX is intuitive enough for a judge to understand in <10 seconds 3. Data Insights Dashboard Real-time data display using live charts, graphs, counters Use libraries like Recharts, Chart.js, or D3.js for impactful visual storytelling 4. Mobile-First Modern UI Design a clean, mobile-responsive layout using Tailwind CSS + Framer Motion Include dark mode, neumorphic touches, or other visual trends if relevant 5. External API Integration (2 minimum) Integrate meaningful APIs (examples: OpenAI, Twilio, Google Maps, Stripe, etc.) Use them to enhance functionality, personalization, or automation TECHNICAL SPECIFICATIONS Frontend: React.js or Next.js (with Typescript) Framer Motion for smooth transitions & demo-worthy animations Form validation with React Hook Form + Zod/Yup Modular code structure with reusable components WCAG-compliant accessible design practices

Make My PRD

Design by The Resonance | Powered by GPC – The AI Transformation Company

    PRD: You are a senior full-stack developer