Component Library
14 reusable components — data visualization, navigation, real-time alerts, and interactive UI.
Data Visualization
IdentityGraph
IdentityGraph.tsx·387 LOCD3.js force-directed graph rendering identity relationships: users ↔ fingerprints ↔ domainprints ↔ domains. Canvas-based for performance with 100+ nodes. Supports zoom, pan, and click-to-select.
Key Props / State
data | GraphData | Nodes and edges from /admin/identity-graph |
selectedDomain | string[] | Domain filter from DomainMultiSelect |
onNodeClick | (node) => void | Opens IdentityGraphPanel |
Node types & colors: ├── user → cyan (#06b6d4) ├── fp → purple (#a855f7) ├── dp → emerald (#10b981) └── domain → amber (#f59e0b) Force simulation: ├── charge: -300 (repulsion) ├── link distance: 80 ├── collision radius: 30 └── center: canvas center
IdentityGraphPanel
IdentityGraphPanel.tsx·152 LOCSlide-in detail panel showing node metadata: events, related identities, risk scores. Positioned with z-index layering above the graph.
Key Props / State
node | GraphNode | null | Selected node data |
onClose | () => void | Close panel callback |
onNavigate | (id) => void | Navigate to detail page |
FraudChart
FraudChart.tsx·217 LOCRisk score distribution chart with bar visualization. Shows breakdown by risk level (low/medium/high/critical) and detection signal types.
Key Props / State
byRiskLevel | Record<string, number> | Distribution of risk levels |
byReason | Record<string, number> | Count by detection signal |
CollisionGraph
CollisionGraph.tsx·199 LOCVisualizes fingerprint collisions — cases where the same browser fingerprint appears across multiple user accounts. Uses node-link diagram.
Key Props / State
fingerprint | string | Target fingerprint hash |
userIds | string[] | Associated user IDs |
hasCollisions | boolean | Whether collision exists |
GeoMap / GeoMapInner
GeoMap.tsx + GeoMapInner.tsx·126 LOCGeographic heatmap showing event distribution by country. Dynamic import (client-only) to avoid SSR issues with map libraries. Lazy-loaded wrapper pattern.
// GeoMap.tsx — dynamic import wrapper
const GeoMapInner = dynamic(
() => import('./GeoMapInner'),
{ ssr: false, loading: () => <Skeleton /> }
);ImpossibleTravelSection
ImpossibleTravelSection.tsx·103 LOCAlert cards for impossible travel detections. Shows from/to countries, distance, speed, and risk score for each event. Sorted by speed (most extreme first).
Key Props / State
events | ImpossibleTravelEvent[] | Sorted by speed_kmh desc |
{
fingerprint: "a1b2...",
from_country: "ES",
to_country: "JP",
distance_km: 10200,
delta_hours: 0.5,
speed_kmh: 20400,
risk_score: 90
}Navigation & UI
Sidebar
Sidebar.tsx·188 LOCCollapsible sidebar with 9 navigation items. Mobile: hamburger menu with overlay. Desktop: collapse/expand toggle. Active route indicator with animated cyan glow.
Key Props / State
collapsed | boolean | Collapsed state (desktop) |
mobileOpen | boolean | Open state (mobile) |
CSS Variables: ├── --sidebar-width: 220px ├── --sidebar-collapsed: 56px └── --header-height: 56px Active indicator: ├── 3px cyan bar on left ├── box-shadow glow effect └── Bold icon + text color
EventCard
EventCard.tsx·347 LOCRich event detail card showing all tracking data: fingerprint, domainprint, user ID, site, page, referrer, country, browser, OS, device type, risk score, fraud signals, attribution data, and timestamp.
Key Props / State
event | TrackingEvent | Full event object from DynamoDB |
compact | boolean | Reduced view for tables |
MetricCard
MetricCard.tsx·98 LOCStat display card with icon, value, label, and optional trend indicator. Used across all dashboard pages for KPIs.
Key Props / State
label | string | Metric name |
value | string | number | Display value |
icon | LucideIcon | Icon component |
color | string | Accent color (cyan/purple/emerald/red) |
DomainMultiSelect
DomainMultiSelect.tsx·113 LOCMulti-select dropdown for filtering by domain. Used in Identity Graph and Browse pages. Glassmorphism dropdown with z-index management.
Key Props / State
domains | string[] | Available domains |
selected | string[] | Currently selected |
onChange | (selected) => void | Selection callback |
NotificationBell
NotificationBell.tsx·216 LOCPush notification bell icon with unread count badge. Manages service worker subscription, permission request, and real-time notification display.
Key Props / State
permission | NotificationPermission | Browser permission state |
subscription | PushSubscription | null | Active SW subscription |
Flow: 1. User clicks bell 2. Request notification permission 3. Register service worker 4. Subscribe to push API 5. POST /api/push/subscribe 6. Processor Lambda → POST /api/push/send 7. Service worker shows notification
SystemStatus
SystemStatus.tsx·85 LOCHealth check widget that pings GET /health and displays service status, DynamoDB connectivity, and API version. Auto-refreshes on mount.
Key Props / State
status | 'ok' | 'degraded' | 'error' | Service health state |
database | boolean | DynamoDB connectivity |
version | string | API version (e.g. 4.5.1) |