Skip to content

Santhosh-Kumar-R-S/ai-ppt-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPT Builder — AI-Powered Presentation Generator

Generate professional, dark-themed PowerPoint presentations instantly using AI. Built with Flask, python-pptx, and Groq AI.


🖼️ Screenshots

🏠 Landing Page — Choose Your Mode

Landing Page

Select from 4 generation modes: Academic Seminar, Prompt to PPT, Quick Generator, or Creative Mode.


✍️ Topic Entry

Topic Entered

Type your topic or click a suggestion chip — then hit Generate Presentation.


⏳ AI Generation in Progress

Loading Screen

The AI processes your topic and builds structured slide data in ~5–10 seconds.


🎛️ Editor — Title Slide Preview

Editor Title Slide

The editor shows all slide thumbnails in the sidebar. The main canvas updates as you click through. Export as .pptx anytime.


🗂️ Editor — Section Header Slide

Section Header Slide

Different slide layouts are auto-selected by AI — section headers, content lists, flowcharts, comparisons, and more.


✨ Features

  • 4 Generation Modes — Academic Seminar, Prompt-to-PPT, Quick Generator, Creative Mode
  • 8 Slide Layouts — Title, Content, Two-Column, Section Header, Comparison, Flowchart, Diagram, Summary
  • Premium Dark Theme — Gradient orbs, accent borders, icon badges, footer branding, corner decorations
  • Visual Flowcharts — Auto-generated process flows with connected boxes and arrows
  • Live Preview — Browse slides in-browser before exporting
  • One-Click Export — Download as .pptx file ready for PowerPoint

📋 Prerequisites

Requirement Version
Python 3.10+
pip Latest
Groq API Key Get one free

🚀 Setup Guide

Step 1: Clone or Navigate to the Project

cd D:\Projects\ppt_builder

Step 2: Install Python Dependencies

pip install -r requirements.txt

This installs:

  • flask — Web server
  • flask-cors — Cross-origin support
  • python-pptx — PowerPoint generation engine
  • groq — Groq AI SDK
  • python-dotenv — Environment variable loader

Step 3: Configure Environment Variables

Create or edit the .env file in the project root:

GROQ_API_KEY=your_groq_api_key_here
PORT=3000

How to get a Groq API Key:

  1. Go to console.groq.com
  2. Sign up / Log in
  3. Navigate to API KeysCreate API Key
  4. Copy the key and paste it in .env

Step 4: Start the Server

python app.py

You should see:

🚀 PPT Builder running at http://localhost:3000
 * Serving Flask app 'app'
 * Debug mode: on
 * Running on http://127.0.0.1:3000

Step 5: Open in Browser

Navigate to http://localhost:3000 in Chrome, Edge, or Firefox.


📖 How to Use

  1. Select a Mode — Choose from Academic, Prompt-to-PPT, Quick, or Creative
  2. Enter Your Topic — Type any topic or click a suggestion chip
  3. Click "Generate Presentation" — AI creates structured slides (takes ~5-10 seconds)
  4. Preview Slides — Navigate using thumbnails, dots, arrows, or keyboard (← →)
  5. Export PPTX — Click the export button to download the .pptx file
  6. Open in PowerPoint — The file is ready to present or edit further

📁 Project Structure

ppt_builder/
├── app.py              # Flask server — routes for UI, generation, and export
├── ai_service.py       # Groq AI integration — prompt templates for 4 modes
├── ppt_engine.py       # python-pptx engine — premium dark-themed slide renderer
├── requirements.txt    # Python dependencies
├── .env                # Environment variables (API key, port)
├── test_api.py         # API test script
└── static/             # Frontend assets
    ├── index.html      # Three-screen SPA (Landing → Loading → Editor)
    ├── css/
    │   └── style.css   # Premium dark theme design system
    └── js/
        └── app.js      # Frontend logic — preview rendering, navigation, export

🏗️ Architecture

Browser (HTML/CSS/JS)
    │
    ├── POST /api/generate   →  Flask  →  Groq AI  →  Slide JSON
    │                                                      │
    │   ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ┘
    │   (renders preview in browser)
    │
    └── POST /api/export     →  Flask  →  python-pptx  →  .pptx file
                                                              │
        ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ← ┘
        (downloads file)

API Endpoints

Method Endpoint Body Response
GET / Serves the frontend
POST /api/generate { "topic": "...", "mode": "academic" } Slide JSON
POST /api/export Slide JSON object .pptx file download

Supported Modes

Mode Slides Description
academic 10-12 Engineering-grade, structured, with facts & stats
prompt-to-ppt 10-12 Converts a detailed prompt into slides
quick 6-8 Fast overview deck
creative 10-12 Bold, storytelling-driven with dramatic titles

Slide Layouts

Layout Description
title_slide Opening slide with title, subtitle, description
title_content Title + bullet cards with numbered badges
two_column Side-by-side columns with headers and bullets
section_header Transition slide with large centered title
comparison Table comparing two concepts
flowchart Visual process flow with connected boxes and arrows
diagram_focus Architecture blocks or component grid cards
summary Key takeaways in grid cards + "Thank You"

🎨 PPT Design Features

The generated .pptx files include:

  • Dark background (#0B0E17 → #0F121F) with ambient gradient orbs
  • Accent color palette — Purple, Teal, Blue, Red, Yellow, Lavender
  • Footer branding bar on every slide with "PPT Builder" logo
  • Corner dot decorations — subtle 3×3 geometric grid
  • Card-style bullets with colored left-border accents and icon badges (◆ ● ■ ▲ ★)
  • Flowchart boxes with step numbers, labels, and directional arrows
  • Comparison tables with alternating row colors and styled borders
  • Consistent typography — Calibri / Consolas with clear size hierarchy

🧪 Testing

Run the included test script to verify everything works:

python test_api.py

Expected output:

=== Test: Generate Enhanced Slides ===
Status: 200
Title: Machine Learning in Healthcare
Slides: 11
  [title_slide] Introduction — 3 items
  [title_content] Key Concepts — 6 items
  [flowchart] ML Workflow — 0 items (flow_steps: 6)
  ...
  Has flowchart: YES ✅
  Has comparison: YES ✅

=== Test: Export Enhanced PPTX ===
Status: 200
File size: ~55000 bytes
Saved to test_enhanced.pptx ✅

🔧 Troubleshooting

Issue Solution
GROQ_API_KEY error Verify your API key in .env is valid
Port already in use Change PORT in .env to another number (e.g., 5000)
ModuleNotFoundError Run pip install -r requirements.txt again
Empty slides Check your internet connection (Groq API requires network)
Permission denied on export Close the previously exported .pptx file if open

🎬 Demo Video

A full walkthrough demo video showing the complete flow — from entering a topic to previewing slides and exporting the .pptx file — can be recorded by running the app locally at http://localhost:3000.

To record your own demo, open the app, type a topic, and use any screen recorder (e.g. OBS, Windows Game Bar Win+G, or ShareX).


📜 License

MIT License — free to use and modify.

About

Generate stunning PowerPoint presentations with AI. 4 modes (Academic, Creative, Quick, Prompt-to-PPT), 8 slide layouts including flowcharts & diagrams, premium dark theme. Built with Flask, python-pptx, and Groq AI

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors