Inspiration
Medical errors are the third leading cause of death worldwide, and a major reason is that doctors never have your full health history. Patients carry years of lab reports, prescriptions, and discharge summaries across different hospitals, portals, and paper files. There is no single place where all this data lives, connects, and makes sense.
We built Cognure to be that place — an AI health memory layer that reads your documents, extracts medical entities, and structures them into an interactive knowledge graph you can actually query.
What It Does
Cognure is an AI-powered health memory platform with five core features:
Smart Upload — Drop a PDF or text file. Cognure extracts medications, diagnoses, symptoms, procedures, and providers automatically using Groq LLM.
Memory Graph — A living React Flow graph where every health entity is a colored node. Filter by type, search by name, and click any node for confidence-scored details.
Health Timeline — A chronological view of every diagnosis, medication start, procedure, and symptom across all your documents. Answer "when did this start?" instantly.
AI Chat — Ask plain-English questions like "What medications am I taking?" Cognure searches every uploaded document and returns grounded, cited answers — not hallucinations.
Health Report — One-click PDF generation with all medications, diagnoses, providers, and procedures formatted for doctor visits.
How We Built It
- Frontend: Next.js 14 App Router, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Next.js API routes running on Vercel serverless
- Database & Auth: Supabase (PostgreSQL + Row Level Security)
- AI: Groq API for entity extraction and chat completion
- Visualization: React Flow for the interactive knowledge graph
- PDF Handling: Client-side pdfjs-dist extraction to bypass Vercel serverless limitations
- Storage: Supabase Storage for original document files
Challenges We Ran Into
The biggest challenge was PDF text extraction on Vercel serverless. pdfjs-dist requires worker files that don't exist in serverless bundles, causing "DOMMatrix is not defined" and "Failed to load worker" crashes. We solved this by moving all PDF parsing to the client side using a locally bundled worker, then sending extracted text to the server.
Another challenge was entity deduplication. "Dr. Jennifer Chen" and "Dr. Jennifer Chen, MD" were being stored as separate nodes. We built a type-aware normalization engine that strips titles, dosages, and punctuation, then merges duplicates by containment matching while keeping the highest-confidence version.
Accomplishments That We're Proud Of
- Built a working knowledge graph that visualizes 50+ medical entities with zero manual data entry
- Achieved end-to-end flow: Upload → AI Extraction → Graph → Timeline → Chat → PDF Report
- Solved the Vercel serverless PDF parsing problem with a clean client-side architecture
- Implemented smart deduplication that merges similar medical entities across multiple documents
- Created a fully type-safe codebase with strict ESLint rules and zero
anytypes
What We Learned
We learned that healthcare data is incredibly messy in the real world. Doctor names have inconsistent formatting, medications include dosages that break exact matching, and patients have documents spanning years with overlapping information. Building robust normalization and deduplication logic taught us that AI extraction is only half the battle — structuring and cleaning that data is what makes it usable.
We also learned that serverless deployment constraints force creative architecture decisions. Moving PDF parsing client-side instead of fighting serverless limitations resulted in a faster, more reliable user experience.
What's Next For Cognure
- Wearable integration: Connect Apple Health, Oura, and Fitbit data as symptom/trend nodes
- EHR integration: Direct connections to hospital patient portals via FHIR APIs
- Medication interaction warnings: Cross-check extracted medications for dangerous drug interactions
- Provider dashboard: B2B SaaS for doctors to view patient graphs before appointments
- Multi-language support: Extract entities from medical documents in Hindi, Arabic, and other languages
Built With
- groq
- next.js
- pdfjs
- postgresql
- react
- reactflow
- shadcn
- supabase
- tailwindcss
- typescript
- vercel
Log in or sign up for Devpost to join the conversation.