Let me start by exploring the project structure and then build the complete dashboard.
Now I'll build the complete dashboard. Let me start by installing dependencies, then create all the files.
Now I'll create all the files. Starting with types and data:
Now let me create the components. I'll start with formatters and the UI components:
Now let me create the chart components:
Now let me create the main App component that ties everything together:
Let me try building the project now:
The project builds successfully. Let me do a quick verification of the complete app by checking the generated output:
The Billing Tracker Analytics Dashboard has been built and deployed successfully! Here's a summary of what was created:
Dashboard Features
📊 KPI Summary Cards (6 cards)
- Total Billing Hours, Actual Billing ($), Expected vs Actual Variance, Utilization Rate, Leave Rate, Non-Billing Hours
- Each card shows trend direction (up/down/neutral) with percentage vs previous period
- Hover animations with gradient accents
📈 Charts & Visualizations
- Monthly Trend (Area chart) — Actual vs Expected billing over time with gradient fills
- Hours Distribution (Donut chart) — Billing vs Non-Billing vs Leave hours split
- Team Breakdown (Bar chart) — Current month hours by team with billing/non-billing/leave breakdown
- Forecast (Bar chart with error bars) — 3-month projection with confidence intervals
🔍 Filters & Controls
- Date Range — Month-to-month selector with start/end dropdowns
- Teams — Multi-select toggle chips (Alpha, Beta, Gamma, Delta, Epsilon)
- Hours Type — All / Billing Only / Non-Billing Only
- Dark Mode Toggle — Full dark/light theme switch
📋 Data Table
- Sortable columns (click any header to sort asc/desc)
- Search/filter by month or team name
- 10 columns: Month, Team, Bill Hrs, Non-Bill Hrs, Leave Hrs, Attend Hrs, Actual Bill, Expected Bill, Variance, Util %
- Color-coded variance (green = positive, red = negative)
⚡ Impact Analysis
- 4 factor cards analyzing what affected billing this month:
- Billing Hours trend
- Leave Impact
- Billing Target achievement
- Utilization changes
- Color-coded status indicators (positive/negative/warning)
📐 Technical
- Built with React + Vite + TypeScript + Tailwind CSS v4
- Recharts for all charting (smooth transitions, tooltips, responsive)
- Realistic seeded random sample data for all teams across 15 months
- Fully responsive layout (mobile to desktop)
- Single-file output (all inlined for easy distribution)
Files built: index.html, src/types.ts, src/data/sampleData.ts, src/utils/formatters.ts, src/components/Header.tsx, src/components/KpiCards.tsx, src/components/Filters.tsx, src/components/MonthlyTrendChart.tsx, src/components/TeamBreakdownChart.tsx, src/components/BillingDistribution.tsx, src/components/ForecastChart.tsx, src/components/DataTable.tsx, src/App.tsx