Technical Debt Tracker Generator

Technical Debt Tracker

Log, categorize, and estimate the cost of technical debt.

Technical Debt Audit Report

Generated on:

$0 Total Est. Cost
0 Total Items
0 Critical Issues

Debt Inventory

Log New Technical Debt

Manage Debt Items

Review and delete items from your tracker.

Title Category Priority Cost Action

No technical debt items found. Good job!

'; } debtItems.forEach(item => { totalCost += Number(item.cost); if (item.priority === 'Critical') criticalCount++; const card = document.createElement('div'); card.className = `tdt-item-card tdt-p-${item.priority.toLowerCase()}`; // Color for priority tag let prioColor = '#9ca3af'; if(item.priority === 'Critical') prioColor = '#dc2626'; else if(item.priority === 'High') prioColor = '#ea580c'; else if(item.priority === 'Medium') prioColor = '#d97706'; else if(item.priority === 'Low') prioColor = '#059669'; card.innerHTML = `

${escapeHtml(item.title)}

$${Number(item.cost).toLocaleString('en-US')}
${item.priority} ${item.category} ${item.status}
${escapeHtml(item.desc)}
`; grid.appendChild(card); }); // Update Stats document.getElementById('tdt-stat-cost').innerText = '$' + totalCost.toLocaleString('en-US'); document.getElementById('tdt-stat-count').innerText = debtItems.length; document.getElementById('tdt-stat-critical').innerText = criticalCount; } function renderTable() { const tbody = document.getElementById('tdt-manage-body'); tbody.innerHTML = ''; debtItems.forEach(item => { const tr = document.createElement('tr'); tr.innerHTML = ` ${escapeHtml(item.title)} ${item.category} ${item.priority} $${Number(item.cost).toLocaleString('en-US')} `; tbody.appendChild(tr); }); } window.tdtAddItem = function() { const title = document.getElementById('tdt-in-title').value; const category = document.getElementById('tdt-in-cat').value; const priority = document.getElementById('tdt-in-prio').value; const cost = document.getElementById('tdt-in-cost').value; const status = document.getElementById('tdt-in-status').value; const desc = document.getElementById('tdt-in-desc').value; if (!title || !cost) { alert("Title and Estimated Cost are required."); return; } const newItem = { id: Date.now(), title, category, priority, cost: parseFloat(cost), status, desc }; debtItems.push(newItem); // Clear inputs document.getElementById('tdt-in-title').value = ''; document.getElementById('tdt-in-cost').value = ''; document.getElementById('tdt-in-desc').value = ''; refreshAll(); alert("Debt item added."); tdtSwitchTab('dashboard'); }; window.tdtDeleteItem = function(id) { if(confirm("Remove this item?")) { debtItems = debtItems.filter(i => i.id !== id); refreshAll(); } }; function refreshAll() { renderDashboard(); renderTable(); } function escapeHtml(text) { if (!text) return ''; return text.replace(/[&<>"']/g, function(m) { switch (m) { case '&': return '&'; case '<': return '<'; case '>': return '>'; case '"': return '"'; case "'": return '''; default: return m; } }); } // --- PDF Export --- document.getElementById('tdt-pdf-btn').addEventListener('click', function() { const element = document.getElementById('tdt-print-area'); const dateSpan = document.getElementById('tdt-print-date'); // Set date for print dateSpan.innerText = new Date().toLocaleDateString('en-US'); // Add Class for print styling document.body.classList.add('tdt-generating-pdf'); const opt = { margin: [0.5, 0.5], filename: 'Technical_Debt_Report.pdf', image: { type: 'jpeg', quality: 0.98 }, html2canvas: { scale: 2, useCORS: true }, jsPDF: { unit: 'in', format: 'letter', orientation: 'portrait' }, pagebreak: { mode: ['avoid-all', 'css', 'legacy'] } }; html2pdf().set(opt).from(element).save().then(() => { document.body.classList.remove('tdt-generating-pdf'); }); }); // Init refreshAll(); });
Scroll to Top