An autonomous full-stack AI presentation maker built with Next.js (App Router), TypeScript, Tailwind CSS, Playwright render QA, intelligent multi-agent model routing, and a deterministic code-only presentation rendering engine (Engine v2).
- Warm Editorial Minimalist UI:
- Background:
#FBF8F3(Warm cream canvas) - Surface Cards:
#FFFFFFwith warm hairline borders (#E8E2D5) and soft ambient shadows (0 2px 20px rgba(0,0,0,0.04)) - Primary Accent:
#C15B3E(Warm terracotta) with#A84E34hover state - Typography: Editorial serif headings (
Playfair Display) paired with clean modern Apple-like sans-serif body text (Inter) and monospace metrics (JetBrains Mono) - Smooth interactive controls:
rounded-2xlApple-style buttons, custom styled range sliders, warm hairline inputs, and responsive layout - Fully responsive, mobile-first design with accessible contrast ratios (WCAG AA).
- Background:
Engine v2 is a ground-up declarative rendering engine that eliminates LLM hallucinations in slide design and geometry:
- Canvas Specification: Fixed 13.333" × 7.5" (16:9) canvas, 12-column grid system (0.2" gutters), and a strict 0.6" left/right and 0.5" top/bottom safe area (
SAFE_AREA). - SceneGraph Intermediate Representation: Declarative JSON tree representing all slide elements (
RectShape,TextShape,BulletListShape,ImageShape,IconShape,ChartShape,DiagramShape,BigNumberShape). - AI Director Agent (
src/engine/agents/director.ts):- Analyzes the presentation brief, audience, and narrative arc.
- Dynamically plans slide roles and selects varied layout structures using deterministic seeded PRNG.
- AI SlideWriter Agent (
src/engine/agents/slideWriter.ts):- Fills slot schemas with concise, high-impact copywriting, structured KPI metrics, and topic-tailored diagram specifications.
- Dynamic AI Vector Diagram Builder (
src/engine/diagrams/dynamicDiagramBuilder.ts):- Eliminates rigid, repetitive diagram templates.
- Generates topic-customized process flows, layered architecture stacks, and 2×2 matrices from AI topological specs.
- Emits native vector shapes (containers, badges, icons, connecting arrow lines) that are razor-sharp and fully editable in PowerPoint (
.pptx).
- Free Diffusion AI Image Generator (
src/engine/assets/imageGenerator.ts):- Powered by Cloudflare Workers AI hosting Black Forest Labs' Flux 1 Schnell and SDXL Lightning (free tier: 10,000 neurons daily).
- High-resolution base64 JPEG synthesis delivered directly into SceneGraph intermediate representations for HTML, PPTX, and PDF emitters.
- Secondary fallback to Gemini 2.5 Flash 1280x720 vector SVG generation with authentic topic geometry and linear gradients.
- Resilient Multi-Provider LLM Routing & Instant Failover (
src/lib/ai/):- Automatically routes tasks across Google AI Studio (
gemini-2.5-flash) and Groq (openai/gpt-oss-120b). - Implements instant active failover upon 429 quota exhaustion or high-demand spikes without dropping to static mock templates.
- Automatically routes tasks across Google AI Studio (
- 12 Code-Only Layout Definitions:
cover-fullbleed: Hero image with text scrim overlaycover-split: Split layout (half image, half text)section-bignumber: Large metric stat callout with supporting captionstatement: Large quote or bold claimstat-hero: 3-metric KPI hero rowthree-cards: 3-column card grid with icon headersicon-grid-4: 2×2 or 4-row feature grid with iconsimage-left: Left-aligned photo with bullet pointsimage-right: Right-aligned photo with bullet pointskey-takeaways: Summary bullets listclosing-cta: Final call-to-action slideagenda: Table of contents / session roadmap
- Deterministic Design System Generator:
- OKLCH color space math with guaranteed WCAG AA/AAA contrast ratios
- 10 curated style families (
editorial-serif,bold-geometric,glass-gradient,bento-grid,neo-brutalist,soft-pastel-organic,dark-tech-neon,minimal-swiss,retro-print,magazine-photo-led) - Seeded PRNG (
mulberry32) guaranteeing identical output for identical seeds and distinct design signatures for different seeds.
- Strict Code-Only QA Validator (
sceneGraphChecks.ts):- Zero tolerance for shapes outside the safe area (except designated full-bleed backgrounds/overlays)
- Layout repetition guard (no identical layouts back-to-back, max 2 occurrences per 10 slides)
- Minimum typography sizes (body ≥ 14pt, caption ≥ 11pt)
- Visual element count enforcement (≥ 2 non-text visuals per slide)
- Color palette diversity validation (≥ 4 distinct roles per presentation).
- Multi-Target Emitters:
- HTML Emitter: 1280×720 CSS-transformed slideshow with keyboard navigation and fullscreen support
- PPTX Emitter: Native shapes, PPTX-safe cross-platform font fallbacks, and editable text
- PDF Emitter: Multi-page vector PDF via headless Chromium.
Every presentation generated is visually unique and richly formatted—never a generic "title + bullet" deck:
- 10 Curated Color Palettes:
- Midnight Cyber, Obsidian Emerald, Velvet Amethyst, Slate Minimalist, Warm Terracotta, Executive Navy & Gold, Editorial Cream & Sand, Crimson Noir, Aurora Borealis, Solar Citrus.
- 8 Google Font Pairs:
- Paired heading/body typography with full Devanagari support for English, Hindi, and Hinglish presentations.
- 25+ Bespoke Layout Engine:
- Hero, Split Content-Image, Big Number Callout, 3-Card Grid, 4-Card Grid, Comparison (Pros/Cons), Horizontal Timeline, Vertical Process, Quote Highlight, Full-Bleed Visual, Chart Visualization, Mermaid Diagram, Code Walkthrough, Matrix 2x2, Problem-Solution, Key Takeaways, and more.
- Visual Element Requirement:
- Every slide contains a dedicated visual component (ECharts data graphic, Mermaid diagram, syntax-highlighted code block, stat callout, or icon grid).
- Layout Repetition Guard:
- No two consecutive slides share the same layout pattern.
The generation workflow is divided among specialized sub-agents orchestrated by an Owner agent:
- Researcher Agent: Analyzes topic, target audience, and market context using Google AI Studio (
gemini-2.5-flash). - ArtDirector Agent: Generates a distinct "Design DNA" (palette, typography, layout sequence, visual style) from topic and seed.
- SlideWriter Agent: Drafts punchy headlines, word-capped body points, and full presenter speaker notes.
- DiagramCodeSpecialist Agent: Synthesizes data charts (ECharts) and architecture flowcharts (Mermaid) via GroqCloud (
openai/gpt-oss-120b). - Deterministic QA: Verifies word counts, WCAG AA contrast ratios, empty space, and layout sequences.
- Playwright QA: Headless Chromium 1920x1080 viewport rendering to detect text overflow before deck delivery (0 overflow guarantee).
- Live Server-Sent Events (SSE) streaming endpoint (
/api/pipeline/stream). - Embedded terminal displays real-time agent execution, millisecond timestamps, active model identifiers, and progress percentages.
- Admin Direct Mode: Instant generation bypassing payment gates for testing and development.
- Ephemeral Storage: Supabase is turned off during testing; state resides entirely in memory with zero user data saved to disk or external databases.
- PowerPoint (PPTX): Native
.pptxgeneration with custom layouts, colors, shapes, and speaker notes viapptxgenjs. - High-Resolution PDF: Clean 16:9 PDF export generated via Playwright headless rendering.
- Standalone HTML Slideshow: Standalone responsive 16:9 slideshow with interactive charts, keyboard navigation, and a collapsible speaker notes drawer.
npm install
npx playwright install chromiumCopy .env.example to .env.local and add your provider keys:
Copy-Item .env.example .env.local- Engine v2 (V2-0 Foundation) Test Suite:
npx tsx scripts/test-v2-engine.ts
- Pipeline Test (v1):
npx tsx scripts/test-pipeline.ts
- Payment & Capacity Test:
npx tsx scripts/test-phase2.ts
npm run devOpen http://localhost:3000 in your browser.