Create an interactive analytics dashboard for clínica, que vende medicamentos GLP uno…
- User
Create an interactive analytics dashboard for clínica, que vende medicamentos GLP uno aimed at Pacientes. Include KPI summary cards with trend indicators, a mix of line, bar, and donut charts with hover tooltips and smooth transitions, a sortable and filterable data table, and date-range and segment filters that update every view live. Use a clean, modern visual style with clear layout hierarchy and a dark mode toggle, generate realistic sample data so every chart feels alive, and make it fully responsive.
Assistant
I'll create a comprehensive analytics dashboard for a GLP-1 medication clinic. Let me start by planning the specification and then building the application.
Now let me install the required packages for charts and icons:
Now let me update the index.html with an appropriate title:
Now let me create the comprehensive dashboard application:
Let me fix the TypeScript errors:
I see the issue - there's an extra closing parenthesis. Let me fix it:
Let me fix the type issues with the KPICard component:
Let me remove the unused import and fix the icon rendering:
Now let me check and fix the icon rendering in KPICard:
Let me build the project to verify everything works:
The project builds successfully. Let me verify the Tailwind dark mode configuration is properly set up:
The project uses Tailwind v4 which handles dark mode automatically. Let me verify the vite config:
Excellent! The project is complete. Let me provide a summary of what was created:
Summary
I've created a comprehensive Clínica GLP-1 Analytics Dashboard with the following features:
KPI Cards (4 metrics)
- Pacientes Activos - Total active patients with trend indicator
- Recetas del Mes - Monthly prescriptions with trend
- Ingresos Mensuales - Revenue in USD with trend
- Tasa de Adherencia - Adherence rate percentage with trend
Interactive Charts (Recharts)
- Line Chart - Patient growth trends over 12 months (new vs total active)
- Horizontal Bar Chart - Prescriptions by medication (Ozempic, Wegovy, Mounjaro, Zepbound)
- Donut Chart - Patient segment distribution (Weight Loss, Diabetes, Cardiovascular)
- Bar Chart - Monthly prescription trends
Data Table
- Sortable columns (click headers to sort)
- 200 realistic patient records with Spanish names
- Progress bars for patient advancement
- Status badges (Activo, Pendiente, Suspendido)
- Pagination with 10/25/50 items per page
- Row hover effects
Live Filters
- Date Range - Quick select buttons (7D, 30D, 90D, 1Y)
- Search - Filter by patient name or ID
- Segment - Weight Loss, Diabetes, Cardiovascular
- Medication - Ozempic, Wegovy, Mounjaro, Zepbound
- Status - Active, Pending, Suspended
- Clear all filters button
UI/UX Features
- 🌙 Dark Mode Toggle - Persists in localStorage
- 📱 Fully Responsive - Mobile, tablet, desktop layouts
- ✨ Smooth Animations - Staggered fade-ins, hover effects
- 🎨 Modern Design - Clean healthcare aesthetic with emerald/teal palette
- 📊 Realistic Data - 200 patients with authentic Spanish names
Files built:
SPEC.md,index.html,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.