About
## The problem it solves
In an emergency, a patient may be unconscious, confused, or unable to communicate critical medical information such as allergies, medications, blood group, or existing medical conditions.
MediKey solves this information gap with a QR-based emergency health identity. A responder can scan the patient's MediKey QR card and quickly access essential emergency information without needing the patient to communicate.
For more sensitive medical records, MediKey uses a separate authorization layer. Hospitals can be verified and granted temporary access to protected records, while access can be tracked through audit logs.
MediKey also uses Gemini to generate concise summaries of authorized medical documents, helping healthcare professionals understand large amounts of information faster while keeping the original documents as the source of truth.
The goal is simple: make critical medical information available to the right person, at the right time, without exposing a patient's complete medical history publicly.
## Challenges we ran into
One of the biggest challenges was designing the right balance between emergency accessibility and patient privacy.
A QR code needs to provide useful information immediately, but putting complete medical records directly behind a QR code would expose highly sensitive information to anyone who scans it. We solved this by separating the system into different access levels: emergency information is available quickly, while sensitive medical records require hospital verification and authorization.
Another challenge was implementing temporary hospital access and making sure sensitive records were not controlled only by frontend logic. We introduced database-level access workflows, temporary access grants, expiration/revocation, and audit logging.
We also faced challenges integrating Gemini with medical documents. We designed the AI feature as an assistive summarization tool rather than a diagnostic system. The original medical documents remain the source of truth, and the AI-generated summary is intended to help authorized users understand the records faster.
Finally, connecting the QR flow, authentication, database, file storage, hospital access, and AI processing into one smooth workflow required debugging across multiple parts of the Next.js and Supabase stac
Screenshots
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.









