Inspiration
LabLens was inspired by a common issue in medical diagnostics — lab reports are often difficult for patients to interpret, and labs rarely have time to explain each result in detail. I wanted to build something that empowers patients with understandable information, and helps labs reduce time spent on repetitive analysis. The idea was to combine AI with intuitive UI to make lab test insights more accessible, meaningful, and immediate.
What it does
LabLens allows users to:
- Upload lab reports with patient and test data
- Add demo tests to simulate scenarios
- Automatically classify test results as Normal, High, or Low using AI
- Generate AI-written medical explanations for each result
How I built it
- Frontend: Built with Next.js 15, React 19, and TailwindCSS.
- Authentication & Database: Firebase Auth and Firestore.
- AI Integration: Integrated Perplexity API to analyze tests and generate explanations based on patient age, test value, and medical references.
- Secure Config: Used a
.envfile (renamed fromkey) to manage sensitive environment variables.
Challenges I ran into
- AI Prompt Tuning: Structuring prompts for consistent, clinical-level accuracy without overwhelming the response was a major challenge.
- Form Complexity: Creating dynamic test entry forms with real-time validation and support for up to 5 demo tests was tricky to design intuitively.
- Environment Management: Managing secure keys (especially for Perplexity API) while allowing local dev flow without exposing secrets was a hurdle.
- Rate Limits: Since we were making multiple AI requests, optimizing the number and frequency of calls required attention.
Accomplishments that I am proud of
- Seamless Perplexity API integration with real-time AI-based explanations
- Dynamic form system with support for both manual and demo test entries
- Making clinical data actually understandable for non-expert users
What I learned
- How to effectively use an LLM for domain-specific use cases like health diagnostics
- The value of structured prompts in AI reliability
- Best practices around Firebase auth & Firestore for secure health data storage
- Real-world lessons in API security, .env management, and deploying to Vercel
What's next for LabLens
- Add support for uploading scanned reports and OCR to auto-read test data
- Expand AI models for multilingual explanations
- Allow doctors/labs to customize thresholds and reference ranges
- Build a patient dashboard with report history and health summaries
- Integrate with WhatsApp/email for secure report sharing
Log in or sign up for Devpost to join the conversation.