I'll create a comprehensive Security Analytics Dashboard for SOC Hub. Let me start by exploring the project structure.
Now I have a clear understanding. Let me check the package.json for existing dependencies and then install needed charting libraries.
I'll install lucide-react for icons and recharts for the charts. Then build a comprehensive dashboard.
Now let me update the index.html title and create the dashboard. I'll structure it with multiple files for clarity.
Now let me create the data generation utilities with realistic security metrics.
Let me fix the unused imports:
Let me fix the Sidebar type issue by unifying the item shape:
Now let me create the chart components and filter bar:
Let me fix the unused import in AlertTrendChart.tsx:
Now let me create the LiveFeed and main App:
Wait, I already set the index.css. Let me re-check the current state. I overwrote it. Now let me build the main App.tsx that ties everything together:
Let me also ensure the vite/tailwind config is set up for dark mode class. Let me check the existing tailwind/vite config:
Good. The @custom-variant dark in CSS handles the class-based dark mode for Tailwind v4. Now let me run the build to verify everything works:
The build succeeded. Let me also fix the use of useDashboard() inside the chart file in an awkward way (calling hook inside other hook). Let me clean that up:
The hooks calls inside chart components call useDashboard() multiple times in the same component (in the days calculation). Let me refactor that to be cleaner and follow the rules of hooks:
I need to move the DATE_TO_DAYS constant to the top of the file:
Build succeeded. The dashboard is complete. Here's a summary of what I built:
SentinelOps — Security Analytics Dashboard
Single-page React + Vite + Tailwind v4 dashboard for security engineers with:
Layout
- Sidebar with grouped nav (SOC Hub, Risk Alert Ops, Cloud Asset Manager, Identity & Access, etc.) + a compliance-score card
- Sticky topbar with global search, date-range tabs (24h/7d/14d/30d/90d), live clock, notification bell, dark-mode toggle, and user avatar
- Fully responsive (mobile drawer, sm/md/lg/xl breakpoints)
8 KPI Summary Cards
Open Alerts, Critical Severity, Resolved, MTTD, MTTR, SLA Compliance, Assets Monitored, Avg Risk Score — each with trend indicators (up/down arrows with color-coded % delta), accent gradients, icons, and live-updating sparklines that re-animate every 8s.
Charts (Recharts)
- Composed area + stacked-bar + line — alert volume trend over time with severity stacking and resolution overlay
- Donut chart — severity distribution with center total
- Horizontal bar — alerts by cloud provider (AWS/Azure/GCP/Oracle/On-Prem)
- Vertical bar — alerts by risk category (Identity/Network/Data/App/Compliance/Endpoint)
- Bar chart — top noisy assets
- Dual-line chart — MTTD/MTTR response times
- Live alert feed — animated slide-in list of recent detections
All charts have custom glassmorphic tooltips, smooth Recharts animations, dark-mode-friendly axis colors, and dashed gridlines.
Filter Bar
- Date range (live updates everything)
- Multi-select cloud chips
- Multi-select severity chips
- Category dropdown, Status dropdown
- Active-filter count + Reset/Clear buttons
Data Table
- Sortable columns (Time, Severity, Asset, Risk, MTTD, MTTR, Status)
- Filterable via global search + sidebar filters
- Risk-score bar visualization, severity/status pills
- Pagination with page-size selector and CSV export
Polish
- Dark mode toggle in topbar (persists in localStorage, respects system pref)
- Smooth 200ms transitions on all colors
- Realistic deterministic-but-regenerated sample data (220 alerts, full schema: ID, title, severity, category, cloud, asset, status, risk score, MTTD/MTTR, assignee, region)
- Data regenerates on date-range change and jitters every minute to feel "alive"
- Custom scrollbars, focus rings, hover lifts on cards
Build output: 729 kB (208 kB gzipped) single-file bundle — production-ready.
Files built: index.html, src/index.css, src/data/sampleData.ts, src/context/DashboardContext.tsx, src/components/Topbar.tsx, src/components/Sidebar.tsx, src/components/KpiCard.tsx, src/components/charts/ChartTooltip.tsx, src/components/AlertTrendChart.tsx, src/components/FilterBar.tsx, src/components/AlertTable.tsx, src/components/LiveFeed.tsx, src/App.tsx