Clinical Lens is an advanced clinical decision support platform designed to help healthcare professionals analyze patient data, explore medical guidelines, and find similar cases through an AI-powered copilot interface.
The platform leverages a modern tech stack to provide real-time, context-aware clinical insights. It integrates structured patient data (labs, prescriptions, diagnoses) with unstructured discharge summaries and live medical research to empower clinicians at the point of care.
- Frontend: Next.js 15+ (App Router), React 19
- Styling: Tailwind CSS v4, Shadcn UI
- Database: Convex (Real-time DB, Vector Search)
- AI Orchestration: Mastra (Agents, Tools, Memory)
- Copilot Interface: CopilotKit (Generative UI)
- Theming: next-themes (Light/Dark/System)
- Icons: Lucide React
- Clinical Copilot: Interactive AI assistant that understands patient context and assists with data lookup and guideline research.
- Safety Auditing: Automated heuristic-based cross-referencing of prescriptions against diagnoses to identify potential charting errors.
- Visual Analytics: Interactive time-series charts for laboratory measurements using Recharts.
- Vector Search: Semantic search across thousands of discharge summaries to find clinically similar patient cases.
- Evidence-Based Insights: Real-time access to the latest medical guidelines and clinical trials via Tavily integration.
- Phase 0: Project Setup
- Phase 0.5: Clerk + Convex Auth
- Phase 1: Data Foundation
- Phase 2: Mastra Agents
- Phase 3: Frontend
- Phase 4: Polish & Demo
- Design System — Frontend standards and component guidelines.
- Agent Guidelines — Instructions for AI agents working on this project.
pnpm installCopy .env.example to .env.local and fill in your API keys (Gemini, Convex, Tavily, OpenAI).
# Start Next.js frontend
pnpm dev
# In a separate terminal, start Convex development server
pnpm dlx convex devOpen http://localhost:3000 to view the application.
If you are an AI agent working on this repository, please read and follow the AGENTS.md guidelines and refer to designsystem.md for UI implementation details.