Role: Senior Frontend Engineer & UI/UX Designer

Project: "Billopsy" – An AI-Powered Medical Bill Auditor Application

Tech Stack: React 19, Tailwind CSS, Lucide React (icons), Recharts (charts), Google Gemini API (@google/genai).

Project Overview

Build a single-page React application that helps users identify errors, duplicates, and overcharges in medical bills. The app allows users to upload an image of a bill, uses AI to analyze line items against fair market rates, calculates a "health score," and generates dispute letters to help users negotiate.

1. Data Models & State

Define the following TypeScript interfaces:

2. AI Integration (geminiService.ts)

Initialize the @google/genai client using process.env.API_KEY. Implement two main functions:

  1. analyzeBillImage(base64):
  2. generateDisputeLetter(item, context):
  3. generateNegotiationScript(analysis):

3. UI Components & Views

A. Global Layout