From 478f142bdc66532b54deef4a5a5153b90acff784 Mon Sep 17 00:00:00 2001 From: Bhuvanesh S Date: Fri, 29 May 2026 19:26:17 +0530 Subject: [PATCH] feat: add AI Smart Developer Match Engine dashboard Signed-off-by: Bhuvanesh S --- .../components/AIEngagementInsights.svelte | 15 + .../src/lib/components/AISkillMatcher.svelte | 20 + .../src/lib/components/ActivityHeatmap.svelte | 189 +++++++++ .../src/lib/components/AnalyticsWidget.svelte | 126 ++++++ .../lib/components/CompatibilityRadar.svelte | 209 ++++++++++ .../ContributionForecastChart.svelte | 193 +++++++++ .../lib/components/ContributionRadar.svelte | 164 ++++++++ .../lib/components/DeveloperMatchCard.svelte | 219 ++++++++++ .../components/EventInteractionHeatmap.svelte | 124 ++++++ .../web/src/lib/components/GrowthRadar.svelte | 146 +++++++ .../web/src/lib/components/InsightFeed.svelte | 93 +++++ .../lib/components/MomentumInsights.svelte | 15 + .../NetworkingGrowthForecast.svelte | 129 ++++++ .../lib/components/NetworkingPulseCard.svelte | 198 +++++++++ .../NetworkingRecommendationPanel.svelte | 146 +++++++ .../src/lib/components/OSSImpactGraph.svelte | 149 +++++++ .../RealtimeConnectionStream.svelte | 129 ++++++ .../lib/components/ReputationScoreCard.svelte | 204 +++++++++ .../lib/components/VelocityScoreCard.svelte | 173 ++++++++ apps/web/src/lib/utils/chartMath.ts | 84 ++++ apps/web/src/lib/utils/visualizationEngine.ts | 58 +++ apps/web/src/routes/dashboard/+page.svelte | 389 ++++++++++++++++++ 22 files changed, 3172 insertions(+) create mode 100644 apps/web/src/lib/components/AIEngagementInsights.svelte create mode 100644 apps/web/src/lib/components/AISkillMatcher.svelte create mode 100644 apps/web/src/lib/components/ActivityHeatmap.svelte create mode 100644 apps/web/src/lib/components/AnalyticsWidget.svelte create mode 100644 apps/web/src/lib/components/CompatibilityRadar.svelte create mode 100644 apps/web/src/lib/components/ContributionForecastChart.svelte create mode 100644 apps/web/src/lib/components/ContributionRadar.svelte create mode 100644 apps/web/src/lib/components/DeveloperMatchCard.svelte create mode 100644 apps/web/src/lib/components/EventInteractionHeatmap.svelte create mode 100644 apps/web/src/lib/components/GrowthRadar.svelte create mode 100644 apps/web/src/lib/components/InsightFeed.svelte create mode 100644 apps/web/src/lib/components/MomentumInsights.svelte create mode 100644 apps/web/src/lib/components/NetworkingGrowthForecast.svelte create mode 100644 apps/web/src/lib/components/NetworkingPulseCard.svelte create mode 100644 apps/web/src/lib/components/NetworkingRecommendationPanel.svelte create mode 100644 apps/web/src/lib/components/OSSImpactGraph.svelte create mode 100644 apps/web/src/lib/components/RealtimeConnectionStream.svelte create mode 100644 apps/web/src/lib/components/ReputationScoreCard.svelte create mode 100644 apps/web/src/lib/components/VelocityScoreCard.svelte create mode 100644 apps/web/src/lib/utils/chartMath.ts create mode 100644 apps/web/src/lib/utils/visualizationEngine.ts create mode 100644 apps/web/src/routes/dashboard/+page.svelte diff --git a/apps/web/src/lib/components/AIEngagementInsights.svelte b/apps/web/src/lib/components/AIEngagementInsights.svelte new file mode 100644 index 00000000..0f41e1f6 --- /dev/null +++ b/apps/web/src/lib/components/AIEngagementInsights.svelte @@ -0,0 +1,15 @@ + + + diff --git a/apps/web/src/lib/components/AISkillMatcher.svelte b/apps/web/src/lib/components/AISkillMatcher.svelte new file mode 100644 index 00000000..3c1a7984 --- /dev/null +++ b/apps/web/src/lib/components/AISkillMatcher.svelte @@ -0,0 +1,20 @@ + + + diff --git a/apps/web/src/lib/components/ActivityHeatmap.svelte b/apps/web/src/lib/components/ActivityHeatmap.svelte new file mode 100644 index 00000000..acb0577a --- /dev/null +++ b/apps/web/src/lib/components/ActivityHeatmap.svelte @@ -0,0 +1,189 @@ + + +
+
+

Realtime Contributor Activity

+ + Live + +
+ +
+
+ {#each heatmapData as week, wIndex} +
+ {#each week as day, dIndex} +
+ {/each} +
+ {/each} +
+
+ +
+ Less +
+
+
+
+
+ More +
+
+ + diff --git a/apps/web/src/lib/components/AnalyticsWidget.svelte b/apps/web/src/lib/components/AnalyticsWidget.svelte new file mode 100644 index 00000000..17d25bfe --- /dev/null +++ b/apps/web/src/lib/components/AnalyticsWidget.svelte @@ -0,0 +1,126 @@ + + +
+
+
+ {icon} +
+ + {isPositive ? '↑' : '↓'} {trend} + +
+ +
+

{title}

+
{value}
+
+
+ + diff --git a/apps/web/src/lib/components/CompatibilityRadar.svelte b/apps/web/src/lib/components/CompatibilityRadar.svelte new file mode 100644 index 00000000..6205aede --- /dev/null +++ b/apps/web/src/lib/components/CompatibilityRadar.svelte @@ -0,0 +1,209 @@ + + +
+
+

Skill Overlap Radar

+
+ You + Match +
+
+ +
+ + + {#each gridLevels as level} + + {/each} + + + {#each userData as _, i} + {@const { x, y } = getRadarCoordinates(100, i, sides, center, radius)} + + {/each} + + + + + + + + + {#each matchData as d, i} + {@const { x, y } = getRadarCoordinates(d.value, i, sides, center, radius)} + + Match {d.label}: {d.value}% + + {/each} + + {#each userData as d, i} + {@const { x, y } = getRadarCoordinates(d.value, i, sides, center, radius)} + + Your {d.label}: {d.value}% + + {/each} + + + {#each labels as label} + + {label.text} + + {/each} + +
+
+ + diff --git a/apps/web/src/lib/components/ContributionForecastChart.svelte b/apps/web/src/lib/components/ContributionForecastChart.svelte new file mode 100644 index 00000000..11a66058 --- /dev/null +++ b/apps/web/src/lib/components/ContributionForecastChart.svelte @@ -0,0 +1,193 @@ + + +
+
+

{title}

+
+ Historical + Predicted +
+
+ + +
+ + diff --git a/apps/web/src/lib/components/ContributionRadar.svelte b/apps/web/src/lib/components/ContributionRadar.svelte new file mode 100644 index 00000000..06f4d5fc --- /dev/null +++ b/apps/web/src/lib/components/ContributionRadar.svelte @@ -0,0 +1,164 @@ + + +
+

Contribution Radar

+ +
+ + + {#each gridLevels as level} + + {/each} + + + {#each data as _, i} + {@const { x, y } = getRadarCoordinates(100, i, sides, center, radius)} + + {/each} + + + + + + {#each data as d, i} + {@const { x, y } = getRadarCoordinates(d.value, i, sides, center, radius)} + + {d.label}: {d.value}% + + {/each} + + + {#each labels as label} + + {label.text} + + {/each} + +
+
+ + diff --git a/apps/web/src/lib/components/DeveloperMatchCard.svelte b/apps/web/src/lib/components/DeveloperMatchCard.svelte new file mode 100644 index 00000000..f3ac53c8 --- /dev/null +++ b/apps/web/src/lib/components/DeveloperMatchCard.svelte @@ -0,0 +1,219 @@ + + +
+
+

Top Hackathon Match

+ Highly Compatible +
+ +
+
+ + + + + {matchProfile.name} +
{matchProfile.matchScore}%
+
+ +
+

{matchProfile.name}

+ {matchProfile.handle} +

{matchProfile.role}

+
+
+ +
+ Shared Stack: +
+ {#each commonSkills as skill} + {skill} + {/each} +
+
+ + +
+ + diff --git a/apps/web/src/lib/components/EventInteractionHeatmap.svelte b/apps/web/src/lib/components/EventInteractionHeatmap.svelte new file mode 100644 index 00000000..9a322895 --- /dev/null +++ b/apps/web/src/lib/components/EventInteractionHeatmap.svelte @@ -0,0 +1,124 @@ + + +
+
+

Event Interaction Heatmap

+
+ +
+ {#each heatmapData as intensity, i} +
+ {/each} +
+ +
+ Quiet +
+
+
+
+
+
+
+ Peak +
+
+ + diff --git a/apps/web/src/lib/components/GrowthRadar.svelte b/apps/web/src/lib/components/GrowthRadar.svelte new file mode 100644 index 00000000..0e63f24c --- /dev/null +++ b/apps/web/src/lib/components/GrowthRadar.svelte @@ -0,0 +1,146 @@ + + +
+

Growth Analytics Radar

+ +
+ + + {#each gridLevels as level} + + {/each} + + + {#each data as _, i} + {@const { x, y } = getRadarCoordinates(100, i, sides, center, radius)} + + {/each} + + + + + + {#each data as d, i} + {@const { x, y } = getRadarCoordinates(d.value, i, sides, center, radius)} + + {d.label}: {d.value}% + + {/each} + + + {#each labels as label} + + {label.text} + + {/each} + +
+
+ + diff --git a/apps/web/src/lib/components/InsightFeed.svelte b/apps/web/src/lib/components/InsightFeed.svelte new file mode 100644 index 00000000..513c5a5c --- /dev/null +++ b/apps/web/src/lib/components/InsightFeed.svelte @@ -0,0 +1,93 @@ + + +
+
+

+ {#if variant === 'ai'}🤖 {/if} + {title} +

+
+ +
    + {#each items as item} +
  • + + +

    {item.text}

    +
  • + {/each} +
+
+ + diff --git a/apps/web/src/lib/components/MomentumInsights.svelte b/apps/web/src/lib/components/MomentumInsights.svelte new file mode 100644 index 00000000..4e603a3a --- /dev/null +++ b/apps/web/src/lib/components/MomentumInsights.svelte @@ -0,0 +1,15 @@ + + + diff --git a/apps/web/src/lib/components/NetworkingGrowthForecast.svelte b/apps/web/src/lib/components/NetworkingGrowthForecast.svelte new file mode 100644 index 00000000..04991966 --- /dev/null +++ b/apps/web/src/lib/components/NetworkingGrowthForecast.svelte @@ -0,0 +1,129 @@ + + +
+
+

{title}

+
+ + +
+ + diff --git a/apps/web/src/lib/components/NetworkingPulseCard.svelte b/apps/web/src/lib/components/NetworkingPulseCard.svelte new file mode 100644 index 00000000..864676a5 --- /dev/null +++ b/apps/web/src/lib/components/NetworkingPulseCard.svelte @@ -0,0 +1,198 @@ + + +
+
+
+

Networking Pulse

+ + Live + +
+
+ {status} +
+
+ +
+
+
+ {scansPerHour} + /hr +
+ QR Scan Velocity +
+ +
+ +
+
+ {totalConnections} +
+ Total Connections +
+
+ + +
+ + diff --git a/apps/web/src/lib/components/NetworkingRecommendationPanel.svelte b/apps/web/src/lib/components/NetworkingRecommendationPanel.svelte new file mode 100644 index 00000000..02c74209 --- /dev/null +++ b/apps/web/src/lib/components/NetworkingRecommendationPanel.svelte @@ -0,0 +1,146 @@ + + +
+
+

Recommended Events

+ +
+ +
+ {#each events as event (event.id)} +
+
+

{event.name}

+
+ {event.type} + + {event.date} +
+
+
+ + + + {event.matchScore}% Match +
+
+ {/each} +
+
+ + diff --git a/apps/web/src/lib/components/OSSImpactGraph.svelte b/apps/web/src/lib/components/OSSImpactGraph.svelte new file mode 100644 index 00000000..3fe7518b --- /dev/null +++ b/apps/web/src/lib/components/OSSImpactGraph.svelte @@ -0,0 +1,149 @@ + + +
+
+

{title}

+
+ +
+
+ {maxVal} + {Math.round(maxVal / 2)} + 0 +
+ +
+ {#each data as item} +
+
+
+
+ {item.label} +
+ {/each} +
+
+
+ + diff --git a/apps/web/src/lib/components/RealtimeConnectionStream.svelte b/apps/web/src/lib/components/RealtimeConnectionStream.svelte new file mode 100644 index 00000000..d2874d42 --- /dev/null +++ b/apps/web/src/lib/components/RealtimeConnectionStream.svelte @@ -0,0 +1,129 @@ + + +
+
+

Live Activity Stream

+
+ +
+ {#each stream as item (item.id)} +
+
+ {#if item.type === 'scan'} + + + + {:else if item.type === 'view'} + + + + + {:else} + + + + + + + {/if} +
+
+

{item.user} {item.action}

+ {item.time} +
+
+ {/each} +
+
+ + diff --git a/apps/web/src/lib/components/ReputationScoreCard.svelte b/apps/web/src/lib/components/ReputationScoreCard.svelte new file mode 100644 index 00000000..f59f4133 --- /dev/null +++ b/apps/web/src/lib/components/ReputationScoreCard.svelte @@ -0,0 +1,204 @@ + + +
+
+
+

AI Reputation Score

+ {tier} Tier +
+
+ ↑ {trend} pts +
+
+ +
+ + + + +
+ {score} + / 1000 +
+
+ + +
+ + diff --git a/apps/web/src/lib/components/VelocityScoreCard.svelte b/apps/web/src/lib/components/VelocityScoreCard.svelte new file mode 100644 index 00000000..cc8971cd --- /dev/null +++ b/apps/web/src/lib/components/VelocityScoreCard.svelte @@ -0,0 +1,173 @@ + + +
+
+
+

Contribution Velocity

+ {status} +
+
+ {growthPercentage} +
+
+ +
+
+ {velocityScore} + Current Momentum +
+ +
+ +
+ {predictedScore} + Predicted (30d) +
+
+ + +
+ + diff --git a/apps/web/src/lib/utils/chartMath.ts b/apps/web/src/lib/utils/chartMath.ts new file mode 100644 index 00000000..270eadab --- /dev/null +++ b/apps/web/src/lib/utils/chartMath.ts @@ -0,0 +1,84 @@ +export interface Coordinate { + x: number; + y: number; +} + +/** + * Calculates X/Y coordinates for a point on a radar chart + */ +export function getRadarCoordinates( + value: number, + index: number, + sides: number, + center: number, + radius: number +): Coordinate { + // Handle edge case of 0 sides + if (sides === 0) return { x: center, y: center }; + + const angle = (Math.PI * 2) / sides; + const r = (value / 100) * radius; + // -Math.PI/2 to start drawing from the top + const theta = index * angle - Math.PI / 2; + + return { + x: center + r * Math.cos(theta), + y: center + r * Math.sin(theta) + }; +} + +/** + * Generates an SVG polygon points string for a data series + */ +export function generateRadarPoints( + dataValues: number[], + center: number, + radius: number +): string { + const sides = dataValues.length; + if (sides === 0) return ''; + + return dataValues + .map((val, i) => { + const { x, y } = getRadarCoordinates(val, i, sides, center, radius); + return `${x},${y}`; + }) + .join(' '); +} + +/** + * Generates an SVG polygon points string for a background grid level + */ +export function getGridPolygon( + level: number, + sides: number, + center: number, + radius: number +): string { + if (sides === 0) return ''; + + return Array.from({ length: sides }) + .map((_, i) => { + const { x, y } = getRadarCoordinates(level, i, sides, center, radius); + return `${x},${y}`; + }) + .join(' '); +} + +/** + * Generates label coordinates pushed further out from the radar edges + */ +export function generateLabelCoordinates( + data: { label: string; value: number }[], + center: number, + radius: number, + pushFactor: number = 120 +): (Coordinate & { text: string })[] { + const sides = data.length; + if (sides === 0) return []; + + return data.map((d, i) => { + const { x, y } = getRadarCoordinates(pushFactor, i, sides, center, radius); + return { x, y, text: d.label }; + }); +} diff --git a/apps/web/src/lib/utils/visualizationEngine.ts b/apps/web/src/lib/utils/visualizationEngine.ts new file mode 100644 index 00000000..720bc1bb --- /dev/null +++ b/apps/web/src/lib/utils/visualizationEngine.ts @@ -0,0 +1,58 @@ +/** + * Generates an SVG line path string for sequential data + */ +export function getPathData( + data: number[], + maxVal: number, + width: number, + height: number +): string { + if (!data || data.length === 0) return ''; + // Avoid division by zero + if (data.length === 1) return `M 0 ${height - (data[0] / maxVal) * height}`; + + const stepX = width / (data.length - 1); + const safeMax = maxVal > 0 ? maxVal : 1; // Prevent division by zero + + return data.map((val, i) => { + const x = i * stepX; + const y = height - (val / safeMax) * height; + return `${i === 0 ? 'M' : 'L'} ${x} ${y}`; + }).join(' '); +} + +/** + * Generates an SVG area path string (filled down to baseline) for sequential data + */ +export function getAreaPathData( + data: number[], + maxVal: number, + width: number, + height: number +): string { + if (!data || data.length === 0) return ''; + const linePath = getPathData(data, maxVal, width, height); + // Complete the path by drawing to bottom right, then bottom left, then close + return `${linePath} L ${width} ${height} L 0 ${height} Z`; +} + +/** + * Generates an array of coordinates for interactive points + */ +export function generatePointCoordinates( + data: number[], + maxVal: number, + width: number, + height: number +): { cx: number; cy: number }[] { + if (!data || data.length === 0) return []; + if (data.length === 1) return [{ cx: 0, cy: height - (data[0] / maxVal) * height }]; + + const stepX = width / (data.length - 1); + const safeMax = maxVal > 0 ? maxVal : 1; + + return data.map((val, i) => ({ + cx: i * stepX, + cy: height - (val / safeMax) * height + })); +} diff --git a/apps/web/src/routes/dashboard/+page.svelte b/apps/web/src/routes/dashboard/+page.svelte new file mode 100644 index 00000000..d3bf87bd --- /dev/null +++ b/apps/web/src/routes/dashboard/+page.svelte @@ -0,0 +1,389 @@ + + + + Analytics Command Center | DevCard + + +
+
+
+

GitHub Analytics Command Center

+

Realtime insights into contributor intelligence and repository health.

+
+
+ + +
+
+ +
+
+ {#each stats as stat} + + {/each} +
+ +
+
+ +
+ +
+
+

🤖 AI Contribution Insights

+
+
    +
  • + +

    High merge probability detected for your recent frontend PRs based on historical maintainer behavior.

    +
  • +
  • + +

    Your PR review time is slightly above average today. Consider smaller, isolated commits.

    +
  • +
  • + +

    Found 3 open issues matching your React/Next.js skillset with "critical" priority.

    +
  • +
+ +
+
+ +
+

AI Reputation & Impact

+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+

Contribution Velocity Predictor

+
+ +
+
+ + +
+
+ +
+
+ +
+
+ +
+

Networking & Event Intelligence

+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ +
+

AI Smart Developer Match Engine

+
+ +
+
+ +
+
+ +
+
+ + +
+
+
+
+ +