Labmate is an AI-powered medical report reader that extracts key metrics from your lab reports and explains them in simple, plain English with natural lifestyle recommendations.
🔗 Live Demo (Update with actual live URL if different)
⚠️ Disclaimer: This tool provides general educational information based on AI analysis. It is not medical advice, diagnosis, or treatment. Always consult a qualified doctor before making any health decisions.
- Upload PDF: Securely upload your blood tests, lipid panels, or other medical reports.
- Extract Text: Automatically extracts text from the PDF (Note: PDF must be text-searchable. Scanned images without OCR will not work).
- Groq Structured Extraction: Uses open-source models via Groq (like Llama 3.1 and GPT-OSS) to parse the text and structure the data.
- Report UI: Beautiful, easy-to-read interface showing status (high/low/normal) and lifestyle-only suggestions.
| Technology | Description |
|---|---|
| Next.js 16 | React framework (App Router) |
| pdf-parse | Extracts text from PDF files |
| Groq AI | Blazing fast AI inference for structured extraction (using Llama 3.1 / GPT-OSS) |
| Tailwind CSS | Utility-first styling |
| Recharts | For potential future data visualization |
| Framer Motion | UI animations |
-
Clone the repository and install dependencies:
npm install
-
Set up your environment variables by copying the example file and adding your Groq API key:
cp .env.example .env.local
Note: Without a valid
GROQ_API_KEY, the application will return mock data for testing the UI. -
Start the development server:
npm run dev
-
Open http://localhost:3000 with your browser to see the result.
The application follows a simple edge-compatible flow. For a detailed breakdown and sequence diagrams, please read ARCHITECTURE.md.
upload-> User uploads a PDF.POST /api/parse-pdf-> The backend parses the PDF text locally, truncates it to fit token limits, and sends it to the Groq API for structured extraction.report/[id]-> The structured data is presented to the user on a visual dashboard, saved to localStorage.POST /api/chat-> The user can ask questions; the context (raw text + JSON) is passed to the AI for a secure, lifestyle-focused response.