in script.js [507:524]
function downloadJson() {
if (!currentData) return;
// Ensure the architecture name is updated before download
updateArchitectureName();
const jsonString = JSON.stringify(currentData, null, 2);
const blob = new Blob([jsonString], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
const filename = `${currentData.name || 'architecture'}.alz_architecture_definition.json`;
a.download = filename;
a.click();
URL.revokeObjectURL(url);
}