Make a power point on stress its management,impact on mental health stress related mental health disorders
mkdir -p /home/daytona/workspace/stress-pptx && ls /home/daytona/workspace/stres…
~/stress-pptx/create_stress_ppt.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.author = "Orris AI";
pres.title = "Stress, Mental Health & Management";
// ─── COLOR PALETTE ───────────────────────────────────────────────
const C = {
darkBg: "0D1B2A", // deep navy – dominant dark
midBg: "1B2F45", // mid navy
accentTeal:"2EC4B6", // teal accent
accentAmb: "E8B14A", // warm amber accent
white: "FFFFFF",
lightGray: "D4E0EC",
softBlue: "5B8DB8",
red: "E05252",
green: "4CAF7D",
purple: "9B59B6",
};
// ─── HELPERS ─────────────────────────────────────────────────────
function addDarkSlide(pres) {
const s = pres.addSlide();
s.background = { color: C.darkBg };
return s;
}
function addMidSlide(pres) {
const s = pres.addSlide();
s.background = { color: C.midBg };
return s;
}
function addAccentBar(slide, color, x, y, w, h) {
slide.addShape(pres.ShapeType.rect, { x, y, w, h, fill: { color } });
}
function slideNumber(slide, n) {
slide.addText(`${n}`, {
x: 9.5, y: 5.2, w: 0.4, h: 0.3,
fontSize: 9, color: C.accentTeal, align: "right"
});
}
function sectionTag(slide, text, color) {
slide.addShape(pres.ShapeType.roundRect, { x: 0.35, y: 0.15, w: 1.8, h: 0.32, fill: { color }, line: { color, width: 0 }, rectRadius: 0.08 });
slide.addText(text, { x: 0.35, y: 0.15, w: 1.8, h: 0.32, fontSize: 8, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 1 – TITLE
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
// Full-width teal bar at top
addAccentBar(s, C.accentTeal, 0, 0, 10, 0.06);
// Large background word
s.addText("STRESS", { x: -0.2, y: 1.0, w: 10.5, h: 3.5, fontSize: 140, bold: true, color: "FFFFFF", transparency: 92, align: "center" });
// Main title
s.addText("STRESS", { x: 0.5, y: 0.7, w: 9, h: 1.1, fontSize: 60, bold: true, color: C.accentTeal, align: "center", charSpacing: 12 });
s.addText("Its Management, Impact on Mental Health\n& Stress-Related Mental Health Disorders", {
x: 0.5, y: 1.85, w: 9, h: 1.2, fontSize: 18, color: C.lightGray, align: "center", italic: false
});
// Decorative divider
s.addShape(pres.ShapeType.rect, { x: 3.8, y: 3.15, w: 2.4, h: 0.045, fill: { color: C.accentAmb } });
s.addText("A Comprehensive Overview", { x: 0.5, y: 3.3, w: 9, h: 0.45, fontSize: 13, color: C.accentAmb, align: "center", italic: true });
addAccentBar(s, C.accentTeal, 0, 5.58, 10, 0.06);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 2 – AGENDA / TABLE OF CONTENTS
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.accentTeal, 0, 0, 0.06, 5.625);
sectionTag(s, "OVERVIEW", C.accentTeal);
s.addText("What We Will Cover", { x: 0.4, y: 0.55, w: 9, h: 0.6, fontSize: 28, bold: true, color: C.white });
addAccentBar(s, C.accentAmb, 0.4, 1.22, 3.0, 0.04);
const items = [
["01", "What is Stress?", "Definition, types & history"],
["02", "Biology of Stress", "HPA axis, cortisol & fight-or-flight"],
["03", "Types of Stressors", "Acute, chronic, eustress & distress"],
["04", "Impact on Mental Health", "How stress damages the mind"],
["05", "Stress-Related Disorders", "PTSD, GAD, depression, adjustment disorder"],
["06", "Stress Management", "Techniques, therapies & lifestyle changes"],
["07", "Key Takeaways", "Summary & action plan"],
];
items.forEach(([num, title, sub], i) => {
const col = i < 4 ? 0 : 1;
const row = i < 4 ? i : i - 4;
const x = col === 0 ? 0.4 : 5.2;
const y = 1.4 + row * 0.9;
// Number circle
s.addShape(pres.ShapeType.ellipse, { x, y: y - 0.05, w: 0.5, h: 0.5, fill: { color: C.accentTeal } });
s.addText(num, { x, y: y - 0.05, w: 0.5, h: 0.5, fontSize: 11, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
s.addText(title, { x: x + 0.6, y, w: 3.6, h: 0.3, fontSize: 13, bold: true, color: C.white, margin: 0 });
s.addText(sub, { x: x + 0.6, y: y + 0.28, w: 3.6, h: 0.25, fontSize: 9.5, color: C.lightGray, margin: 0 });
});
slideNumber(s, 2);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 3 – WHAT IS STRESS?
// ══════════════════════════════════════════════════════════════════
{
const s = addMidSlide(pres);
addAccentBar(s, C.accentTeal, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 01", C.accentAmb);
s.addText("What is Stress?", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.accentTeal });
addAccentBar(s, C.accentAmb, 0.4, 1.2, 9.2, 0.04);
// Definition box
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.3, w: 9.2, h: 1.05, fill: { color: "162538" }, line: { color: C.accentTeal, width: 1 }, rectRadius: 0.1 });
s.addText([
{ text: "Definition: ", options: { bold: true, color: C.accentTeal } },
{ text: "Stress is a feeling of self-doubt about being able to cope with some situation over a period of time. The biologic effects are recognized across species — from livestock to humans.", options: { color: C.white } },
], { x: 0.6, y: 1.38, w: 8.8, h: 0.9, fontSize: 12.5, valign: "middle" });
const facts = [
{ icon: "⚡", title: "Hans Selye (1950s)", body: "Coined the term 'stress' in biology. Showed that life-threatening stressors combined with corticosteroids produce visceral organ lesions (Selye's Triad)." },
{ icon: "🧠", title: "Physiological Response", body: "Activates the Hypothalamic-Pituitary-Adrenal (HPA) axis, releasing cortisol and catecholamines. Prepares the body for 'fight or flight'." },
{ icon: "🌍", title: "Universal Phenomenon", body: "Cultural groups removed from their home, workers in confined dangerous conditions — all show anxiety and stress reactions (Adams & Victor's Neurology)." },
];
facts.forEach((f, i) => {
const x = 0.4 + i * 3.15;
s.addShape(pres.ShapeType.roundRect, { x, y: 2.55, w: 2.95, h: 2.7, fill: { color: "0A1623" }, line: { color: C.softBlue, width: 0.5 }, rectRadius: 0.12 });
s.addText(f.icon, { x, y: 2.6, w: 2.95, h: 0.5, fontSize: 20, align: "center" });
s.addText(f.title, { x: x + 0.12, y: 3.15, w: 2.72, h: 0.35, fontSize: 11, bold: true, color: C.accentTeal });
s.addText(f.body, { x: x + 0.12, y: 3.5, w: 2.72, h: 1.6, fontSize: 9.5, color: C.lightGray });
});
slideNumber(s, 3);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 4 – BIOLOGY OF STRESS (HPA AXIS)
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.purple, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 02", C.purple);
s.addText("The Biology of Stress", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.white });
s.addText("The Hypothalamic-Pituitary-Adrenal (HPA) Axis", { x: 0.4, y: 1.15, w: 9, h: 0.4, fontSize: 15, color: C.accentTeal, italic: true });
addAccentBar(s, C.purple, 0.4, 1.55, 9.2, 0.04);
// Flow diagram of HPA axis
const nodes = [
{ label: "STRESSOR", sub: "Physical / Psychological", x: 0.3, y: 1.75, color: C.accentAmb },
{ label: "HYPOTHALAMUS", sub: "Releases CRH", x: 0.3, y: 2.6, color: C.purple },
{ label: "PITUITARY", sub: "Releases ACTH", x: 0.3, y: 3.45, color: C.softBlue },
{ label: "ADRENAL GLAND", sub: "Releases Cortisol + Adrenaline", x: 0.3, y: 4.3, color: C.red },
];
nodes.forEach((n) => {
s.addShape(pres.ShapeType.roundRect, { x: n.x, y: n.y, w: 2.6, h: 0.7, fill: { color: n.color }, rectRadius: 0.1 });
s.addText(n.label, { x: n.x, y: n.y + 0.04, w: 2.6, h: 0.38, fontSize: 10.5, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
s.addText(n.sub, { x: n.x, y: n.y + 0.38, w: 2.6, h: 0.28, fontSize: 8, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
if (n.label !== "ADRENAL GLAND") {
s.addShape(pres.ShapeType.line, { x: 1.6, y: n.y + 0.7, w: 0, h: 0.15, line: { color: C.white, width: 1.5 } });
}
});
// Effects boxes
const effects = [
{ title: "Acute Effects", items: ["↑ Heart rate & BP", "↑ Blood glucose", "Dilated pupils", "Muscle tension", "Suppressed digestion"], color: C.accentAmb },
{ title: "Cortisol Effects", items: ["Mobilizes energy stores", "Anti-inflammatory", "Suppresses immunity", "Alters memory", "Disrupts sleep"], color: C.purple },
{ title: "Chronic Overload", items: ["Hippocampal atrophy", "Immune suppression", "Cardiovascular disease", "Metabolic syndrome", "Mental illness"], color: C.red },
];
effects.forEach((e, i) => {
const x = 3.3 + i * 2.2;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.75, w: 2.05, h: 3.55, fill: { color: "0A1623" }, line: { color: e.color, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, e.color, x, 1.75, 2.05, 0.38);
s.addText(e.title, { x, y: 1.75, w: 2.05, h: 0.38, fontSize: 10.5, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
e.items.forEach((item, j) => {
s.addText([
{ text: "▸ ", options: { color: e.color, bold: true } },
{ text: item, options: { color: C.lightGray } },
], { x: x + 0.12, y: 2.22 + j * 0.55, w: 1.85, h: 0.5, fontSize: 9.5 });
});
});
slideNumber(s, 4);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 5 – TYPES OF STRESS
// ══════════════════════════════════════════════════════════════════
{
const s = addMidSlide(pres);
addAccentBar(s, C.accentAmb, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 03", C.accentAmb);
s.addText("Types of Stress", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.white });
addAccentBar(s, C.accentAmb, 0.4, 1.18, 9.2, 0.04);
const types = [
{
name: "Acute Stress",
icon: "⚡",
color: C.accentAmb,
desc: "Short-term, immediate response to a perceived threat. Common and manageable.",
examples: ["Job interview", "Near-miss accident", "Exam pressure", "Argument"],
},
{
name: "Chronic Stress",
icon: "🔁",
color: C.red,
desc: "Persistent stress lasting weeks to months. Highly damaging to body and mind.",
examples: ["Poverty", "Abusive relationships", "Long-term illness", "Workplace burnout"],
},
{
name: "Eustress",
icon: "✅",
color: C.green,
desc: "Positive, motivating stress that improves performance and personal growth.",
examples: ["Starting a new job", "Having a baby", "Competitive sports", "Creative challenges"],
},
{
name: "Distress",
icon: "⚠️",
color: C.red,
desc: "Negative stress that overwhelms coping resources and impairs function.",
examples: ["Death of loved one", "Financial crisis", "Serious diagnosis", "Divorce"],
},
];
types.forEach((t, i) => {
const col = i % 2;
const row = Math.floor(i / 2);
const x = 0.35 + col * 4.85;
const y = 1.3 + row * 2.1;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.6, h: 1.95, fill: { color: "0A1623" }, line: { color: t.color, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, t.color, x, y, 4.6, 0.4);
s.addText(`${t.icon} ${t.name}`, { x: x + 0.15, y, w: 4.3, h: 0.4, fontSize: 13, bold: true, color: C.darkBg, valign: "middle", margin: 0 });
s.addText(t.desc, { x: x + 0.15, y: y + 0.45, w: 2.2, h: 0.8, fontSize: 9.5, color: C.lightGray });
s.addText(t.examples.map(e => `• ${e}`).join("\n"), { x: x + 2.4, y: y + 0.45, w: 2.05, h: 1.3, fontSize: 9, color: t.color });
});
slideNumber(s, 5);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 6 – IMPACT ON MENTAL HEALTH
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.red, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 04", C.red);
s.addText("Impact on Mental Health", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.white });
addAccentBar(s, C.red, 0.4, 1.18, 9.2, 0.04);
// Left column – brain impacts
s.addText("Brain & Neurological Effects", { x: 0.4, y: 1.28, w: 4.5, h: 0.38, fontSize: 13, bold: true, color: C.accentTeal });
const brainEffects = [
["Hippocampal Shrinkage", "Chronic cortisol causes hippocampal atrophy → memory loss & learning difficulties"],
["Amygdala Hyperactivation", "Heightened fear & emotional reactivity; increased threat perception"],
["Prefrontal Cortex Impairment", "Reduced rational thinking, impulse control, and decision-making"],
["Neurotransmitter Disruption", "Depletes serotonin, dopamine, norepinephrine → mood disorders"],
["Sleep Architecture Disruption", "Reduces REM sleep; fuels anxiety, irritability, and cognitive fog"],
];
brainEffects.forEach(([title, detail], i) => {
s.addShape(pres.ShapeType.roundRect, { x: 0.4, y: 1.7 + i * 0.74, w: 4.5, h: 0.66, fill: { color: "0A1623" }, line: { color: C.red, width: 0.5 }, rectRadius: 0.08 });
s.addText([
{ text: title + " — ", options: { bold: true, color: C.accentAmb } },
{ text: detail, options: { color: C.lightGray } },
], { x: 0.55, y: 1.74 + i * 0.74, w: 4.2, h: 0.58, fontSize: 9.5 });
});
// Right column – psychological impacts
s.addText("Psychological & Behavioural", { x: 5.1, y: 1.28, w: 4.5, h: 0.38, fontSize: 13, bold: true, color: C.accentTeal });
const psych = [
["😰", "Persistent anxiety", "Constant worry, restlessness, physical tension"],
["😞", "Depression", "Hopelessness, anhedonia, social withdrawal"],
["😤", "Irritability & anger", "Recurrent outbursts, low frustration tolerance"],
["🍷", "Substance misuse", "Alcohol, drugs used as maladaptive coping"],
["🔒", "Learned helplessness", "Feeling unable to influence life outcomes"],
["🧩", "Cognitive impairment", "Concentration problems, forgetfulness, poor judgment"],
];
psych.forEach(([icon, title, detail], i) => {
s.addText(`${icon}`, { x: 5.1, y: 1.72 + i * 0.64, w: 0.4, h: 0.5, fontSize: 14, align: "center" });
s.addText([
{ text: title + "\n", options: { bold: true, color: C.accentAmb, breakLine: false } },
], { x: 5.55, y: 1.72 + i * 0.64, w: 4.0, h: 0.28, fontSize: 10, valign: "middle", margin: 0 });
s.addText(detail, { x: 5.55, y: 1.99 + i * 0.64, w: 4.0, h: 0.28, fontSize: 8.5, color: C.lightGray, margin: 0 });
});
slideNumber(s, 6);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 7 – STRESS-RELATED MENTAL HEALTH DISORDERS
// ══════════════════════════════════════════════════════════════════
{
const s = addMidSlide(pres);
addAccentBar(s, C.purple, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 05", C.purple);
s.addText("Stress-Related Mental Health Disorders", { x: 0.4, y: 0.48, w: 9.2, h: 0.65, fontSize: 26, bold: true, color: C.white });
addAccentBar(s, C.purple, 0.4, 1.15, 9.2, 0.04);
s.addText("ICD-11 Classification: Disorders Specifically Associated with Stress", { x: 0.4, y: 1.22, w: 9.2, h: 0.3, fontSize: 10, color: C.accentTeal, italic: true });
const disorders = [
{
code: "6B40",
name: "Post-Traumatic\nStress Disorder (PTSD)",
color: C.red,
features: ["Re-experiencing traumatic event", "Hyperarousal & hypervigilance", "Avoidance of reminders", "Negative cognitions & mood", "Duration >1 month"],
},
{
code: "6B41",
name: "Complex PTSD",
color: "#C0392B",
features: ["All PTSD symptoms PLUS", "Affect dysregulation", "Negative self-concept", "Disturbed relationships", "Often from childhood trauma"],
},
{
code: "6B43",
name: "Adjustment\nDisorder",
color: C.accentAmb,
features: ["Emotional disturbance post-stressor", "Disproportionate response", "Within 1 month of stressor", "Functional impairment", "Remits when stressor ends"],
},
{
code: "QE84",
name: "Acute Stress\nReaction",
color: C.softBlue,
features: ["Normal response to trauma", "Intrusion, disorientation", "Fight/flight/freeze", "Duration: hours to days", "Not a mental disorder per ICD-11"],
},
];
disorders.forEach((d, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.55, w: 2.22, h: 3.8, fill: { color: "0A1623" }, line: { color: d.color, width: 1.5 }, rectRadius: 0.12 });
addAccentBar(s, d.color, x, 1.55, 2.22, 0.38);
s.addText(d.code, { x, y: 1.55, w: 2.22, h: 0.38, fontSize: 12, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
s.addText(d.name, { x: x + 0.1, y: 1.95, w: 2.02, h: 0.7, fontSize: 10.5, bold: true, color: d.color, align: "center" });
d.features.forEach((f, j) => {
s.addText([
{ text: "✓ ", options: { color: d.color, bold: true } },
{ text: f, options: { color: C.lightGray } },
], { x: x + 0.1, y: 2.68 + j * 0.5, w: 2.02, h: 0.48, fontSize: 8.5 });
});
});
slideNumber(s, 7);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 8 – MORE DISORDERS: GAD, DEPRESSION, BURNOUT
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.accentTeal, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 05", C.accentTeal);
s.addText("Stress & Common Mental Health Disorders", { x: 0.4, y: 0.5, w: 9.2, h: 0.6, fontSize: 27, bold: true, color: C.white });
addAccentBar(s, C.accentTeal, 0.4, 1.12, 9.2, 0.04);
// GAD
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 1.22, w: 4.55, h: 2.0, fill: { color: "0A1623" }, line: { color: C.accentTeal, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, C.accentTeal, 0.3, 1.22, 4.55, 0.4);
s.addText("Generalized Anxiety Disorder (GAD)", { x: 0.3, y: 1.22, w: 4.55, h: 0.4, fontSize: 11.5, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
const gadPoints = ["Excessive, uncontrollable worry (≥6 months)", "Restlessness, fatigue, difficulty concentrating", "Muscle tension, sleep disturbance", "Strongly linked to chronic stressors", "HPA axis hyperactivation confirmed"];
gadPoints.forEach((p, i) => {
s.addText([{ text: "▸ ", options: { color: C.accentTeal, bold: true } }, { text: p, options: { color: C.lightGray } }], { x: 0.45, y: 1.68 + i * 0.3, w: 4.25, h: 0.28, fontSize: 9.5 });
});
// Major Depression
s.addShape(pres.ShapeType.roundRect, { x: 5.15, y: 1.22, w: 4.55, h: 2.0, fill: { color: "0A1623" }, line: { color: C.purple, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, C.purple, 5.15, 1.22, 4.55, 0.4);
s.addText("Major Depressive Disorder (MDD)", { x: 5.15, y: 1.22, w: 4.55, h: 0.4, fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const mddPoints = ["Persistent low mood, anhedonia (≥2 weeks)", "Diathesis-Stress Hypothesis: stress triggers episodes", "Disrupted HPA axis + monoamine depletion", "Hippocampal volume reduction observed", "Stress is the #1 precipitating factor"];
mddPoints.forEach((p, i) => {
s.addText([{ text: "▸ ", options: { color: C.purple, bold: true } }, { text: p, options: { color: C.lightGray } }], { x: 5.3, y: 1.68 + i * 0.3, w: 4.25, h: 0.28, fontSize: 9.5 });
});
// Burnout
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 3.35, w: 4.55, h: 1.98, fill: { color: "0A1623" }, line: { color: C.accentAmb, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, C.accentAmb, 0.3, 3.35, 4.55, 0.4);
s.addText("Burnout (Occupational Stress)", { x: 0.3, y: 3.35, w: 4.55, h: 0.4, fontSize: 11.5, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
const burnoutPoints = ["Emotional exhaustion, cynicism, reduced efficacy", "WHO ICD-11: Occupational phenomenon (QD85)", "Chronic workplace stress etiology", "Leads to physical illness + mental breakdown", "Requires systemic + individual intervention"];
burnoutPoints.forEach((p, i) => {
s.addText([{ text: "▸ ", options: { color: C.accentAmb, bold: true } }, { text: p, options: { color: C.lightGray } }], { x: 0.45, y: 3.8 + i * 0.3, w: 4.25, h: 0.28, fontSize: 9.5 });
});
// OCD / Panic
s.addShape(pres.ShapeType.roundRect, { x: 5.15, y: 3.35, w: 4.55, h: 1.98, fill: { color: "0A1623" }, line: { color: C.red, width: 1.2 }, rectRadius: 0.12 });
addAccentBar(s, C.red, 5.15, 3.35, 4.55, 0.4);
s.addText("Panic Disorder & OCD", { x: 5.15, y: 3.35, w: 4.55, h: 0.4, fontSize: 11.5, bold: true, color: C.white, align: "center", valign: "middle", margin: 0 });
const panicPoints = ["Panic: sudden surges of intense fear/terror", "Stress triggers via lactic acid infusion studies", "OCD: intrusive thoughts + compulsive rituals", "Amygdala & prefrontal circuit dysfunction", "Often co-occur with chronic stress states"];
panicPoints.forEach((p, i) => {
s.addText([{ text: "▸ ", options: { color: C.red, bold: true } }, { text: p, options: { color: C.lightGray } }], { x: 5.3, y: 3.8 + i * 0.3, w: 4.25, h: 0.28, fontSize: 9.5 });
});
slideNumber(s, 8);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 9 – STRESS MANAGEMENT: OVERVIEW
// ══════════════════════════════════════════════════════════════════
{
const s = addMidSlide(pres);
addAccentBar(s, C.green, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 06", C.green);
s.addText("Stress Management", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.white });
s.addText("Evidence-based strategies to reduce, manage, and build resilience", { x: 0.4, y: 1.15, w: 9, h: 0.35, fontSize: 12, color: C.lightGray, italic: true });
addAccentBar(s, C.green, 0.4, 1.5, 9.2, 0.04);
const cats = [
{
category: "🧘 Mind-Body",
color: C.accentTeal,
items: ["Mindfulness Meditation", "Progressive Muscle Relaxation", "Deep Breathing / Diaphragmatic", "Yoga & Tai Chi", "Guided Imagery"],
},
{
category: "🏃 Physical",
color: C.green,
items: ["Aerobic Exercise (30 min/day)", "Strength Training", "Regular Sleep Schedule", "Balanced Nutrition", "Limiting Caffeine & Alcohol"],
},
{
category: "🧠 Psychological",
color: C.purple,
items: ["Cognitive Behavioral Therapy (CBT)", "Psychotherapy / Counselling", "Problem-Solving Therapy", "Acceptance & Commitment (ACT)", "Stress Inoculation Training"],
},
{
category: "🤝 Social & Lifestyle",
color: C.accentAmb,
items: ["Strong social support networks", "Time management skills", "Setting realistic boundaries", "Digital detox / nature time", "Journalling & expressive writing"],
},
];
cats.forEach((c, i) => {
const x = 0.3 + i * 2.38;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.6, w: 2.22, h: 3.75, fill: { color: "0A1623" }, line: { color: c.color, width: 1.5 }, rectRadius: 0.12 });
addAccentBar(s, c.color, x, 1.6, 2.22, 0.46);
s.addText(c.category, { x, y: 1.6, w: 2.22, h: 0.46, fontSize: 11, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
c.items.forEach((item, j) => {
s.addText([
{ text: "◆ ", options: { color: c.color, bold: true } },
{ text: item, options: { color: C.lightGray } },
], { x: x + 0.1, y: 2.12 + j * 0.62, w: 2.02, h: 0.58, fontSize: 9 });
});
});
slideNumber(s, 9);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 10 – PHARMACOLOGICAL MANAGEMENT
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.softBlue, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 06", C.softBlue);
s.addText("Pharmacological Management", { x: 0.4, y: 0.5, w: 9, h: 0.6, fontSize: 28, bold: true, color: C.white });
s.addText("Used when stress leads to clinical mental health disorders", { x: 0.4, y: 1.12, w: 9, h: 0.33, fontSize: 11.5, color: C.lightGray, italic: true });
addAccentBar(s, C.softBlue, 0.4, 1.45, 9.2, 0.04);
const drugs = [
{ class: "SSRIs / SNRIs", examples: "Sertraline, Escitalopram, Venlafaxine", use: "First-line for PTSD, GAD, MDD, panic disorder", mechanism: "Enhance serotonergic & noradrenergic tone", color: C.accentTeal },
{ class: "Benzodiazepines", examples: "Lorazepam, Clonazepam, Diazepam", use: "Short-term acute anxiety relief ONLY", mechanism: "GABA-A receptor positive allosteric modulation", color: C.accentAmb },
{ class: "Beta-Blockers", examples: "Propranolol", use: "Situational anxiety; prevents PTSD memory consolidation", mechanism: "Block peripheral adrenergic stress symptoms", color: C.softBlue },
{ class: "Buspirone", examples: "Buspirone HCl", use: "Chronic GAD; non-addictive anxiolytic", mechanism: "5-HT1A partial agonist", color: C.green },
{ class: "Atypical Antipsychotics", examples: "Quetiapine, Risperidone", use: "Augmentation in treatment-resistant PTSD/MDD", mechanism: "D2/5-HT2A antagonism", color: C.purple },
{ class: "Prazosin", examples: "Prazosin", use: "PTSD-related nightmares", mechanism: "Alpha-1 adrenergic blocker → reduces noradrenergic hyperactivation", color: C.red },
];
// Table header
s.addShape(pres.ShapeType.rect, { x: 0.3, y: 1.55, w: 9.4, h: 0.4, fill: { color: C.softBlue } });
["Drug Class", "Examples", "Primary Use", "Mechanism"].forEach((h, i) => {
const xs = [0.35, 2.3, 4.15, 7.1];
s.addText(h, { x: xs[i], y: 1.55, w: [1.9, 1.8, 2.9, 2.55][i], h: 0.4, fontSize: 10.5, bold: true, color: C.darkBg, valign: "middle", margin: 2 });
});
drugs.forEach((d, i) => {
const y = 2.0 + i * 0.58;
const bg = i % 2 === 0 ? "0D1B2A" : "111E30";
s.addShape(pres.ShapeType.rect, { x: 0.3, y, w: 9.4, h: 0.55, fill: { color: bg } });
addAccentBar(s, d.color, 0.3, y, 0.06, 0.55);
const cells = [d.class, d.examples, d.use, d.mechanism];
const xs = [0.4, 2.3, 4.15, 7.1];
const ws = [1.85, 1.8, 2.9, 2.55];
cells.forEach((cell, ci) => {
s.addText(cell, { x: xs[ci], y: y + 0.04, w: ws[ci], h: 0.48, fontSize: ci === 0 ? 9.5 : 8.5, bold: ci === 0, color: ci === 0 ? d.color : C.lightGray, valign: "middle" });
});
});
slideNumber(s, 10);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 11 – CBT & PSYCHOTHERAPY
// ══════════════════════════════════════════════════════════════════
{
const s = addMidSlide(pres);
addAccentBar(s, C.purple, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 06", C.purple);
s.addText("Psychotherapy for Stress & Disorders", { x: 0.4, y: 0.5, w: 9, h: 0.6, fontSize: 27, bold: true, color: C.white });
addAccentBar(s, C.purple, 0.4, 1.12, 9.2, 0.04);
const therapies = [
{
name: "Cognitive Behavioral Therapy (CBT)",
color: C.purple,
how: "Identifies and restructures maladaptive thought patterns. Gold standard for stress, anxiety, and PTSD.",
steps: ["Psychoeducation about stress", "Identify cognitive distortions", "Behavioral experiments", "Exposure techniques (for PTSD/anxiety)", "Relapse prevention"],
},
{
name: "EMDR – Eye Movement Desensitization",
color: C.accentTeal,
how: "Uses bilateral stimulation to process traumatic memories. First-line WHO recommendation for PTSD.",
steps: ["History taking & assessment", "Target traumatic memory", "Dual attention stimulus (eye movements)", "Desensitization phase", "Installation of positive cognition"],
},
{
name: "Mindfulness-Based Stress Reduction",
color: C.green,
how: "8-week program by Jon Kabat-Zinn. Reduces cortisol, hippocampal stress markers, and rumination.",
steps: ["Body scan meditation", "Sitting meditation", "Mindful movement (yoga)", "Stress reactivity awareness", "Daily informal practice"],
},
];
therapies.forEach((t, i) => {
const y = 1.2 + i * 1.45;
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y, w: 9.4, h: 1.35, fill: { color: "0A1623" }, line: { color: t.color, width: 1.2 }, rectRadius: 0.1 });
addAccentBar(s, t.color, 0.3, y, 0.09, 1.35);
s.addText(t.name, { x: 0.5, y: y + 0.06, w: 4.0, h: 0.35, fontSize: 12, bold: true, color: t.color });
s.addText(t.how, { x: 0.5, y: y + 0.42, w: 3.8, h: 0.85, fontSize: 9.5, color: C.lightGray });
// Steps
t.steps.forEach((st, j) => {
const sx = j < 3 ? 4.6 : 7.0;
const sy = j < 3 ? y + 0.06 + j * 0.42 : y + 0.06 + (j - 3) * 0.42;
s.addText([
{ text: `${j + 1}. `, options: { color: t.color, bold: true } },
{ text: st, options: { color: C.lightGray } },
], { x: sx, y: sy, w: 2.3, h: 0.38, fontSize: 9 });
});
});
slideNumber(s, 11);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 12 – LIFESTYLE & PREVENTION
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.green, 0, 0, 10, 0.06);
sectionTag(s, "SECTION 06", C.green);
s.addText("Lifestyle Interventions & Prevention", { x: 0.4, y: 0.5, w: 9, h: 0.6, fontSize: 27, bold: true, color: C.white });
addAccentBar(s, C.green, 0.4, 1.12, 9.2, 0.04);
const pillars = [
{ icon: "💤", title: "Sleep", points: ["7-9 hours/night", "Consistent sleep schedule", "Sleep hygiene practices", "Reduces cortisol baseline"], color: C.softBlue },
{ icon: "🥗", title: "Nutrition", points: ["Omega-3 fatty acids", "Reduce sugar & ultra-processed food", "Magnesium-rich foods", "Avoid excess caffeine"], color: C.green },
{ icon: "🏃", title: "Exercise", points: ["150 min moderate/week", "Releases endorphins", "Lowers cortisol chronically", "Increases BDNF (brain health)"], color: C.accentAmb },
{ icon: "🤝", title: "Social Support", points: ["Strong relationships buffer stress", "Reduce isolation", "Community involvement", "Peer support groups"], color: C.accentTeal },
{ icon: "🌿", title: "Nature & Rest", points: ["Nature walks reduce cortisol", "Digital detox periods", "Leisure & hobbies", "Vacation / restorative rest"], color: "#27AE60" },
];
pillars.forEach((p, i) => {
const x = 0.3 + i * 1.88;
s.addShape(pres.ShapeType.roundRect, { x, y: 1.2, w: 1.72, h: 4.1, fill: { color: "0A1623" }, line: { color: p.color, width: 1.5 }, rectRadius: 0.12 });
addAccentBar(s, p.color, x, 1.2, 1.72, 0.48);
s.addText(p.icon, { x, y: 1.2, w: 1.72, h: 0.48, fontSize: 18, align: "center", valign: "middle", margin: 0 });
s.addText(p.title, { x: x + 0.08, y: 1.72, w: 1.56, h: 0.36, fontSize: 11, bold: true, color: p.color, align: "center" });
p.points.forEach((pt, j) => {
s.addText([
{ text: "• ", options: { color: p.color } },
{ text: pt, options: { color: C.lightGray } },
], { x: x + 0.1, y: 2.12 + j * 0.75, w: 1.55, h: 0.7, fontSize: 9 });
});
});
// Bottom quote
s.addShape(pres.ShapeType.roundRect, { x: 0.3, y: 5.18, w: 9.4, h: 0.35, fill: { color: "0A1623" }, line: { color: C.green, width: 0.7 }, rectRadius: 0.05 });
s.addText('"The greatest weapon against stress is our ability to choose one thought over another." — William James', {
x: 0.4, y: 5.2, w: 9.2, h: 0.3, fontSize: 9.5, color: C.accentAmb, italic: true, align: "center",
});
slideNumber(s, 12);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 13 – KEY TAKEAWAYS
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.accentTeal, 0, 0, 10, 0.06);
sectionTag(s, "SUMMARY", C.accentAmb);
s.addText("Key Takeaways", { x: 0.4, y: 0.5, w: 9, h: 0.65, fontSize: 30, bold: true, color: C.accentTeal });
addAccentBar(s, C.accentAmb, 0.4, 1.18, 9.2, 0.04);
const takeaways = [
{ n: "01", text: "Stress is a universal physiological and psychological phenomenon triggering the HPA axis, releasing cortisol and catecholamines.", color: C.accentTeal },
{ n: "02", text: "Chronic stress is a primary driver of mental illness — including PTSD, GAD, Major Depression, Panic Disorder, and Burnout.", color: C.red },
{ n: "03", text: "Stress-related disorders are classified in ICD-11 (6B40-6B45) with defined diagnostic criteria distinguishing normal from pathological responses.", color: C.purple },
{ n: "04", text: "Psychotherapy (CBT, EMDR, MBSR) is the evidence-based cornerstone of treatment; pharmacotherapy targets specific disorders.", color: C.accentAmb },
{ n: "05", text: "Lifestyle pillars — sleep, exercise, nutrition, social connection — are the most powerful preventive tools against stress-related harm.", color: C.green },
{ n: "06", text: "Early recognition + intervention prevents escalation from acute stress to chronic mental health disorders.", color: C.softBlue },
];
takeaways.forEach((t, i) => {
const col = i < 3 ? 0 : 1;
const row = i < 3 ? i : i - 3;
const x = col === 0 ? 0.3 : 5.15;
const y = 1.3 + row * 1.38;
s.addShape(pres.ShapeType.roundRect, { x, y, w: 4.6, h: 1.28, fill: { color: "0A1623" }, line: { color: t.color, width: 1 }, rectRadius: 0.1 });
s.addShape(pres.ShapeType.ellipse, { x: x + 0.08, y: y + 0.12, w: 0.42, h: 0.42, fill: { color: t.color } });
s.addText(t.n, { x: x + 0.08, y: y + 0.12, w: 0.42, h: 0.42, fontSize: 10, bold: true, color: C.darkBg, align: "center", valign: "middle", margin: 0 });
s.addText(t.text, { x: x + 0.6, y: y + 0.1, w: 3.9, h: 1.08, fontSize: 9.5, color: C.lightGray, valign: "middle" });
});
slideNumber(s, 13);
}
// ══════════════════════════════════════════════════════════════════
// SLIDE 14 – CLOSING / THANK YOU
// ══════════════════════════════════════════════════════════════════
{
const s = addDarkSlide(pres);
addAccentBar(s, C.accentTeal, 0, 0, 10, 0.06);
addAccentBar(s, C.accentTeal, 0, 5.565, 10, 0.06);
// Large bg word
s.addText("MANAGE", { x: -0.5, y: 1.2, w: 11, h: 3, fontSize: 130, bold: true, color: C.accentTeal, transparency: 92, align: "center" });
// Central message
s.addShape(pres.ShapeType.roundRect, { x: 1.5, y: 1.3, w: 7, h: 2.9, fill: { color: "0D1B2A" }, line: { color: C.accentTeal, width: 1.5 }, rectRadius: 0.18 });
s.addText("You Can't Always Control Stress.", { x: 1.7, y: 1.55, w: 6.6, h: 0.6, fontSize: 20, bold: true, color: C.accentTeal, align: "center" });
s.addText("But You Can Control How You Respond.", { x: 1.7, y: 2.15, w: 6.6, h: 0.6, fontSize: 20, bold: true, color: C.accentAmb, align: "center" });
s.addShape(pres.ShapeType.rect, { x: 3.5, y: 2.85, w: 3, h: 0.04, fill: { color: C.accentTeal } });
s.addText("Seek help early. Build resilience. Prioritize mental health.", { x: 1.7, y: 2.95, w: 6.6, h: 0.5, fontSize: 12, color: C.lightGray, align: "center", italic: true });
s.addText("References: Adams & Victor's Principles of Neurology | Neuroscience: Exploring the Brain | Kaplan & Sadock's Comprehensive Textbook of Psychiatry", {
x: 0.4, y: 4.9, w: 9.2, h: 0.55, fontSize: 7.5, color: C.softBlue, align: "center",
});
}
// ─── WRITE FILE ───────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/stress-pptx/Stress_Management_Mental_Health.pptx" })
.then(() => console.log("✅ Saved: Stress_Management_Mental_Health.pptx"))
.catch(e => { console.error("❌ Error:", e); process.exit(1); });
cd /home/daytona/workspace/stress-pptx && node create_stress_ppt.js 2>&1
ls -lh /home/daytona/workspace/stress-pptx/Stress_Management_Mental_Health.pptx
Stress Management Mental Health
Presentation · PPTX
| Slide | Content |
|---|---|
| 1 | Title Slide - Bold teal on deep navy with dramatic typography |
| 2 | Table of Contents - Visual agenda with numbered sections |
| 3 | What is Stress? - Definition (Hans Selye), physiological response, universal impact |
| 4 | Biology of Stress - HPA axis flow diagram, acute effects, cortisol effects, chronic overload |
| 5 | Types of Stress - Acute, Chronic, Eustress, Distress with examples |
| 6 | Impact on Mental Health - Brain/neurological effects + psychological & behavioural impacts |
| 7 | Stress-Related Disorders (ICD-11) - PTSD (6B40), Complex PTSD, Adjustment Disorder, Acute Stress Reaction |
| 8 | More Disorders - GAD, Major Depression, Burnout (WHO ICD-11 QD85), Panic Disorder & OCD |
| 9 | Stress Management Overview - Mind-body, physical, psychological, and social strategies |
| 10 | Pharmacological Management - Drug table: SSRIs/SNRIs, benzodiazepines, beta-blockers, prazosin, etc. |
| 11 | Psychotherapy - CBT, EMDR, Mindfulness-Based Stress Reduction with step-by-step |
| 12 | Lifestyle & Prevention - Sleep, nutrition, exercise, social support, nature |
| 13 | Key Takeaways - 6-point summary with numbered callout boxes |
| 14 | Closing Slide - Motivational message + references |