Skip to content

About

🎨 AI-powered PowerPoint generator β€” turns any topic into a fully designed .pptx deck using Groq LLM for slide content, auto-fetched images, and python-pptx for export. Flask backend + browser frontend, template-aware layout engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


πŸ“– Overview

SlideGenius turns a single topic into a fully designed, downloadable PowerPoint (.pptx) deck. A Flask backend prompts an LLM on Groq to draft slide content as structured JSON, auto-fetches a literal photograph for image slides, and stitches everything into a real .pptx file using python-pptx β€” styled against your own uploaded template.

   Topic  β†’  🧠 LLM outline  β†’  πŸ–ΌοΈ image lookup  β†’  πŸ“Š .pptx file

✨ Features

Feature Detail
🧠 AI Outline Generation Groq LLM (openai/gpt-oss-120b) writes a slide-by-slide JSON outline from any topic
🎚️ Adjustable Detail Level short / medium / detailed bullet styles, enforced via prompt rules
πŸ–ΌοΈ Auto Image Sourcing Literal, photorealistic images pulled per-slide via Pollinations.ai (Unsplash fallback)
πŸ—‚οΈ Template-Aware Layout Reads your .pptx templates in ppt_templates/, extracts thumbnails + placeholder geometry
🎯 Smart Title Slide Auto-centers and vertically anchors the title slide text
βš™οΈ Overflow Guardrails Caps bullets per layout (3 for split-image, 4 for text-only) to avoid slide overflow
πŸ“¦ One-Shot Export Returns the finished deck as a base64-encoded .pptx ready to download

πŸ—οΈ Architecture

flowchart TD
    A["πŸ§‘ User<br/>Enters topic + settings"] --> B["🌐 index.html<br/>Frontend UI"]
    B -->|"POST /api/generate"| C["🐍 Flask app.py"]
    C --> D["🧠 Groq API<br/>openai/gpt-oss-120b"]
    D -->|"JSON slide outline"| C
    C --> E{"layout ==<br/>split-right-image?"}
    E -->|"yes"| F["πŸ–ΌοΈ Pollinations.ai<br/>image_search_query β†’ image_url"]
    E -->|"no"| G["πŸ“ Text-only slide"]
    F --> H["Preview slides<br/>sent to frontend"]
    G --> H
    H -->|"user reviews / edits"| I["POST /api/export"]
    I --> J["πŸ“‚ ppt_templates/*.pptx<br/>template loaded"]
    J --> K["python-pptx engine<br/>title + bullets + images placed"]
    K --> L["πŸ“Š Final .pptx<br/>base64 encoded"]
    L --> M["⬇️ User downloads deck"]

    style A fill:#F75C7E,color:#fff
    style D fill:#F55036,color:#fff
    style F fill:#4C9AFF,color:#fff
    style K fill:#D24726,color:#fff
    style M fill:#22A06B,color:#fff
Loading

Request flow (sequence)

sequenceDiagram
    participant U as User
    participant F as Frontend (index.html)
    participant S as Flask Server
    participant G as Groq LLM
    participant P as Pollinations.ai
    participant X as python-pptx

    U->>F: Enter topic, slide count, detail level
    F->>S: POST /api/generate
    S->>G: Prompt β†’ strict JSON schema
    G-->>S: {"slides": [...] }
    loop each split-right-image slide
        S->>P: image_search_query
        P-->>S: image_url
    end
    S-->>F: preview_slides (JSON)
    F-->>U: Render live slide preview
    U->>F: Pick template + confirm export
    F->>S: POST /api/export {slides, templateFile}
    S->>X: Build deck from template + JSON
    X-->>S: .pptx bytes
    S-->>F: file_base64
    F-->>U: Download SlideGenius_Deck.pptx
Loading

πŸ“ Project Structure

-SlideGenius-/
β”œβ”€β”€ app.py                # Flask backend β€” generation + export logic
β”œβ”€β”€ index.html             # Frontend UI (topic input, live preview, export)
β”œβ”€β”€ requirements.txt        # Python dependencies
β”œβ”€β”€ ppt_templates/          # Drop your .pptx templates here
β”‚   └── *.pptx
β”œβ”€β”€ .gitignore
└── README.md

πŸ”Œ API Reference

GET /api/templates

Lists available templates with extracted thumbnails and placeholder geometry.

Response

[
  {
    "filename": "corporate_blue.pptx",
    "thumbnail": "data:image/jpeg;base64,...",
    "layout": {
      "slide_width": 12192000,
      "slide_height": 6858000,
      "title_slide": { "title": {...}, "body": {...} },
      "content_slide": { "title": {...}, "body": {...} }
    }
  }
]

POST /api/generate

Generates a slide outline from a topic using the Groq LLM.

Request body

{
  "topic": "The Future of Renewable Energy",
  "slideCount": 6,
  "detailLevel": "medium"
}

Response

{
  "status": "success",
  "preview_slides": [
    {
      "layout": "title",
      "title": "The Future of Renewable Energy",
      "image_search_query": "none",
      "bullets": []
    },
    {
      "layout": "split-right-image",
      "title": "Solar Power Adoption",
      "image_search_query": "solar panels on rooftop",
      "bullets": [{ "text": "...", "icon": "fa-solid fa-solar-panel" }],
      "image_url": "https://image.pollinations.ai/prompt/..."
    }
  ]
}

POST /api/export

Builds and returns the final .pptx as base64.

Request body

{
  "slides": [ /* array from /api/generate, optionally edited */ ],
  "templateFile": "corporate_blue.pptx"
}

Response

{ "status": "success", "file_base64": "UEsDBBQABgAIAAAAIQ..." }

βš™οΈ Setup & Installation

# 1. Clone the repo
git clone https://github.com/MASTER870-CMD/-SlideGenius-.git
cd -SlideGenius-

# 2. Create a virtual environment
python -m venv venv
source venv/bin/activate      # Windows: venv\Scripts\activate

# 3. Install dependencies
pip install -r requirements.txt

# 4. Set your Groq API key (never hardcode it!)
echo "GROQ_API_KEY=your_key_here" > .env

# 5. Add at least one .pptx template
mkdir -p ppt_templates
# β†’ drop a .pptx file in here

# 6. Run the app
python app.py

Then open http://localhost:5000 in your browser.

Environment variables

Variable Required Description
GROQ_API_KEY βœ… API key from console.groq.com, loaded via python-dotenv

🧰 Tech Stack

Layer Technology
Backend Flask, Flask-CORS
LLM Groq (openai/gpt-oss-120b)
Slide Engine python-pptx
Images Pollinations.ai (AI images), Unsplash (fallback)
Config python-dotenv
Server Gunicorn (production)

πŸ—ΊοΈ Roadmap

  • Multi-template style mixing per deck
  • User-uploaded reference images instead of AI-generated ones
  • Chart/graph auto-generation for data-heavy slides
  • Export to Google Slides format
  • Auth + saved deck history

🀝 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you'd like to change.

git checkout -b feature/your-feature
git commit -m "Add: your feature"
git push origin feature/your-feature

πŸ“œ License

Licensed under the MIT License. See LICENSE for details.


⭐ If SlideGenius saved you time, consider starring the repo! ⭐

About

🎨 AI-powered PowerPoint generator β€” turns any topic into a fully designed .pptx deck using Groq LLM for slide content, auto-fetched images, and python-pptx for export. Flask backend + browser frontend, template-aware layout engine.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages