html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Developer Empathy Analytics Dashboard</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chartjs-adapter-date-fns/dist/chartjs-adapter-date-fns.bundle.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<style>
body { background-color: #f8f9fa; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.dashboard-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 2rem; text-align: center; }
.metric-card { background: white; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); padding: 1.5rem; margin-bottom: 1.5rem; transition: transform 0.2s; }
.metric-card:hover { transform: translateY(-5px); }
.metric-value { font-size: 2.5rem; font-weight: bold; color: #667eea; }
.section-header { color: #333; font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 3px solid #667eea; padding-bottom: 0.5rem; }
.chart-container { position: relative; height: 400px; margin-bottom: 2rem; }
.filters { background: white; border-radius: 12px; padding: 1rem; margin-bottom: 2rem; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.wordcloud { font-family: monospace; text-align: center; padding: 2rem; background: white; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.word { display: inline-block; margin: 0.5rem; font-size: 1.2rem; font-weight: bold; }
.positive { color: #28a745; }
.negative { color: #dc3545; }
.neutral { color: #6c757d; }
</style>
</head>
<body>
<div class="dashboard-header">
<h1>🛠️ Developer Empathy Analytics Dashboard</h1>
<p>Spot toil hotspots, track support queries, and monitor satisfaction signals to build better dev experiences.</p>
</div>
<div class="container-fluid px-4 py-4">
<!-- Filters -->
<div class="filters row">
<div class="col-md-3">
<label class="form-label">Time Period</label>
<select id="timeFilter" class="form-select">
<option>Last 7 Days</option>
<option>Last 30 Days</option>
<option>Last 90 Days</option>
<option>YTD</option>
</select>
</div>
<div class="col-md-3">
<label class="form-label">Team</label>
<select id="teamFilter" class="form-select">
<option>All Teams</option>
<option>Frontend</option>
<option>Backend</option>
<option>DevOps</option>
</select>
</div>
<div class="col-md-3">
<label class="form-label">Product</label>
<select id="productFilter" class="form-select">
<option>All Products</option>
<option>API Gateway</option>
<option>Mobile SDK</option>
</select>
</div>
<button class="btn btn-primary col-md-3" onclick="updateDashboard()">Apply Filters</button>
</div>
<!-- KPIs Overview -->
<div class="row">
<div class="col-md-4">
<div class="metric-card text-center">
<h5>Toil Hours (Weekly)</h5>
<div class="metric-value" id="toilHours">1,247</div>
<small class="text-danger">↑ 12% WoW</small>
</div>
</div>
<div class="col-md-4">
<div class="metric-card text-center">
<h5>Support Queries</h5>
<div class="metric-value" id="supportQueries">456</div>
<small class="text-warning">↓ 5% WoW</small>
</div>
</div>
<div class="col-md-4">
<div class="metric-card text-center">
<h5>Avg NPS Score</h5>
<div class="metric-value" id="npsScore" style="color: #28a745;">7.8</div>
<small class="text-success">↑ 0.4 WoW</small>
</div>
</div>
</div>
<div class="row">
<!-- Toil Hotspots -->
<div class="col-lg-6">
<h3 class="section-header">🔥 Toil Hotspots</h3>
<p>Top manual/repetitive tasks consuming dev time (from Jira/GitHub logs).</p>
<div class="chart-container">
<canvas id="toilChart"></canvas>
</div>
</div>
<!-- Support Queries -->
<div class="col-lg-6">
<h3 class="section-header">📞 Support Queries</h3>
<p>Query volume, categories, and resolution time trends.</p>
<div class="chart-container">
<canvas id="supportChart"></canvas>
</div>
</div>
</div>
<div class="row">
<!-- Satisfaction Signals Trend -->
<div class="col-lg-6">
<h3 class="section-header">😊 Satisfaction Signals</h3>
<p>NPS & CSAT trends over time.</p>
<div class="chart-container">
<canvas id="satisfactionChart"></canvas>
</div>
</div>
<!-- Sentiment Word Cloud -->
<div class="col-lg-6">
<h3 class="section-header">💭 Feedback Sentiment</h3>
<p>Word cloud from Slack/Jira/survey comments (NLP-powered).</p>
<div class="wordcloud" id="wordCloud">
<span class="word positive" style="font-size: 3rem;">Reliable</span>
<span class="word negative" style="font-size: 2.5rem;">Bugs</span>
<span class="word positive" style="font-size: 2.2rem;">Fast</span>
<span class="word negative" style="font-size: 2rem;">Slow</span>
<span class="word neutral" style="font-size: 1.8rem;">Docs</span>
<span class="word positive" style="font-size: 2.3rem;">Integrates</span>
<span class="word negative" style="font-size: 1.9rem;">Setup</span>
<span class="word positive" style="font-size: 1.7rem;">Stable</span>
</div>
</div>
</div>
<!-- Actionable Insights -->
<div class="row">
<div class="col-12">
<div class="metric-card">
<h3 class="section-header">🚀 Actionable Insights</h3>
<ul class="list-group list-group-flush">
<li class="list-group-item"><strong>High Toil Alert:</strong> Manual deployments (45% of toil) – Automate with CI/CD pipelines.</li>
<li class="list-group-item"><strong>Support Spike:</strong> API auth queries up 30% – Improve onboarding docs.</li>
<li class="list-group-item"><strong>Satisfaction Dip:</strong> Backend team NPS at 6.2 – Schedule empathy interviews.</li>
</ul>
</div>
</div>
</div>
</div>
<script>
// Sample data (in real impl: fetch from API e.g., Mixpanel/Amplitude + custom ETL)
const toilData = {
labels: ['Manual Deploys', 'Debugging', 'Config Mgmt', 'Testing', 'Logs Review'],
datasets: [{ label: 'Hours Spent', data: [562, 320, 210, 95, 60], backgroundColor: ['#ff6b6b', '#feca57', '#ff9ff3', '#54a0ff', '#5f27cd'] }]
};
const supportData = {
labels: ['Auth Issues', 'Integration', 'Performance', 'Docs', 'Other'],
datasets: [{ label: 'Queries', data: [180, 120, 85, 42, 29], backgroundColor: '#48dbfb' }]
};
const satisfactionData = {
labels: ['Week 1', 'Week 2', 'Week 3', 'Week 4'],
datasets: [
{ label: 'NPS', data: [7.2, 7.4, 7.6, 7.8], borderColor: '#28a745', fill: false },
{ label: 'CSAT', data: [8.1, 8.0, 7.9, 8.2], borderColor: '#007bff', fill: false }
]
};
// Initialize charts
const toilCtx = document.getElementById('toilChart').getContext('2d');
new Chart(toilCtx, { type: 'doughnut', data: toilData, options: { responsive: true, maintainAspectRatio: false } });
const supportCtx = document.getElementById('supportChart').getContext('2d');
new Chart(supportCtx, { type: 'bar', data: supportData, options: { responsive: true, maintainAspectRatio: false, scales: { y: { beginAtZero: true } } } });
const satisfactionCtx = document.getElementById('satisfactionChart').getContext('2d');
new Chart(satisfactionCtx, { type: 'line', data: satisfactionData, options: { responsive: true, maintainAspectRatio: false } });
// Filter handler (mock – in prod, refetch data)
function updateDashboard() {
alert('Filters applied! In production, this would query your backend (e.g., via Supabase/Grafana). Charts would dynamically update.');
// Simulate refresh
document.getElementById('toilHours').textContent = Math.floor(Math.random() * 500 + 1000);
}
</script>
</body>
</html>
This dashboard turns raw data into dev empathy – prioritize fixes where toil burns brightest! Need backend code or tweaks? Just ask. 🕵️♂️