LabLens - Health Analytics Platform

Inspiration

Lab results are typically delivered as static PDFs with limited context. We wanted to build a structured system that ingests biomarker data, normalizes it against clinical reference ranges, and transforms it into trend-based, analyzable health metrics.

Instead of treating lab reports as isolated snapshots, we modeled them as time-series health data.

What it does

LabLens is a full-stack health analytics platform that:

  • Stores structured biomarker data across multiple reports (18 core biomarkers)
  • Normalizes values against defined reference thresholds
  • Classifies biomarkers into Normal, Borderline, High, and Low states
  • Calculates report-to-report deltas and trends
  • Visualizes biomarker progression over time with interactive charts
  • Generates AI-powered clinician-ready discussion prompts
  • Provides personalized health insights with profile context

Each biomarker is treated as a typed entity with defined thresholds:

Core Biomarkers (18):

  • RBC Count, Haemoglobin, Glucose, Creatinine, Urea
  • Cholesterol, ALT, AST, ALP, Bilirubin
  • Albumin, GFR, BUN, Sodium, Potassium
  • Calcium, TSH, FT4

This ensures deterministic and consistent classification across all reports.

How we built it

Frontend

  • Next.js (App Router) with TypeScript
  • Component-driven architecture with reusable UI components
  • TailwindCSS for responsive, accessible design
  • Accessible semantic HTML (Lighthouse optimized)
  • Interactive trend visualization with GroupedBarChart component
  • Real-time profile and report management

Backend / Analysis Layer

  • Modular API routes for ingestion and analysis
  • Structured biomarker schema with dual-bound threshold support
  • Deterministic rule-based classification engine
  • Delta computation engine for trend analysis:
    • Report-to-report comparisons
    • Status progression tracking
    • Automated insight generation
  • Persistent profile and report storage layer via localStorage with schema versioning
  • AI-powered health assistant integration

DevOps

  • GitHub-integrated CI/CD
  • Deployed on Vercel
  • Production optimization via Next.js build pipeline
  • Schema versioning for seamless data migrations

The system maintains clean separation between:

  • Presentation layer (React components)
  • Analysis logic (biomarker classification, delta computation)
  • Trend computation (time-series analysis)
  • Data storage (typed TypeScript interfaces)

This architecture enables future ML integration and advanced analytics without rewriting core logic.

Challenges we ran into

  1. Biomarker schema design - Creating a flexible schema that supports both single-bound (high-only, low-only) and dual-bound (normal range) thresholds
  2. Threshold boundary edge cases - Properly handling values exactly at borderline thresholds without false positives
  3. Time-series modeling - Computing meaningful deltas and trends without overengineering
  4. Data persistence - Implementing schema versioning to handle migrations and demo data updates
  5. Accessibility in data-dense UI - Maintaining WCAG compliance while displaying complex biomarker grids
  6. Medical accuracy - Avoiding misleading interpretations while providing actionable insights

Accomplishments we're proud of

  • Built a fully modular biomarker classification engine supporting 18+ markers
  • Implemented deterministic status classification with proper dual-bound logic
  • Designed a reusable trend comparison and delta computation pipeline
  • Created an interactive multi-marker visualization system
  • Achieved clean separation of concerns across presentation, logic, and storage layers
  • Delivered a fully deployed, production-ready build with demo data
  • Implemented schema versioning for seamless data structure evolution

What we learned

  • Deterministic health classification requires careful threshold modeling and edge-case handling
  • Strong TypeScript type definitions prevent subtle logic bugs in medical applications
  • Separation of concerns dramatically improves maintainability and testability
  • Accessibility increases trust in data-heavy health applications
  • Schema versioning is critical for managing evolving data structures
  • Interactive visualizations make health trends more actionable than static reports

What's next for LabLens

  • Automated PDF parsing and intelligent lab data extraction
  • Expanded biomarker schema (CRP, ApoB, insulin, homocysteine, etc.)
  • Predictive modeling for trend projection and risk assessment
  • Secure authentication with OAuth and encrypted storage
  • Clinician-shareable export formats (PDF, CSV, HL7)
  • HIPAA-compliant deployment infrastructure
  • Mobile-responsive design optimization
  • Integration with EHR systems
  • Advanced statistical analysis and anomaly detection

Built With

  • eslint
  • github
  • next.js
  • next.js-api-routes
  • node.js
  • postcss
  • react
  • tailwind-css
  • typescript
  • vercel

Try it out

Built With

Share this project:

Updates