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
| 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 |
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
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
-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
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": {...} }
}
}
]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/..."
}
]
}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..." }# 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.pyThen open http://localhost:5000 in your browser.
| Variable | Required | Description |
|---|---|---|
GROQ_API_KEY |
β | API key from console.groq.com, loaded via python-dotenv |
| 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) |
- 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
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-featureLicensed under the MIT License. See LICENSE for details.