~/antioxidants-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_WIDE"; // 13.3 x 7.5
pres.title = "Antioxidant Mechanisms - Flowchart Comparison";
pres.author = "M.Pharm Pharmacology";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
deepBlue: "0A1628", // dominant dark bg
navyBlue: "0D2347", // card bg
teal: "0E7C86", // accent 1 (enzymatic)
green: "1A7A4A", // accent 2 (non-enzymatic)
orange: "D4700A", // accent 3 (chain-breaker)
red: "C0392B", // free radical / danger
yellow: "F4C842", // highlight / key text
lightBlue: "3EC9D6", // arrows / flow
white: "FFFFFF",
offWhite: "E8F4F8",
mutedGray: "A0B4C0",
lightGreen: "27AE60",
purple: "7D3C98",
rose: "E91E8C",
};
// ─── HELPERS ─────────────────────────────────────────────────────
function titleSlide(slide) {
// full bg
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
// accent bar left
slide.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 0.25, h: 7.5, fill: { color: C.teal } });
// accent bar bottom
slide.addShape(pres.ShapeType.rect, { x: 0, y: 7.1, w: 13.3, h: 0.4, fill: { color: C.teal } });
}
function box(slide, x, y, w, h, fillColor, lineColor, radius) {
slide.addShape(pres.ShapeType.roundRect, {
x, y, w, h,
fill: { color: fillColor },
line: { color: lineColor || fillColor, width: 1.5 },
rectRadius: radius !== undefined ? radius : 0.12,
});
}
function arrow(slide, x, y, w, h, color) {
// simple downward line + arrowhead using a thin rect + triangle
slide.addShape(pres.ShapeType.line, {
x, y, w, h,
line: { color: color || C.lightBlue, width: 2.5, endArrowType: "arrow" },
});
}
function label(slide, txt, x, y, w, h, opts) {
slide.addText(txt, {
x, y, w, h,
fontSize: opts?.fontSize || 13,
color: opts?.color || C.white,
bold: opts?.bold || false,
align: opts?.align || "center",
valign: opts?.valign || "middle",
fontFace: "Calibri",
margin: opts?.margin !== undefined ? opts.margin : 4,
wrap: true,
});
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
titleSlide(s);
// large molecule-like circle decoration
s.addShape(pres.ShapeType.ellipse, { x: 9.5, y: -1.0, w: 5.5, h: 5.5, fill: { color: "0E2A3A" }, line: { color: C.teal, width: 1 } });
s.addShape(pres.ShapeType.ellipse, { x: 10.2, y: 3.8, w: 3.5, h: 3.5, fill: { color: "0B1F2F" }, line: { color: C.lightBlue, width: 1 } });
// molecule dots
[[10.8,1.0,0.18,C.teal],[11.5,0.5,0.13,C.yellow],[10.2,1.8,0.14,C.lightBlue],
[11.9,1.4,0.1,C.white],[10.5,2.2,0.12,C.orange]].forEach(([cx,cy,r,col]) => {
s.addShape(pres.ShapeType.ellipse, { x: cx-r, y: cy-r, w: r*2, h: r*2, fill: { color: col }, line: { color: col, width: 0 } });
});
label(s, "ANTIOXIDANT\nMECHANISMS", 0.5, 1.2, 9.0, 2.2, { fontSize: 46, bold: true, color: C.white, align: "left" });
label(s, "A Comparative Flowchart Analysis", 0.7, 3.3, 8.5, 0.7, { fontSize: 22, color: C.lightBlue, align: "left" });
// divider
s.addShape(pres.ShapeType.line, { x: 0.7, y: 4.1, w: 7.0, h: 0, line: { color: C.teal, width: 1.5 } });
label(s, "Free Radicals • ROS & RNS • Enzymatic Defenses • Non-Enzymatic Defenses", 0.7, 4.25, 10.0, 0.5, { fontSize: 14, color: C.mutedGray, align: "left" });
label(s, "M.Pharm Pharmacology | 2026", 0.7, 6.8, 8.0, 0.5, { fontSize: 12, color: C.mutedGray, align: "left" });
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 2 — Overview: Free Radical → Oxidative Stress → Antioxidant Defense
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.teal } });
label(s, "OVERVIEW: THE OXIDATIVE STRESS PATHWAY", 0, 0, 13.3, 0.55, { fontSize: 16, bold: true, color: C.deepBlue });
// Row 1: triggers
const trigX = [0.3, 2.3, 4.3, 6.3, 8.3, 10.3];
const trigLabels = ["Radiation\n/ UV", "Toxins\n/ Drugs", "Inflammation\n(Phagocytes)", "Ischemia-\nReperfusion", "Normal\nMetabolism", "Heavy\nMetals"];
const trigColors = [C.red, C.orange, "8E44AD", "2980B9", C.green, "7F8C8D"];
trigLabels.forEach((t, i) => {
box(s, trigX[i], 0.75, 1.9, 0.85, trigColors[i], trigColors[i], 0.1);
label(s, t, trigX[i], 0.75, 1.9, 0.85, { fontSize: 11, bold: false });
});
label(s, "TRIGGERS", 0.15, 0.7, 1.5, 0.9, { fontSize: 10, color: C.mutedGray, align: "left", valign: "top" });
// Arrow down
s.addShape(pres.ShapeType.line, { x: 6.4, y: 1.6, w: 0, h: 0.45, line: { color: C.yellow, width: 2.5, endArrowType: "arrow" } });
// Row 2: ROS/RNS box
box(s, 1.5, 2.05, 10.3, 0.85, "1A0A0A", C.red, 0.15);
s.addShape(pres.ShapeType.rect, { x: 1.5, y: 2.05, w: 10.3, h: 0.85, fill: { color: "2C0A0A" }, line: { color: C.red, width: 2 } });
label(s, "⚡ EXCESS FREE RADICALS (ROS + RNS)", 1.5, 2.05, 10.3, 0.85, { fontSize: 17, bold: true, color: C.red });
// sub labels under ROS box
const ros = ["O₂•⁻ Superoxide", "H₂O₂ Hydrogen Peroxide", "•OH Hydroxyl Radical", "ONOO⁻ Peroxynitrite", "NO• Nitric Oxide", "¹O₂ Singlet Oxygen"];
const rosColors = ["3498DB","2ECC71","E74C3C","9B59B6","F39C12","1ABC9C"];
ros.forEach((r, i) => {
const rx = 0.5 + i * 2.1;
box(s, rx, 2.95, 1.9, 0.55, rosColors[i], rosColors[i], 0.08);
label(s, r, rx, 2.95, 1.9, 0.55, { fontSize: 10, bold: false });
});
// Arrow down
s.addShape(pres.ShapeType.line, { x: 6.4, y: 3.55, w: 0, h: 0.35, line: { color: C.yellow, width: 2.5, endArrowType: "arrow" } });
// oxidative stress box
box(s, 3.5, 3.9, 6.3, 0.75, "2C1810", C.orange, 0.15);
label(s, "⚠ OXIDATIVE STRESS", 3.5, 3.9, 6.3, 0.75, { fontSize: 18, bold: true, color: C.orange });
// damage arrows
const dmgX = [0.8, 4.5, 8.5];
const dmgLabels = ["Lipid\nPeroxidation", "Protein\nDamage", "DNA\nDamage"];
const dmgColors = [C.orange, C.red, "8E44AD"];
dmgX.forEach((dx, i) => {
s.addShape(pres.ShapeType.line, { x: dx + 0.65, y: 4.65, w: 0, h: 0.45, line: { color: dmgColors[i], width: 2, endArrowType: "arrow" } });
box(s, dx, 5.1, 1.7, 0.7, "1A0D1A", dmgColors[i], 0.1);
label(s, dmgLabels[i], dx, 5.1, 1.7, 0.7, { fontSize: 12, bold: true, color: dmgColors[i] });
});
// VS antioxidant shield
box(s, 5.5, 4.7, 2.5, 0.8, "0A2A1A", C.lightGreen, 0.1);
label(s, "🛡 ANTIOXIDANT\nDEFENSE", 5.5, 4.7, 2.5, 0.8, { fontSize: 12, bold: true, color: C.lightGreen });
label(s, "If defense OVERWHELMED:", 0.4, 5.85, 4.5, 0.4, { fontSize: 11, color: C.mutedGray, align: "left" });
const diseaseList = ["Cancer","Diabetes","CVD","Neurodegeneration","Aging"];
diseaseList.forEach((d,i) => {
box(s, 0.3 + i*2.5, 6.3, 2.2, 0.55, "1A0A0A", C.red, 0.08);
label(s, d, 0.3 + i*2.5, 6.3, 2.2, 0.55, { fontSize: 12, bold: true, color: "FF6B6B" });
});
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 3 — Enzymatic Antioxidants Flowchart
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.teal } });
label(s, "ENZYMATIC ANTIOXIDANTS — SEQUENTIAL DEFENSE FLOWCHART", 0, 0, 13.3, 0.55, { fontSize: 15, bold: true, color: C.deepBlue });
// Column headers
const cols = [
{ x: 0.3, label: "STEP 1", sub: "SOD", color: "2980B9" },
{ x: 3.4, label: "STEP 2a", sub: "CATALASE", color: C.teal },
{ x: 6.5, label: "STEP 2b", sub: "GLUTATHIONE\nPEROXIDASE", color: C.green },
{ x: 9.6, label: "STEP 3", sub: "GLUTATHIONE\nREDUCTASE", color: C.purple },
];
cols.forEach(c => {
box(s, c.x, 0.7, 2.8, 0.55, c.color, c.color, 0.08);
label(s, c.label, c.x, 0.7, 2.8, 0.55, { fontSize: 12, bold: true });
label(s, c.sub, c.x, 1.25, 2.8, 0.55, { fontSize: 13, bold: true, color: c.color });
});
// Chain: O2•- → H2O2 → H2O
// SOD box
box(s, 0.3, 1.85, 2.8, 1.1, "0A1E35", "2980B9", 0.12);
label(s, "Superoxide Dismutase\n(SOD)", 0.3, 1.85, 2.8, 1.1, { fontSize: 14, bold: true, color: "5DADE2" });
// reaction
box(s, 0.3, 3.05, 2.8, 0.75, "071422", "2980B9", 0.1);
label(s, "2O₂•⁻ + 2H⁺\n→ H₂O₂ + O₂", 0.3, 3.05, 2.8, 0.75, { fontSize: 13, color: C.white });
// location
box(s, 0.3, 3.9, 2.8, 0.55, "051020", "3498DB", 0.08);
label(s, "Cu/Zn-SOD: Cytosol\nMn-SOD: Mitochondria", 0.3, 3.9, 2.8, 0.55, { fontSize: 11, color: C.mutedGray });
// cofactor
box(s, 0.3, 4.55, 2.8, 0.5, "071422", "2980B9", 0.08);
label(s, "Cofactor: Cu, Zn (Mn in mitochondria)", 0.3, 4.55, 2.8, 0.5, { fontSize: 11, color: "AED6F1" });
// product arrow
s.addShape(pres.ShapeType.line, { x: 3.1, y: 3.1, w: 0.3, h: 0, line: { color: C.yellow, width: 2.5, endArrowType: "arrow" } });
label(s, "H₂O₂\nproduced", 2.9, 2.85, 0.8, 0.55, { fontSize: 9, color: C.yellow });
// CATALASE box
box(s, 3.4, 1.85, 2.8, 1.1, "051A1E", C.teal, 0.12);
label(s, "Catalase", 3.4, 1.85, 2.8, 1.1, { fontSize: 14, bold: true, color: C.lightBlue });
box(s, 3.4, 3.05, 2.8, 0.75, "040F12", C.teal, 0.1);
label(s, "2H₂O₂\n→ 2H₂O + O₂", 3.4, 3.05, 2.8, 0.75, { fontSize: 13, color: C.white });
box(s, 3.4, 3.9, 2.8, 0.55, "030B0E", C.teal, 0.08);
label(s, "Location: Peroxisomes\n(high H₂O₂ environments)", 3.4, 3.9, 2.8, 0.55, { fontSize: 11, color: C.mutedGray });
box(s, 3.4, 4.55, 2.8, 0.5, "040F12", C.teal, 0.08);
label(s, "Cofactor: Heme (iron)\nMost efficient H₂O₂ remover", 3.4, 4.55, 2.8, 0.5, { fontSize: 11, color: "A9CCE3" });
// OR label
label(s, "OR", 6.0, 2.9, 0.5, 0.5, { fontSize: 14, bold: true, color: C.yellow });
// GPx box
box(s, 6.5, 1.85, 2.8, 1.1, "0A1E0F", C.green, 0.12);
label(s, "Glutathione Peroxidase\n(GPx)", 6.5, 1.85, 2.8, 1.1, { fontSize: 14, bold: true, color: "58D68D" });
box(s, 6.5, 3.05, 2.8, 0.75, "06120A", C.green, 0.1);
label(s, "H₂O₂ + 2GSH\n→ 2H₂O + GSSG", 6.5, 3.05, 2.8, 0.75, { fontSize: 13, color: C.white });
box(s, 6.5, 3.9, 2.8, 0.55, "040C07", C.green, 0.08);
label(s, "Location: Cytosol +\nMitochondria", 6.5, 3.9, 2.8, 0.55, { fontSize: 11, color: C.mutedGray });
box(s, 6.5, 4.55, 2.8, 0.5, "06120A", C.green, 0.08);
label(s, "Cofactor: Selenium (Se)\nAlso detoxifies lipid peroxides", 6.5, 4.55, 2.8, 0.5, { fontSize: 11, color: "A9DFBF" });
// Arrow to GR
s.addShape(pres.ShapeType.line, { x: 9.3, y: 3.1, w: 0.3, h: 0, line: { color: C.yellow, width: 2.5, endArrowType: "arrow" } });
label(s, "GSSG\nformed", 9.0, 2.85, 0.8, 0.55, { fontSize: 9, color: C.yellow });
// Glutathione Reductase box
box(s, 9.6, 1.85, 2.8, 1.1, "1A0A2A", C.purple, 0.12);
label(s, "Glutathione Reductase\n(GR)", 9.6, 1.85, 2.8, 1.1, { fontSize: 14, bold: true, color: "C39BD3" });
box(s, 9.6, 3.05, 2.8, 0.75, "0F0619", C.purple, 0.1);
label(s, "GSSG + NADPH + H⁺\n→ 2GSH + NADP⁺", 9.6, 3.05, 2.8, 0.75, { fontSize: 13, color: C.white });
box(s, 9.6, 3.9, 2.8, 0.55, "0A0415", C.purple, 0.08);
label(s, "Location: Cytosol\n(Mitochondria)", 9.6, 3.9, 2.8, 0.55, { fontSize: 11, color: C.mutedGray });
box(s, 9.6, 4.55, 2.8, 0.5, "0F0619", C.purple, 0.08);
label(s, "Cofactor: FAD\nNADPH from Pentose Phosphate Pathway", 9.6, 4.55, 2.8, 0.5, { fontSize: 11, color: "D2B4DE" });
// Recycling arrow (GR back to GPx)
s.addShape(pres.ShapeType.line, { x: 9.6, y: 5.1, w: -3.1, h: 0, line: { color: C.lightGreen, width: 1.5, endArrowType: "arrow", dashType: "dash" } });
label(s, "♻ GSH regenerated → reused by GPx", 6.0, 5.05, 4.2, 0.4, { fontSize: 10, color: C.lightGreen });
// Peroxiredoxin addition
box(s, 0.3, 5.2, 12.7, 0.65, "0A0A1A", C.lightBlue, 0.1);
label(s, "PEROXIREDOXINS (PRDx) — Reduce ONOO⁻ (Peroxynitrite) → HNO₂ | Location: Cytosol + Mitochondria | Cofactor: Thioredoxin (Trx)", 0.3, 5.2, 12.7, 0.65, { fontSize: 12, color: C.lightBlue });
// Final outcome
box(s, 2.5, 6.0, 8.3, 0.7, "0A2A1A", C.lightGreen, 0.12);
label(s, "✓ OUTCOME: Free Radicals Neutralized → Cell Protected from Oxidative Damage", 2.5, 6.0, 8.3, 0.7, { fontSize: 14, bold: true, color: C.lightGreen });
// footnote
label(s, "Note: SOD → Catalase / GPx pathway is the PRIMARY enzymatic cascade (First-line defense)", 0.3, 6.9, 12.7, 0.4, { fontSize: 10, color: C.mutedGray });
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 4 — Non-Enzymatic Antioxidants Comparison
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.orange } });
label(s, "NON-ENZYMATIC ANTIOXIDANTS — MECHANISMS & COMPARISON", 0, 0, 13.3, 0.55, { fontSize: 15, bold: true, color: C.deepBlue });
// Cards for each antioxidant
const cards = [
{
name: "Vitamin E\n(α-Tocopherol)",
color: "C0392B",
type: "FAT-SOLUBLE",
mechanism: "Donates H• to lipid\nperoxyl radical (LOO•)\nBreaks lipid peroxidation\nchain in membranes",
rxn: "LOO• + Vit-E-OH\n→ LOOH + Vit-E-O•",
target: "Lipid peroxyl\nradicals (LOO•)",
location: "Cell membrane\nlipid bilayer",
regenerated: "By Vitamin C",
},
{
name: "Vitamin C\n(Ascorbic Acid)",
color: "F39C12",
type: "WATER-SOLUBLE",
mechanism: "Scavenges O₂•⁻, •OH,\nHOCl directly\nRegenerates Vitamin E\nAqueous phase protection",
rxn: "Vit-E-O• + Vit-C\n→ Vit-E-OH + Vit-C•",
target: "O₂•⁻, •OH, HOCl,\nVit-E radical",
location: "Plasma, cytosol\n(aqueous phase)",
regenerated: "By GSH",
},
{
name: "Glutathione\n(GSH)",
color: "27AE60",
type: "TRIPEPTIDE",
mechanism: "Direct scavenger of\n•OH, HOCl, ONOO⁻\nSubstrate for GPx\nDetoxifies xenobiotics",
rxn: "2GSH + H₂O₂\n→ GSSG + 2H₂O\n(via GPx)",
target: "•OH, HOCl, ONOO⁻\nlipid peroxides",
location: "Cytosol, nucleus\nmitochondria",
regenerated: "By GR + NADPH",
},
{
name: "Beta-Carotene\n(Provitamin A)",
color: "E67E22",
type: "FAT-SOLUBLE",
mechanism: "Quenches singlet\noxygen (¹O₂) by\nenergy transfer\nScavenges lipid radicals",
rxn: "¹O₂ + β-carotene\n→ ³O₂ + excited\ncarotenoid (harmless)",
target: "Singlet oxygen (¹O₂)\nlipid peroxyl radicals",
location: "Lipid membranes\nplasma (as Vit A)",
regenerated: "Not regenerated",
},
{
name: "Uric Acid",
color: "8E44AD",
type: "WATER-SOLUBLE",
mechanism: "Scavenges HOCl\nand singlet oxygen\nChelates Fe²⁺/Cu²⁺\nPrevents Fenton rxn",
rxn: "Urate + •OH\n→ Allantoin +\nharmless products",
target: "HOCl, ¹O₂, •OH\nFe²⁺ and Cu²⁺",
location: "Plasma\n(highest conc.)",
regenerated: "Excreted in urine",
},
{
name: "Flavonoids /\nPolyphenols",
color: "2980B9",
type: "PLANT-DERIVED",
mechanism: "Multi-target:\nRadical scavenging\nMetal chelation\nNrf2 pathway activation",
rxn: "Fl-OH + R•\n→ Fl-O• + RH\n(stable radical)",
target: "Multiple ROS/RNS\nFe²⁺ and Cu²⁺",
location: "Plasma, tissues\n(dietary uptake)",
regenerated: "By ascorbate",
},
];
// 2 rows, 3 cols
cards.forEach((card, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const cx = 0.25 + col * 4.35;
const cy = 0.75 + row * 3.3;
const cw = 4.1;
const ch = 3.1;
// card bg
s.addShape(pres.ShapeType.roundRect, {
x: cx, y: cy, w: cw, h: ch,
fill: { color: "0C1C2A" },
line: { color: card.color, width: 2 },
rectRadius: 0.15,
});
// header bar
s.addShape(pres.ShapeType.roundRect, {
x: cx, y: cy, w: cw, h: 0.6,
fill: { color: card.color },
line: { color: card.color, width: 0 },
rectRadius: 0.15,
});
label(s, card.name, cx, cy, cw, 0.6, { fontSize: 13, bold: true });
// type badge
box(s, cx + 0.1, cy + 0.65, cw - 0.2, 0.28, "0A0A1A", card.color, 0.06);
label(s, card.type, cx + 0.1, cy + 0.65, cw - 0.2, 0.28, { fontSize: 10, color: card.color, bold: true });
// mechanism
label(s, card.mechanism, cx + 0.1, cy + 0.98, cw - 0.2, 0.78, { fontSize: 11, color: C.offWhite, align: "left", valign: "top", margin: 2 });
// reaction
box(s, cx + 0.1, cy + 1.8, cw - 0.2, 0.52, "060D14", card.color, 0.06);
label(s, card.rxn, cx + 0.1, cy + 1.8, cw - 0.2, 0.52, { fontSize: 10, color: card.color });
// 2 small info rows
label(s, "Target: " + card.target, cx + 0.1, cy + 2.37, cw - 0.2, 0.35, { fontSize: 10, color: C.mutedGray, align: "left", margin: 1 });
label(s, "Regenerated: " + card.regenerated, cx + 0.1, cy + 2.72, cw - 0.2, 0.32, { fontSize: 10, color: "58D68D", align: "left", margin: 1 });
});
// footer
s.addShape(pres.ShapeType.rect, { x: 0, y: 7.15, w: 13.3, h: 0.35, fill: { color: C.orange } });
label(s, "Synergy: Vit E → Vit C → GSH → NADPH forms a regeneration cascade — each antioxidant recycles the previous", 0, 7.15, 13.3, 0.35, { fontSize: 11, bold: true, color: C.deepBlue });
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 5 — Antioxidant Regeneration Cascade
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.green } });
label(s, "ANTIOXIDANT REGENERATION CASCADE — The Synergistic Cycle", 0, 0, 13.3, 0.55, { fontSize: 15, bold: true, color: C.deepBlue });
// Central cascade — left to right chain
const chain = [
{ label: "LIPID RADICAL\n(LOO•)", color: C.red, x: 0.4, y: 2.5 },
{ label: "VITAMIN E\n(α-Tocopherol)\nFat-soluble", color: "C0392B", x: 2.4, y: 1.2 },
{ label: "Vit E Radical\n(Vit-E-O•)\nStable", color: "7B241C", x: 4.9, y: 1.2 },
{ label: "VITAMIN C\n(Ascorbate)\nWater-soluble", color: "E67E22", x: 7.0, y: 1.2 },
{ label: "Vit C Radical\n(Asc•)\nSemi-stable", color: "784212", x: 9.5, y: 1.2 },
{ label: "GLUTATHIONE\n(GSH)\nTripeptide", color: C.green, x: 11.1, y: 1.2 },
];
// draw chain nodes
chain.forEach((node, i) => {
const nw = 1.9;
const nh = 0.85;
box(s, node.x, node.y, nw, nh, "0C1C2A", node.color, 0.12);
s.addShape(pres.ShapeType.roundRect, { x: node.x, y: node.y, w: nw, h: 0.25, fill: { color: node.color }, line: { color: node.color, width: 0 }, rectRadius: 0.12 });
label(s, node.label, node.x, node.y, nw, nh, { fontSize: 11, bold: false });
});
// Arrows between chain
[[2.3, 1.6, "Quenches"], [4.8, 1.6, "Regenerates"], [6.95, 1.6, "Regenerates"], [9.45, 1.6, "Regenerates"]].forEach(([ax, ay, lbl], i) => {
s.addShape(pres.ShapeType.line, { x: ax, y: ay + 0.03, w: 0.35, h: 0, line: { color: C.yellow, width: 2, endArrowType: "arrow" } });
label(s, lbl, ax - 0.1, ay - 0.25, 0.8, 0.3, { fontSize: 8, color: C.yellow });
});
// LOOH label (product)
box(s, 0.4, 3.6, 1.9, 0.6, "1A0000", C.red, 0.08);
label(s, "LOOH\n(stable lipid\nhydroperoxide)", 0.4, 3.6, 1.9, 0.6, { fontSize: 10, color: C.red });
// GSH → GSSG cycle
box(s, 11.1, 2.5, 1.9, 0.75, "071A0F", C.green, 0.1);
label(s, "GSSG\n(oxidized)", 11.1, 2.5, 1.9, 0.75, { fontSize: 11, color: "58D68D" });
s.addShape(pres.ShapeType.line, { x: 12.0, y: 2.05, w: 0, h: 0.45, line: { color: C.green, width: 2, endArrowType: "arrow" } });
// GR box
box(s, 10.0, 3.4, 2.9, 0.85, "0F0619", C.purple, 0.12);
label(s, "Glutathione Reductase (GR)\nGSSG + NADPH → 2GSH + NADP⁺", 10.0, 3.4, 2.9, 0.85, { fontSize: 12, bold: false, color: "C39BD3" });
s.addShape(pres.ShapeType.line, { x: 11.1, y: 3.4, w: 0, h: -0.35, line: { color: C.purple, width: 2, endArrowType: "arrow" } });
s.addShape(pres.ShapeType.line, { x: 11.0, y: 4.25, w: 0.5, h: 0, line: { color: C.purple, width: 1.5, dashType: "dash" } });
// NADPH source
box(s, 9.4, 4.35, 3.5, 0.65, "060312", C.purple, 0.1);
label(s, "NADPH from Pentose\nPhosphate Pathway (G6PD)", 9.4, 4.35, 3.5, 0.65, { fontSize: 11, color: C.mutedGray });
// Metal chelation box (separate mechanism)
box(s, 0.4, 4.7, 5.5, 1.5, "050E1A", "7F8C8D", 0.12);
label(s, "METAL CHELATION — PREVENTIVE MECHANISM", 0.4, 4.7, 5.5, 0.4, { fontSize: 12, bold: true, color: "85929E" });
const chelators = [
"Transferrin / Ferritin → Sequesters Fe²⁺/Fe³⁺",
"Ceruloplasmin → Binds Cu²⁺",
"Albumin → Binds Cu²⁺ + heme",
"Lactoferrin → Binds Fe in inflammation",
];
chelators.forEach((c, i) => {
label(s, c, 0.5, 5.1 + i * 0.28, 5.3, 0.28, { fontSize: 10, color: C.offWhite, align: "left", margin: 1 });
});
label(s, "✓ Prevents Fenton Reaction: Fe²⁺ + H₂O₂ → •OH", 0.4, 6.2, 5.5, 0.35, { fontSize: 11, bold: true, color: C.yellow });
// Nrf2 pathway box
box(s, 6.2, 4.7, 6.7, 1.5, "050E1A", C.lightBlue, 0.12);
label(s, "Nrf2 PATHWAY — INDUCIBLE DEFENSE", 6.2, 4.7, 6.7, 0.4, { fontSize: 12, bold: true, color: C.lightBlue });
const nrf2 = [
"Oxidative stress → Nrf2 released from Keap1",
"Nrf2 translocates to nucleus",
"Binds ARE (Antioxidant Response Element)",
"↑ SOD, Catalase, GPx, GR, GSH synthesis",
];
nrf2.forEach((n, i) => {
label(s, (i+1) + ". " + n, 6.3, 5.1 + i * 0.28, 6.5, 0.28, { fontSize: 10, color: C.offWhite, align: "left", margin: 1 });
});
label(s, "Inducers: Sulforaphane, Curcumin, Resveratrol, NAC, Quercetin", 6.2, 6.2, 6.7, 0.35, { fontSize: 10, bold: false, color: C.yellow });
// footer note
box(s, 0.3, 6.65, 12.7, 0.6, "0A1810", C.lightGreen, 0.1);
label(s, "Key Insight: Antioxidants work in LAYERS — enzymatic (SOD→Catalase/GPx) + non-enzymatic (Vit E→C→GSH) + preventive (metal chelation) + inducible (Nrf2)", 0.3, 6.65, 12.7, 0.6, { fontSize: 12, bold: true, color: C.lightGreen });
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 6 — Head-to-Head Comparison Table
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: "7D3C98" } });
label(s, "COMPARATIVE SUMMARY TABLE — All Antioxidant Mechanisms", 0, 0, 13.3, 0.55, { fontSize: 15, bold: true, color: C.white });
const headers = ["Antioxidant", "Class", "Mechanism", "Target Radical", "Location", "Cofactor/Source", "Clinical Use"];
const colW = [1.7, 1.2, 2.5, 1.8, 1.6, 1.6, 1.8];
const colX = [0.1];
colW.forEach((w, i) => { if (i > 0) colX.push(colX[i-1] + colW[i-1] + 0.05); });
// header row
headers.forEach((h, i) => {
box(s, colX[i], 0.6, colW[i], 0.45, "7D3C98", "7D3C98", 0.06);
label(s, h, colX[i], 0.6, colW[i], 0.45, { fontSize: 10, bold: true });
});
const rows = [
["SOD", "Enzyme", "Dismutates O₂•⁻ to H₂O₂", "O₂•⁻", "Cytosol/Mito", "Cu, Zn, Mn", "CGD, aging research"],
["Catalase", "Enzyme", "Decomposes H₂O₂ to H₂O+O₂", "H₂O₂", "Peroxisomes", "Heme (Fe)", "H₂O₂ detox"],
["GPx", "Enzyme", "Reduces H₂O₂ via GSH", "H₂O₂, ROOH", "Cytosol/Mito", "Selenium", "Diabetic neuropathy"],
["GR", "Enzyme", "Regenerates GSH from GSSG", "GSSG", "Cytosol", "FAD, NADPH", "Supports GPx cycle"],
["Vitamin E", "Non-Enz", "Chain-breaking in membranes", "LOO•, LO•", "Membranes", "Diet (fats)", "CVD, diabetic Rx"],
["Vitamin C", "Non-Enz", "Aqueous scavenger + Vit-E regen", "OH•, O₂•⁻, HOCl", "Plasma/Cytosol", "Diet (fruits)", "CVD, immune support"],
["Glutathione", "Non-Enz", "Direct scavenger + GPx substrate", "•OH, HOCl, ONOO⁻", "Cytosol/Mito", "Cys, Glu, Gly", "Liver detox, NAC prodrug"],
["Beta-Carotene", "Non-Enz", "Quenches singlet oxygen", "¹O₂, LOO•", "Membranes", "Diet (veggies)", "Cancer prevention (diet)"],
["Uric Acid", "Non-Enz", "Scavenges HOCl, chelates metals", "HOCl, ¹O₂, Fe/Cu", "Plasma", "Purine metabolism", "Endogenous defense"],
["NAC", "Synthetic", "GSH precursor + direct scavenger", "•OH, ONOO⁻", "Plasma/Liver", "Synthetic", "Paracetamol OD, COPD"],
["Edaravone", "Synthetic", "Scavenges •OH + peroxynitrite", "•OH, ONOO⁻", "CNS/Plasma", "Synthetic", "ALS (FDA approved)"],
["Alpha-Lipoic Acid", "Synthetic", "Regenerates Vit C, E, GSH", "Multiple ROS", "Both phases", "Synthetic/Diet", "Diabetic neuropathy"],
];
const rowColors = [
"2980B9","1A6B78","1A7A4A","7D3C98","9B2335","A04000",
"1A6B1A","A04A00","5B2882","555555","3A3A3A","2A2A2A"
];
rows.forEach((row, ri) => {
const ry = 1.1 + ri * 0.5;
const bgColor = ri % 2 === 0 ? "0C1A28" : "081420";
s.addShape(pres.ShapeType.rect, { x: 0.1, y: ry, w: 13.1, h: 0.48, fill: { color: bgColor }, line: { color: "1A2A3A", width: 0.5 } });
// left accent bar
s.addShape(pres.ShapeType.rect, { x: 0.1, y: ry, w: 0.06, h: 0.48, fill: { color: rowColors[ri] }, line: { color: rowColors[ri], width: 0 } });
row.forEach((cell, ci) => {
label(s, cell, colX[ci], ry, colW[ci], 0.48, { fontSize: ci === 0 ? 11 : 10, bold: ci === 0, color: ci === 0 ? C.yellow : C.offWhite, align: ci === 0 ? "center" : "left", margin: 2 });
});
});
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 7 — Therapeutic Roles (Disease-specific)
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.red } });
label(s, "THERAPEUTIC ROLE OF ANTIOXIDANTS IN DISEASE", 0, 0, 13.3, 0.55, { fontSize: 15, bold: true, color: C.white });
const diseases = [
{
name: "CANCER",
color: C.red,
icon: "☢",
mechanism: "ROS → DNA mutations (8-OHdG), oncogene activation,\nNF-κB signaling → cell proliferation",
antioxidants: ["Vitamin C, E, β-carotene (prevention)",
"NAC — protects normal cells in chemo",
"Selenium — reduces DNA oxidation"],
note: "Caution: High-dose Vit E may protect cancer cells",
},
{
name: "DIABETES MELLITUS",
color: "F39C12",
icon: "🩸",
mechanism: "Hyperglycemia → auto-oxidation → O₂•⁻, H₂O₂\nβ-cell ROS damage → insulin ↓ | Insulin resistance via JNK",
antioxidants: ["Alpha-lipoic acid — diabetic neuropathy",
"Vitamin E — β-cell protection",
"NAC — reduces oxidative stress"],
note: "ALA is FDA-approved for diabetic neuropathy (Europe)",
},
{
name: "CVD / ATHEROSCLEROSIS",
color: "E74C3C",
icon: "❤",
mechanism: "ROS → LDL oxidation → ox-LDL → foam cells\nNO• inactivated by O₂•⁻ → endothelial dysfunction",
antioxidants: ["Vitamin E — anti-LDL oxidation",
"CoQ10 — heart failure, statin myopathy",
"Vitamin C — endothelial function"],
note: "Resveratrol/Flavonoids activate Nrf2 → ↑ endogenous defense",
},
{
name: "NEURODEGENERATION",
color: "9B59B6",
icon: "🧠",
mechanism: "High O₂ demand + low SOD in brain\nAmyloid-β + dopamine oxidation → ROS burst",
antioxidants: ["Edaravone — ALS (FDA 2017)",
"Vitamin E — Alzheimer's (modest benefit)",
"Melatonin — Parkinson's neuroprotection"],
note: "Edaravone (Radicava) is the only FDA-approved antioxidant drug for ALS",
},
{
name: "LIVER DISEASE /\nPARACETAMOL OD",
color: C.teal,
icon: "🫀",
mechanism: "Paracetamol → NAPQI → depletes GSH\nCCl₄ → CCl₃• radical → lipid peroxidation",
antioxidants: ["NAC (N-Acetylcysteine) — STANDARD treatment",
"Silymarin (milk thistle) — radical scavenger",
"Replenishes GSH in hepatocytes"],
note: "NAC within 8-10 hrs of paracetamol overdose is life-saving",
},
{
name: "ISCHEMIA-REPERFUSION\nINJURY",
color: "3498DB",
icon: "⚡",
mechanism: "Xanthine oxidase burst on reperfusion\nNeutrophil NADPH oxidase activation → ROS surge",
antioxidants: ["Allopurinol — xanthine oxidase inhibitor",
"NAC — prevents ROS burst",
"SOD mimetics — experimental"],
note: "Allopurinol pre-treatment reduces reperfusion ROS in cardiac surgery",
},
];
// 2 rows × 3 cols
diseases.forEach((d, i) => {
const col = i % 3;
const row = Math.floor(i / 3);
const dx = 0.2 + col * 4.35;
const dy = 0.65 + row * 3.3;
const dw = 4.2;
const dh = 3.1;
// card
s.addShape(pres.ShapeType.roundRect, { x: dx, y: dy, w: dw, h: dh, fill: { color: "080F18" }, line: { color: d.color, width: 2 }, rectRadius: 0.15 });
// header
s.addShape(pres.ShapeType.roundRect, { x: dx, y: dy, w: dw, h: 0.52, fill: { color: d.color }, line: { color: d.color, width: 0 }, rectRadius: 0.15 });
label(s, d.icon + " " + d.name, dx, dy, dw, 0.52, { fontSize: 12, bold: true });
// mechanism
label(s, d.mechanism, dx + 0.1, dy + 0.55, dw - 0.2, 0.7, { fontSize: 10, color: C.offWhite, align: "left", valign: "top", margin: 1 });
// antioxidants list
d.antioxidants.forEach((a, j) => {
box(s, dx + 0.1, dy + 1.3 + j * 0.38, dw - 0.2, 0.33, "0A1420", d.color, 0.06);
label(s, "✓ " + a, dx + 0.1, dy + 1.3 + j * 0.38, dw - 0.2, 0.33, { fontSize: 10, color: d.color, align: "left", margin: 3 });
});
// note
label(s, "★ " + d.note, dx + 0.1, dy + 2.72, dw - 0.2, 0.35, { fontSize: 9, color: C.yellow, align: "left", margin: 1 });
});
}
// ═══════════════════════════════════════════════════════════════════
// SLIDE 8 — Conclusion + Key Points
// ═══════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 7.5, fill: { color: C.deepBlue } });
// top bar
s.addShape(pres.ShapeType.rect, { x: 0, y: 0, w: 13.3, h: 0.55, fill: { color: C.lightGreen } });
label(s, "CONCLUSION & KEY EXAM POINTS", 0, 0, 13.3, 0.55, { fontSize: 16, bold: true, color: C.deepBlue });
// 3-column layout
// Left: Mechanisms summary
box(s, 0.3, 0.7, 4.0, 5.8, "0A1E0F", C.lightGreen, 0.12);
label(s, "MECHANISMS SUMMARY", 0.3, 0.7, 4.0, 0.4, { fontSize: 12, bold: true, color: C.lightGreen });
const mechPoints = [
"SOD → first enzyme: O₂•⁻ → H₂O₂",
"Catalase → peroxisomes: H₂O₂ → H₂O",
"GPx → cytosol: H₂O₂ + GSH → H₂O",
"GR → regenerates GSH via NADPH",
"Vit E → fat-soluble chain breaker",
"Vit C → aqueous scavenger + Vit E regen",
"GSH → most versatile non-enzymatic AO",
"Metal chelators → prevent Fenton rxn",
"Nrf2 → master regulator of AO defense",
"PRDx → neutralize ONOO⁻",
];
mechPoints.forEach((p, i) => {
label(s, "• " + p, 0.4, 1.15 + i * 0.46, 3.8, 0.44, { fontSize: 11, color: C.offWhite, align: "left", margin: 2 });
});
// Middle: Mnemonics
box(s, 4.5, 0.7, 4.3, 5.8, "0A0A1E", C.yellow, 0.12);
label(s, "EXAM MNEMONICS", 4.5, 0.7, 4.3, 0.4, { fontSize: 12, bold: true, color: C.yellow });
box(s, 4.6, 1.15, 4.1, 1.0, "151500", C.yellow, 0.1);
label(s, "ROS: \"Super Hot OH NO\"\nSuperoxide | H₂O₂ | •OH | NO•/ONOO⁻", 4.6, 1.15, 4.1, 1.0, { fontSize: 11, color: C.yellow });
box(s, 4.6, 2.25, 4.1, 1.1, "151500", "F39C12", 0.1);
label(s, "Enzymes: \"SOD-CAT-GPx-GR\"\nSequential 4-enzyme cascade", 4.6, 2.25, 4.1, 1.1, { fontSize: 11, color: "F39C12" });
box(s, 4.6, 3.45, 4.1, 1.1, "0A1500", C.lightGreen, 0.1);
label(s, "Non-Enz: \"CAGE UF\"\nCarotene | Ascorbate | Glutathione |\nE-vitamin | Urate | Flavonoids", 4.6, 3.45, 4.1, 1.1, { fontSize: 11, color: C.lightGreen });
box(s, 4.6, 4.65, 4.1, 0.85, "0A0A15", C.lightBlue, 0.1);
label(s, "Fenton: \"Fe²⁺ + H₂O₂ → •OH\"\n(Iron catalyzes most dangerous radical)", 4.6, 4.65, 4.1, 0.85, { fontSize: 11, color: C.lightBlue });
box(s, 4.6, 5.6, 4.1, 0.75, "15050A", C.rose, 0.1);
label(s, "FDA drug: Edaravone → ALS\nNAC → Paracetamol OD (life-saving)", 4.6, 5.6, 4.1, 0.75, { fontSize: 11, color: C.rose });
// Right: High-yield facts
box(s, 9.0, 0.7, 4.0, 5.8, "1A0A00", C.orange, 0.12);
label(s, "HIGH-YIELD EXAM FACTS", 9.0, 0.7, 4.0, 0.4, { fontSize: 12, bold: true, color: C.orange });
const facts = [
"•OH = MOST REACTIVE radical",
"SOD = FIRST LINE enzymatic AO",
"β-cells have LOW antioxidant levels",
"GPx needs SELENIUM cofactor",
"Catalase in PEROXISOMES only",
"Vit E regenerated by Vit C",
"Vit C regenerated by GSH",
"GSH regenerated by GR + NADPH",
"NADPH from pentose phosphate (G6PD)",
"Nrf2 = master AO transcription factor",
"8-OHdG = biomarker of DNA oxidation",
"MDA = biomarker of lipid peroxidation",
];
facts.forEach((f, i) => {
const isFirst = i === 0;
box(s, 9.1, 1.15 + i * 0.39, 3.8, 0.36, isFirst ? "2C0000" : "0C0800", isFirst ? C.red : C.orange, 0.06);
label(s, f, 9.1, 1.15 + i * 0.39, 3.8, 0.36, { fontSize: 11, color: isFirst ? "FF6B6B" : C.offWhite, bold: isFirst, align: "left", margin: 3 });
});
// Bottom strip
box(s, 0.3, 6.65, 12.7, 0.6, "0A2A1A", C.lightGreen, 0.1);
label(s, "Balance is Key: Physiological ROS = Signaling + Immunity | Excess ROS = Oxidative Stress + Disease | Antioxidant Deficiency = Vulnerability", 0.3, 6.65, 12.7, 0.6, { fontSize: 12, bold: false, color: C.lightGreen });
}
// ─── WRITE FILE ──────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/antioxidants-pptx/Antioxidant_Mechanisms_Flowchart.pptx" })
.then(() => console.log("SUCCESS: File written"))
.catch(err => { console.error("ERROR:", err); process.exit(1); });