Inspiration
Healthcare data is often fragmented across PDFs, EHR systems, and insurance portals. Fraud, duplicate claims, and inconsistencies go unnoticed until financial or clinical damage occurs. We were inspired to build a proactive system that doesn’t just store medical records — but intelligently analyzes and secures them in real time.
What it does
MedLedger AI is a secure, AI-powered healthcare intelligence platform. It allows users to upload medical records (PDFs), extracts structured data, summarizes patient history, and detects anomalies or suspicious patterns in real time.
Instead of being a passive EHR system, it acts as an intelligent monitoring layer over healthcare data.
How I built it
Frontend: Next.js 14 (App Router), TypeScript, Tailwind CSS
Backend: Next.js Server Actions with Supabase (PostgreSQL)
Authentication: JWT session cookies using jose + bcrypt
Email: Resend for OTP verification and password resets
AI: Vercel AI SDK with OpenAI (gpt-4o-mini) or Gemini (gemini-2.0-flash)
PDF Parsing: unpdf for extracting medical document text
The system processes uploaded PDFs, sends extracted content to the AI layer for summarization and anomaly detection, and stores structured results securely in the database.
Challenges I ran into
parsing inconsistent and unstructured medical PDFs
Managing AI API rate limits and token costs
Designing anomaly detection logic without labeled fraud datasets
Securing session-based authentication properly
Maintaining fast performance while processing large files
Accomplishments that I'm proud of
Built a full-stack AI healthcare platform from scratch
Implemented secure JWT-based authentication
Integrated real-time AI summarization and chat over medical records
Designed a scalable PostgreSQL schema for structured healthcare data
Successfully combined AI + security into a working prototype
What I learned
How to architect AI-driven applications securely
Efficient API usage and cost optimization strategies
Handling structured + unstructured data pipelines
Implementing secure authentication in server-side Next.js
Building scalable, production-style project architecture
What's next for Untitled
Add real-time fraud risk scoring models
Implement role-based dashboards (provider, auditor, insurer)
Add blockchain-based audit logging for record immutability
Improve anomaly detection using Isolation Forest or ML models
Prepare for HIPAA-compliant deployment and real-world pilot testing
Built With
- and
- bcrypt-for-password-hashing-email-services:-resend-(otp-verification-&-password-reset)-ai-layer:-vercel-ai-sdk-with-openai-(gpt-4o-mini)-or-google-gemini-(gemini-2.0-flash)-?-used-for-pdf-extraction
- chat
- document
- for
- frontend:-next.js-14-(app-router)
- medical
- medical-history-summarization
- parsing:
- supabase-(postgresql)-authentication:-session-based-jwt-(via-jose)
- tailwind-css-backend:-next.js-server-actions
- text
- typescript
- unpdf