Synapse class predestination i want 15 slides matter
mkdir -p /home/daytona/workspace/synapse-pptx && ls /home/daytona/workspace/syna…
~/synapse-pptx/build.js
const pptxgen = require("pptxgenjs");
const pres = new pptxgen();
pres.layout = "LAYOUT_16x9";
pres.title = "Synapse: Classification & Synaptic Transmission";
pres.author = "Medical Education";
// ── THEME COLOURS ──────────────────────────────────────────────────────────
const C = {
dark: "0D1B2A", // deep navy – dominant background
mid: "1B2E45", // secondary navy for accents
accent: "00BFA5", // teal – sharp accent
accent2: "4FC3F7", // sky blue – secondary accent
white: "FFFFFF",
offWhite:"E8F4F8",
yellow: "FFD54F",
light: "B0BEC5",
};
// Helper: title bar
function titleBar(slide, text, sub) {
slide.addShape(pres.ShapeType.rect, {
x: 0, y: 0, w: 10, h: 1.1,
fill: { color: C.accent },
line: { color: C.accent, width: 0 }
});
slide.addText(text, {
x: 0.3, y: 0.08, w: 9.4, h: 0.65,
fontSize: 24, bold: true, color: C.dark, fontFace: "Calibri", margin: 0
});
if (sub) {
slide.addText(sub, {
x: 0.3, y: 0.72, w: 9.4, h: 0.35,
fontSize: 11, color: C.dark, fontFace: "Calibri", italic: true, margin: 0
});
}
}
// Helper: bullet block
function bullets(slide, items, x, y, w, h, fontSize) {
const fs = fontSize || 14;
slide.addText(
items.map((t, i) => ({
text: t,
options: { bullet: { type: "bullet" }, breakLine: i < items.length - 1, fontSize: fs, color: C.offWhite, fontFace: "Calibri" }
})),
{ x, y, w, h, valign: "top" }
);
}
// Helper: section label box
function sectionBox(slide, text, x, y, w, h, bgColor, textColor) {
slide.addShape(pres.ShapeType.rect, {
x, y, w, h,
fill: { color: bgColor || C.mid },
line: { color: C.accent, width: 1.5 },
rectRadius: 0.08
});
slide.addText(text, {
x, y, w, h,
fontSize: 13, bold: true, color: textColor || C.accent, fontFace: "Calibri",
align: "center", valign: "middle", margin: 0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 1 — TITLE SLIDE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
// decorative teal strip left
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:0.18, h:5.625, fill:{color: C.accent} });
// large title
s.addText("THE SYNAPSE", {
x:0.5, y:1.2, w:9, h:1.1,
fontSize: 44, bold: true, color: C.accent, fontFace: "Calibri",
align: "center", charSpacing: 4
});
s.addText("Classification & Synaptic Transmission", {
x:0.5, y:2.3, w:9, h:0.7,
fontSize: 22, color: C.accent2, fontFace: "Calibri", align: "center"
});
s.addText("For Medical & Nursing Students", {
x:0.5, y:3.1, w:9, h:0.45,
fontSize: 14, color: C.light, fontFace: "Calibri", align: "center", italic: true
});
// Bottom source strip
s.addShape(pres.ShapeType.rect, { x:0, y:5.1, w:10, h:0.525, fill:{color: C.mid} });
s.addText("Sources: Guyton & Hall Medical Physiology | Kandel Principles of Neural Science | Neuroscience: Exploring the Brain", {
x:0.3, y:5.13, w:9.4, h:0.3, fontSize:9, color: C.light, fontFace:"Calibri", align:"center", margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 2 — LEARNING OBJECTIVES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Learning Objectives");
const objs = [
"Define a synapse and describe its structural components",
"Classify synapses: chemical vs. electrical; excitatory vs. inhibitory",
"Explain the steps of chemical synaptic transmission",
"Describe the roles of Ca²⁺, SNARE proteins, and neurotransmitters",
"Distinguish ionotropic from metabotropic receptors",
"Understand EPSP and IPSP generation and summation",
"Describe temporal and spatial summation",
"Explain synaptic plasticity: facilitation and depression",
"List clinically important neurotransmitters and their receptors",
];
objs.forEach((txt, i) => {
s.addShape(pres.ShapeType.rect, {
x: 0.35, y: 1.25 + i * 0.47, w: 9.3, h: 0.41,
fill: { color: i % 2 === 0 ? "112233" : C.mid },
line: { color: C.accent, width: 0.8 }
});
s.addText(`${i + 1}. ${txt}`, {
x: 0.55, y: 1.27 + i * 0.47, w: 9.1, h: 0.37,
fontSize: 12.5, color: C.offWhite, fontFace: "Calibri", valign: "middle", margin: 0
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 3 — WHAT IS A SYNAPSE?
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "What Is a Synapse?", "Definition & Overview");
s.addText("A synapse is a specialised junction between two neurons (or a neuron and effector cell) through which information is transferred from one cell to another. The word is derived from the Greek 'synapto' – to clasp together.", {
x:0.4, y:1.2, w:9.2, h:0.85,
fontSize: 13, color: C.offWhite, fontFace: "Calibri", align: "left"
});
const parts = [
["Presynaptic Terminal", "The axon terminal of the transmitting neuron; contains synaptic vesicles loaded with neurotransmitter"],
["Synaptic Cleft", "A narrow extracellular gap (~20–40 nm) separating pre- from postsynaptic membranes"],
["Postsynaptic Membrane", "Membrane of the receiving cell bearing specific receptor proteins for neurotransmitter binding"],
];
parts.forEach(([title, desc], i) => {
const yy = 2.1 + i * 1.05;
s.addShape(pres.ShapeType.rect, { x:0.35, y: yy, w:2.8, h:0.85, fill:{color: C.accent}, line:{color: C.accent, width:0} });
s.addText(title, { x:0.35, y: yy, w:2.8, h:0.85, fontSize:12, bold:true, color: C.dark, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addShape(pres.ShapeType.rect, { x:3.2, y: yy, w:6.5, h:0.85, fill:{color: C.mid}, line:{color:"334455", width:0.8} });
s.addText(desc, { x:3.3, y: yy, w:6.3, h:0.85, fontSize:12.5, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
s.addText("A single motor neuron may receive 10,000–200,000 synaptic inputs on its dendrites and soma.", {
x:0.4, y:5.15, w:9.2, h:0.35, fontSize:10.5, color: C.yellow, fontFace:"Calibri", italic:true, margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 4 — CLASSIFICATION OF SYNAPSES
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Classification of Synapses");
// Two columns
// Left: By Mechanism
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.2, w:4.5, h:0.45, fill:{color: C.accent2}, line:{color: C.accent2} });
s.addText("BY MECHANISM", { x:0.3, y:1.2, w:4.5, h:0.45, fontSize:13, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const mechItems = [
"Chemical Synapse:",
" • Most common in CNS",
" • Neurotransmitter-mediated",
" • Unidirectional",
" • 20–40 nm synaptic cleft",
" • Delay ~0.5 ms",
"",
"Electrical Synapse:",
" • Connected via gap junctions",
" • Bidirectional conduction",
" • Near-instantaneous",
" • Synchronises neuronal groups",
" • Present in hypothalamus, retina",
];
s.addText(
mechItems.map((t, i) => ({
text: t,
options: {
breakLine: i < mechItems.length - 1,
fontSize: 12,
color: t.startsWith("Chemical") || t.startsWith("Electrical") ? C.accent : C.offWhite,
bold: t.startsWith("Chemical") || t.startsWith("Electrical"),
fontFace: "Calibri"
}
})),
{ x:0.3, y:1.72, w:4.5, h:3.7, valign:"top" }
);
// Right: By Effect
s.addShape(pres.ShapeType.rect, { x:5.2, y:1.2, w:4.5, h:0.45, fill:{color: C.accent}, line:{color: C.accent} });
s.addText("BY EFFECT", { x:5.2, y:1.2, w:4.5, h:0.45, fontSize:13, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const effectItems = [
"Excitatory Synapse:",
" • Produces EPSP",
" • Increases cation permeability",
" • Depolarises postsynaptic cell",
" • Example: glutamate (AMPA/NMDA)",
"",
"Inhibitory Synapse:",
" • Produces IPSP",
" • Opens Cl⁻ or K⁺ channels",
" • Hyperpolarises membrane",
" • Example: GABA, glycine",
"",
"By Location:",
" • Axodendritic | Axosomatic",
" • Axoaxonic | Dendrodendritic",
];
s.addText(
effectItems.map((t, i) => ({
text: t,
options: {
breakLine: i < effectItems.length - 1,
fontSize: 12,
color: t.endsWith(":") && t !== "By Location:" ? (t.startsWith("Exc") ? "#4FC3F7" : C.yellow) : C.offWhite,
bold: t.endsWith(":"),
fontFace: "Calibri"
}
})),
{ x:5.2, y:1.72, w:4.5, h:3.7, valign:"top" }
);
// divider
s.addShape(pres.ShapeType.line, { x:4.85, y:1.2, w:0, h:4.2, line:{color: C.accent, width:1.5} });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 5 — STRUCTURAL ANATOMY OF CHEMICAL SYNAPSE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Structural Anatomy of the Chemical Synapse", "Guyton & Hall, p.569");
const components = [
["Presynaptic Terminal (Synaptic Knob)", "Bulbous axon terminal; contains mitochondria (energy supply) and synaptic vesicles (neurotransmitter stores). 5–20% located on soma; 80–95% on dendrites."],
["Synaptic Vesicles", "Membrane-bound organelles storing neurotransmitter molecules. Small-molecule vesicles dock at active zones; neuropeptide vesicles are peripheral."],
["Active Zone", "Specialised region of presynaptic membrane where vesicle docking and exocytosis occur. Contains voltage-gated Ca²⁺ channels."],
["Synaptic Cleft", "20–40 nm gap; filled with proteoglycan reticulum containing cholinesterase (for ACh degradation)."],
["Postsynaptic Membrane", "Dense region bearing receptor proteins. Two functional domains: extracellular binding domain + intracellular effector domain."],
["Postsynaptic Density (PSD)", "Protein scaffold anchoring receptors and signal proteins. Contains scaffolding proteins like PSD-95."],
];
components.forEach(([title, desc], i) => {
const col = i < 3 ? 0 : 1;
const row = i % 3;
const x = col === 0 ? 0.3 : 5.15;
const y = 1.25 + row * 1.42;
s.addShape(pres.ShapeType.rect, { x, y, w:4.6, h:1.3, fill:{color: C.mid}, line:{color: C.accent, width:1} });
s.addText(title, { x: x+0.12, y: y+0.06, w:4.36, h:0.35, fontSize:11.5, bold:true, color: C.accent, fontFace:"Calibri", margin:0 });
s.addText(desc, { x: x+0.12, y: y+0.4, w:4.36, h:0.85, fontSize:11, color: C.offWhite, fontFace:"Calibri", valign:"top", margin:0 });
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 6 — STEPS OF CHEMICAL SYNAPTIC TRANSMISSION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Steps of Chemical Synaptic Transmission", "Katzung's Basic & Clinical Pharmacology, 16e");
const steps = [
["1", "Action Potential Arrives", "AP propagates down axon → depolarises presynaptic terminal membrane"],
["2", "Ca²⁺ Channel Opening", "Depolarisation opens voltage-gated Ca²⁺ channels in active zone; Ca²⁺ flows in"],
["3", "Vesicle Docking & Fusion", "Ca²⁺ binds synaptotagmin → triggers SNARE complex → vesicle fuses with membrane"],
["4", "Exocytosis", "Neurotransmitter released into synaptic cleft by exocytosis"],
["5", "Diffusion & Binding", "NT diffuses across cleft → binds postsynaptic receptors"],
["6", "Postsynaptic Response", "Ion channels open/close → EPSP or IPSP generated"],
["7", "Termination", "NT removed by reuptake, enzymatic degradation, or diffusion"],
];
steps.forEach(([num, title, desc], i) => {
const y = 1.2 + i * 0.62;
// number circle
s.addShape(pres.ShapeType.ellipse, { x:0.25, y: y+0.04, w:0.5, h:0.5, fill:{color: C.accent}, line:{color: C.accent} });
s.addText(num, { x:0.25, y: y+0.04, w:0.5, h:0.5, fontSize:14, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
// title
s.addText(title, { x:0.85, y: y+0.04, w:3.0, h:0.5, fontSize:12.5, bold:true, color: C.accent2, fontFace:"Calibri", valign:"middle", margin:0 });
// description
s.addText(desc, { x:3.95, y: y+0.04, w:5.8, h:0.5, fontSize:12, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
// Delay note
s.addShape(pres.ShapeType.rect, { x:0.3, y:5.2, w:9.4, h:0.3, fill:{color:"1A3A4A"}, line:{color: C.accent, width:1} });
s.addText("⏱ Total synaptic delay ≈ 0.5 ms — most consumed by Ca²⁺ channel opening and vesicle fusion (Katzung, 2021)", {
x:0.4, y:5.22, w:9.2, h:0.26, fontSize:10, color: C.yellow, fontFace:"Calibri", margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 7 — SNARE PROTEINS & VESICLE FUSION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "SNARE Proteins & Vesicle Fusion Mechanism", "Guyton & Hall, p.570");
s.addText("SNARE = Soluble N-ethylmaleimide-sensitive factor Attachment protein REceptor", {
x:0.4, y:1.15, w:9.2, h:0.4, fontSize:13, bold:true, color: C.accent, fontFace:"Calibri", margin:0
});
const snares = [
["v-SNARE", "Synaptobrevin", "Located on vesicle membrane; initiates docking"],
["t-SNARE", "Syntaxin", "Located on target (terminal) membrane"],
["t-SNARE", "SNAP-25", "Terminal membrane protein; forms helical bundle with syntaxin"],
["Ca²⁺ Sensor", "Synaptotagmin", "Vesicle-bound; Ca²⁺ binding triggers trans-SNARE complex formation"],
];
snares.forEach(([type, name, role], i) => {
const y = 1.65 + i * 0.82;
s.addShape(pres.ShapeType.rect, { x:0.3, y, w:1.5, h:0.65, fill:{color: C.accent}, line:{color: C.accent} });
s.addText(type, { x:0.3, y, w:1.5, h:0.65, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
s.addShape(pres.ShapeType.rect, { x:1.85, y, w:2.1, h:0.65, fill:{color: C.mid}, line:{color: C.accent2, width:1} });
s.addText(name, { x:1.85, y, w:2.1, h:0.65, fontSize:12, bold:true, color: C.accent2, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
s.addShape(pres.ShapeType.rect, { x:4.0, y, w:5.7, h:0.65, fill:{color:"112233"}, line:{color:"334455", width:0.8} });
s.addText(role, { x:4.1, y, w:5.5, h:0.65, fontSize:12, color: C.offWhite, valign:"middle", fontFace:"Calibri", margin:0 });
});
// Process summary
s.addShape(pres.ShapeType.rect, { x:0.3, y:5.0, w:9.4, h:0.5, fill:{color: C.mid}, line:{color: C.accent, width:1.5} });
s.addText("Sequence: Vesicle docks at active zone → Ca²⁺ enters → Synaptotagmin activated → Trans-SNARE complex formed → Membrane fusion → Exocytosis → NT released", {
x:0.45, y:5.03, w:9.1, h:0.44, fontSize:11, color: C.yellow, fontFace:"Calibri", valign:"middle", margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 8 — NEUROTRANSMITTERS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Neurotransmitters", "Guyton & Hall, pp.572–574");
// Category A
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.2, w:9.4, h:0.4, fill:{color: C.mid}, line:{color: C.accent2, width:1} });
s.addText("CLASS A: Small-Molecule (Fast-Acting) Transmitters", { x:0.4, y:1.22, w:9.2, h:0.36, fontSize:12.5, bold:true, color: C.accent2, fontFace:"Calibri", valign:"middle", margin:0 });
const smallMolecule = [
["Acetylcholine (ACh)", "NMJ, ANS, basal forebrain", "Nicotinic / Muscarinic"],
["Glutamate", "Major CNS excitatory", "AMPA, NMDA, Kainate"],
["GABA", "Major CNS inhibitory", "GABA-A (Cl⁻), GABA-B (K⁺)"],
["Glycine", "Spinal cord inhibitory", "Glycine-R (Cl⁻)"],
["Dopamine", "Basal ganglia, limbic, reward", "D1–D5 (GPCRs)"],
["Norepinephrine", "Sympathetic, CNS arousal", "α1,α2, β1,β2 (GPCRs)"],
["Serotonin (5-HT)", "Raphe nuclei, mood, sleep", "5-HT1–7 (mostly GPCRs)"],
];
const headers = ["Neurotransmitter", "Location / Function", "Receptor Types"];
headers.forEach((h, ci) => {
const widths = [2.8, 3.3, 3.0];
const xs = [0.3, 3.15, 6.5];
s.addText(h, { x: xs[ci], y:1.65, w:widths[ci], h:0.3, fontSize:10.5, bold:true, color: C.accent, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
});
smallMolecule.forEach(([nt, loc, rec], i) => {
const y = 2.0 + i * 0.42;
const bg = i % 2 === 0 ? C.mid : "112233";
[[nt, 0.3, 2.8], [loc, 3.15, 3.3], [rec, 6.5, 3.0]].forEach(([text, x, w]) => {
s.addShape(pres.ShapeType.rect, { x, y, w, h:0.38, fill:{color: bg}, line:{color:"223344", width:0.5} });
s.addText(text, { x: x+0.08, y, w: w-0.1, h:0.38, fontSize:11, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
});
s.addText("CLASS B: Neuropeptides (Slow-Acting) — e.g. Substance P, β-Endorphin, VIP, Somatostatin, Oxytocin", {
x:0.3, y:5.2, w:9.4, h:0.3, fontSize:10, color: C.yellow, fontFace:"Calibri", italic:true, margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 9 — POSTSYNAPTIC RECEPTORS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Postsynaptic Receptors: Ionotropic vs. Metabotropic", "Kandel Principles of Neural Science, 6e");
// Left panel – Ionotropic
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.2, w:4.5, h:0.5, fill:{color: C.accent2}, line:{color: C.accent2} });
s.addText("IONOTROPIC (Ligand-Gated Ion Channels)", { x:0.3, y:1.2, w:4.5, h:0.5, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const ionoItems = [
"NT binds directly → ion channel opens",
"Fast response: onset < 1 ms",
"Direct ion flux (Na⁺, K⁺, Ca²⁺, Cl⁻)",
"Examples:",
" • AMPA receptor (Na⁺/K⁺) → EPSP",
" • NMDA receptor (Na⁺/K⁺/Ca²⁺)",
" • GABA-A receptor (Cl⁻) → IPSP",
" • Glycine receptor (Cl⁻) → IPSP",
" • Nicotinic ACh receptor (Na⁺/K⁺)",
"Clinical: Benzodiazepines ↑ GABA-A Cl⁻",
];
bullets(s, ionoItems, 0.35, 1.77, 4.4, 3.65, 12);
// Right panel – Metabotropic
s.addShape(pres.ShapeType.rect, { x:5.2, y:1.2, w:4.5, h:0.5, fill:{color: C.accent}, line:{color: C.accent} });
s.addText("METABOTROPIC (G-Protein Coupled)", { x:5.2, y:1.2, w:4.5, h:0.5, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const metaItems = [
"NT binds → G-protein activated",
"Slower: onset 30 ms – seconds",
"Second messenger cascade",
"Examples:",
" • Muscarinic ACh-R → ↓cAMP",
" • D1/D2 dopamine-R → ±cAMP",
" • β-AR → ↑cAMP → PKA",
" • GABA-B → ↑K⁺ conductance",
" • mGluR → IP3/DAG pathway",
"Clinical: Antipsychotics block D2",
];
bullets(s, metaItems, 5.25, 1.77, 4.4, 3.65, 12);
s.addShape(pres.ShapeType.line, { x:4.85, y:1.2, w:0, h:4.2, line:{color: C.accent, width:1.5} });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 10 — EPSP AND IPSP
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Postsynaptic Potentials: EPSP & IPSP", "Katzung Basic & Clinical Pharmacology, 16e | Guyton, p.570");
const data = [
{ label: "EPSP", color: "00BFA5", items: [
"Excitatory PostSynaptic Potential",
"Produced by excitatory neurotransmitters (e.g. glutamate, ACh)",
"Mechanism: ↑ cation permeability → Na⁺ influx",
"Membrane depolarises (moves toward +)",
"Threshold usually: −55 mV",
"Does NOT always generate an AP → must summate",
"Example pathway: la afferent → α-motor neuron",
]},
{ label: "IPSP", color: "FFD54F", items: [
"Inhibitory PostSynaptic Potential",
"Produced by inhibitory NTs (GABA, glycine)",
"Mechanism: ↑ Cl⁻ influx OR ↑ K⁺ efflux",
"Membrane hyperpolarises (moves away from threshold)",
"Prevents AP generation even with EPSP input",
"Example: Renshaw cell → inhibits motor neuron",
"GABA-A: Cl⁻ channel; GABA-B: K⁺ channel (GPCR)",
]},
];
data.forEach(({ label, color, items }, col) => {
const x = col === 0 ? 0.3 : 5.2;
s.addShape(pres.ShapeType.rect, { x, y:1.2, w:4.5, h:0.5, fill:{color}, line:{color} });
s.addText(label, { x, y:1.2, w:4.5, h:0.5, fontSize:18, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
items.forEach((item, i) => {
const bg = i % 2 === 0 ? C.mid : "112233";
s.addShape(pres.ShapeType.rect, { x, y: 1.75 + i * 0.53, w:4.5, h:0.49, fill:{color:bg}, line:{color:"223344", width:0.5} });
s.addText(item, { x: x+0.12, y: 1.77 + i * 0.53, w:4.26, h:0.45, fontSize:11.5, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
});
s.addShape(pres.ShapeType.line, { x:4.85, y:1.2, w:0, h:4.2, line:{color: C.accent, width:1.5} });
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 11 — SUMMATION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Summation: Spatial & Temporal", "Katzung, p.582 | Guyton, p.571");
s.addText("Because a single EPSP is usually insufficient to trigger an action potential, neurons integrate multiple inputs through summation:", {
x:0.4, y:1.15, w:9.2, h:0.55, fontSize:13, color: C.offWhite, fontFace:"Calibri"
});
// Spatial summation box
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.78, w:4.4, h:3.5, fill:{color: C.mid}, line:{color: C.accent2, width:2} });
s.addShape(pres.ShapeType.rect, { x:0.3, y:1.78, w:4.4, h:0.5, fill:{color: C.accent2}, line:{color: C.accent2} });
s.addText("SPATIAL SUMMATION", { x:0.3, y:1.78, w:4.4, h:0.5, fontSize:13, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const spatItems = [
"Multiple presynaptic neurons fire simultaneously",
"Each produces a subthreshold EPSP",
"EPSPs from different locations ADD together",
"Combined depolarisation reaches threshold",
"E1 + E2 simultaneously → AP generated",
"More synapses activated = larger summed potential",
"Key concept: convergence of multiple inputs",
];
bullets(s, spatItems, 0.45, 2.36, 4.1, 2.85, 12);
// Temporal summation box
s.addShape(pres.ShapeType.rect, { x:5.3, y:1.78, w:4.4, h:3.5, fill:{color: C.mid}, line:{color: C.accent, width:2} });
s.addShape(pres.ShapeType.rect, { x:5.3, y:1.78, w:4.4, h:0.5, fill:{color: C.accent}, line:{color: C.accent} });
s.addText("TEMPORAL SUMMATION", { x:5.3, y:1.78, w:4.4, h:0.5, fontSize:13, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
const tempItems = [
"Single presynaptic neuron fires in rapid succession",
"Each stimulus produces a small EPSP",
"EPSPs overlap in time before decay",
"Combined depolarisation reaches threshold",
"Train of stimuli from E1 → AP generated",
"Requires high-frequency input",
"Key concept: temporal integration of signals",
];
bullets(s, tempItems, 5.45, 2.36, 4.1, 2.85, 12);
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 12 — NEUROMUSCULAR JUNCTION
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Neuromuscular Junction (NMJ) — Model Chemical Synapse", "Costanzo Physiology 7e");
s.addText("The NMJ is the synapse between a lower motor neuron and skeletal muscle. It is the best-characterised chemical synapse in the body.", {
x:0.4, y:1.15, w:9.2, h:0.55, fontSize:13, color: C.offWhite, fontFace:"Calibri"
});
const nmjSteps = [
["AP reaches motor neuron terminal", "Depolarises presynaptic membrane at end-plate region"],
["Ca²⁺ entry via VGCCs", "Ca²⁺ influx triggers ACh vesicle exocytosis"],
["ACh release into synaptic cleft", "~2,000–10,000 ACh molecules per vesicle released"],
["ACh binds Nicotinic ACh-R (nAChR)", "Ionotropic receptor; opens Na⁺/K⁺ channels"],
["End-Plate Potential (EPP) generated", "Always suprathreshold → AP in muscle fibre"],
["ACh degradation by AChE", "Acetylcholinesterase splits ACh → acetate + choline"],
["Choline reuptake", "Choline transported back into terminal for re-synthesis"],
];
nmjSteps.forEach(([title, detail], i) => {
const y = 1.78 + i * 0.52;
s.addShape(pres.ShapeType.ellipse, { x:0.3, y: y+0.06, w:0.4, h:0.4, fill:{color: C.accent}, line:{color: C.accent} });
s.addText(String(i+1), { x:0.3, y: y+0.06, w:0.4, h:0.4, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
s.addText(title, { x:0.8, y: y+0.05, w:3.6, h:0.42, fontSize:12, bold:true, color: C.accent2, fontFace:"Calibri", valign:"middle", margin:0 });
s.addText(detail, { x:4.5, y: y+0.05, w:5.3, h:0.42, fontSize:12, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
s.addShape(pres.ShapeType.rect, { x:0.3, y:5.3, w:9.4, h:0.25, fill:{color:"1A3A4A"}, line:{color: C.accent, width:1} });
s.addText("Clinical: Myasthenia Gravis — antibodies against nAChR → ↓ EPP → muscle weakness | Tx: AChE inhibitors (neostigmine)", {
x:0.4, y:5.31, w:9.2, h:0.22, fontSize:10, color: C.yellow, fontFace:"Calibri", margin:0
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 13 — SYNAPTIC PLASTICITY
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Synaptic Plasticity", "Neuroscience: Exploring the Brain, 5e, p.441–443");
s.addText("Synaptic plasticity = activity-dependent change in the strength of synaptic transmission. The synapse is not static — it adapts.", {
x:0.4, y:1.15, w:9.2, h:0.55, fontSize:13, color: C.offWhite, fontFace:"Calibri"
});
const plasticTypes = [
{ title: "Short-Term Facilitation", color: "00BFA5", desc: [
"Occurs at LOW-P synapses",
"Rapid successive APs → Ca²⁺ build-up in terminal",
"Each AP more likely to trigger vesicle fusion",
"Transmission becomes stronger with repetition",
"Resets to baseline after stimulation stops",
]},
{ title: "Short-Term Depression", color: "FFD54F", desc: [
"Occurs at HIGH-P synapses",
"Rapid firing depletes readily-releasable vesicle pool",
"Fewer vesicles available → smaller EPSPs",
"Persists until vesicle pool is replenished",
"Filters out sustained high-frequency inputs",
]},
{ title: "Long-Term Potentiation (LTP)", color: "4FC3F7", desc: [
"Long-lasting ↑ synaptic strength (days–decades)",
"Requires NMDA receptor activation (Ca²⁺ gateway)",
"AMPA receptors inserted into postsynaptic membrane",
"Basis of learning and memory formation",
"Blocked by NMDA antagonists (e.g. ketamine, Mg²⁺)",
]},
];
plasticTypes.forEach(({ title, color, desc }, i) => {
const y = 1.78 + i * 1.22;
s.addShape(pres.ShapeType.rect, { x:0.3, y, w:2.2, h:1.1, fill:{color}, line:{color} });
s.addText(title, { x:0.3, y, w:2.2, h:1.1, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
s.addText(
desc.map((d, di) => ({ text: d, options: { bullet: { type: "bullet" }, breakLine: di < desc.length - 1, fontSize: 11.5, color: C.offWhite, fontFace: "Calibri" } })),
{ x:2.65, y: y+0.1, w:7.1, h:0.9, valign:"top" }
);
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 14 — CLINICAL RELEVANCE
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
titleBar(s, "Clinical Relevance of Synaptic Physiology");
const clinicalData = [
{ condition: "Myasthenia Gravis", mechanism: "Anti-nAChR antibodies → ↓ postsynaptic receptors at NMJ", tx: "AChE inhibitors (neostigmine, pyridostigmine)" },
{ condition: "Parkinson's Disease", mechanism: "↓ Dopamine in substantia nigra → basal ganglia imbalance", tx: "L-DOPA, dopamine agonists" },
{ condition: "Depression", mechanism: "↓ 5-HT / NE synaptic availability", tx: "SSRIs, SNRIs, TCAs, MAOIs" },
{ condition: "Schizophrenia", mechanism: "↑ Dopamine (D2) activity in mesolimbic pathway", tx: "D2 receptor antagonists (antipsychotics)" },
{ condition: "Epilepsy", mechanism: "↑ Excitatory (glutamate) or ↓ Inhibitory (GABA) activity", tx: "Valproate (↑ GABA), Na⁺ channel blockers" },
{ condition: "Alzheimer's Disease", mechanism: "↓ Cholinergic synapses in basal forebrain; NMDA overactivation", tx: "AChE inhibitors; Memantine (NMDA antagonist)" },
{ condition: "Botulinum Toxin", mechanism: "Cleaves SNARE proteins (SNAP-25) → blocks ACh release at NMJ", tx: "Supportive; antitoxin in early stages" },
];
const headers = ["Condition", "Synaptic Mechanism", "Treatment"];
const xs = [0.3, 2.8, 7.0];
const ws = [2.4, 4.1, 2.8];
headers.forEach((h, ci) => {
s.addShape(pres.ShapeType.rect, { x: xs[ci], y:1.2, w:ws[ci], h:0.38, fill:{color: C.accent}, line:{color: C.accent} });
s.addText(h, { x: xs[ci], y:1.2, w:ws[ci], h:0.38, fontSize:12, bold:true, color: C.dark, align:"center", valign:"middle", fontFace:"Calibri", margin:0 });
});
clinicalData.forEach(({ condition, mechanism, tx }, i) => {
const y = 1.62 + i * 0.55;
const bg = i % 2 === 0 ? C.mid : "112233";
[[condition, 0], [mechanism, 1], [tx, 2]].forEach(([text, ci]) => {
s.addShape(pres.ShapeType.rect, { x: xs[ci], y, w:ws[ci], h:0.51, fill:{color: bg}, line:{color:"223344", width:0.5} });
s.addText(text, { x: xs[ci]+0.08, y, w: ws[ci]-0.1, h:0.51, fontSize:10.5, color: ci === 0 ? C.accent2 : C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
});
}
// ══════════════════════════════════════════════════════════════════════════════
// SLIDE 15 — SUMMARY & KEY POINTS
// ══════════════════════════════════════════════════════════════════════════════
{
const s = pres.addSlide();
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:5.625, fill:{color: C.dark} });
// Header
s.addShape(pres.ShapeType.rect, { x:0, y:0, w:10, h:1.1, fill:{color: C.accent} });
s.addText("Summary & Key Points", { x:0.3, y:0.18, w:9.4, h:0.65, fontSize:26, bold:true, color: C.dark, fontFace:"Calibri", align:"center", margin:0 });
const keyPoints = [
["Synapse Definition", "Specialised junction for interneuronal communication; 3 parts: presynaptic terminal, synaptic cleft, postsynaptic membrane"],
["Types", "Chemical (most common, unidirectional, NT-mediated) vs. Electrical (gap junctions, bidirectional, fast)"],
["Transmission Steps", "AP → Ca²⁺ entry → SNARE activation (synaptobrevin + syntaxin + SNAP-25) → exocytosis → NT binds receptor → EPSP or IPSP"],
["Receptors", "Ionotropic (fast, direct ion channel gating) vs. Metabotropic (slow, G-protein, second messenger cascade)"],
["Summation", "Spatial (multiple simultaneous inputs) + Temporal (rapid successive inputs) → threshold for AP"],
["Plasticity", "Short-term facilitation/depression (Ca²⁺ dependent); Long-term potentiation (NMDA/Ca²⁺/AMPA insertion)"],
["Clinical", "Targets for: anaesthetics, antidepressants, antipsychotics, anticonvulsants, muscle relaxants, Alzheimer's drugs"],
];
keyPoints.forEach(([kp, val], i) => {
const y = 1.2 + i * 0.62;
s.addShape(pres.ShapeType.rect, { x:0.3, y, w:2.4, h:0.55, fill:{color: C.mid}, line:{color: C.accent, width:1.2} });
s.addText(kp, { x:0.3, y, w:2.4, h:0.55, fontSize:12, bold:true, color: C.accent, fontFace:"Calibri", align:"center", valign:"middle", margin:0 });
s.addShape(pres.ShapeType.rect, { x:2.75, y, w:6.95, h:0.55, fill:{color:"112233"}, line:{color:"334455", width:0.5} });
s.addText(val, { x:2.88, y, w:6.72, h:0.55, fontSize:11.5, color: C.offWhite, fontFace:"Calibri", valign:"middle", margin:0 });
});
s.addShape(pres.ShapeType.rect, { x:0, y:5.35, w:10, h:0.275, fill:{color: C.mid} });
s.addText("Sources: Guyton & Hall Medical Physiology | Kandel Principles of Neural Science 6e | Katzung Basic & Clinical Pharmacology 16e | Neuroscience: Exploring the Brain 5e", {
x:0.3, y:5.37, w:9.4, h:0.22, fontSize:8.5, color: C.light, fontFace:"Calibri", align:"center", margin:0
});
}
// ── WRITE FILE ──────────────────────────────────────────────────────────────
pres.writeFile({ fileName: "/home/daytona/workspace/synapse-pptx/Synapse_Classification_Transmission.pptx" })
.then(() => console.log("✅ Saved: Synapse_Classification_Transmission.pptx"))
.catch(e => { console.error("ERROR:", e); process.exit(1); });
cd /home/daytona/workspace/synapse-pptx && node build.js 2>&1