How barun-saha/slide-deck-ai works
Project type and purpose
• SlideDeck AI is a Streamlit‐based web application that co-creates PowerPoint slide decks using Generative AI.
• It provides a user interface, orchestrates calls to LLM providers (online or offline via Ollama), fetches images from Pexels, and uses python-pptx to build/download presentations.
File structure
• Top-level entrypoint: app.py (Streamlit UI + controller)
• Configuration: .env.example, global_config.py, .streamlit/config.toml
• Helpers (business logic):
• helpers/llm_helper.py (wraps LLM calls, online/offline)
• helpers/image_search.py (Pexels integration)
• helpers/pptx_helper.py (python-pptx slide generation)
• helpers/text_helper.py, file_manager.py, icons_embeddings.py
• Static assets & templates:
• prompts/ (LLM prompt templates)
• pptx_templates/ (PowerPoint templates)
• examples/ (input/output JSON samples)
• Output/history: slides_for_this_project_by_this_project/
• Dependencies: requirements.txt
README for additional insights
• Describes a 2-phase process: initial JSON from LLM → optional user refinement → PPTX generation
• Supports multiple LLM backends (Azure, Hugging Face, Google, Cohere, OpenRouter, Together, Ollama)
• Uses Pexels API for image download
Main components
a. Frontend (Streamlit UI)
• Input form for topic or PDF
• LLM provider selection & API key management
• Refinement input area
• Download button for PPTX
b. Controller (app.py + global_config.py)
• Reads user input & environment variables
• Invokes llm_helper, image_search, pptx_helper
• Manages history of instructions
c. Helper modules (business logic)
• LLM Helper: routes to online or Ollama
• Image Search: queries Pexels API based on keywords
• PPTX Helper: consumes structured JSON + images + template → .pptx
d. Data & Templates
e. External Services
• LLM APIs (Azure, HF, Google, Cohere, etc.)
• Pexels Image API
• Ollama (optional offline LLM)
Relationships & interactions
• User → Streamlit UI → Controller
• Controller → llm_helper → LLM Provider → JSON response
• Controller → image_search → Pexels → image files
• Controller → pptx_helper (+ JSON + images + template) → generates PPTX
• Controller → Streamlit UI (download link)
• Refinement loop: User → UI → Controller → llm_helper (with history) → updated JSON → pptx rebuild
Architectural patterns & design principles
• Layered architecture: UI layer / controller layer / service layer / data layer
• Separation of concerns: each helper module has a single responsibility
• Plugin-style support for multiple LLM providers
• Config driven: environment variables & global_config.py
• Resource organization: static assets in dedicated folders
Elements
• Clear labels: “Streamlit UI,” “LLM Helper,” “PPTX Helper,” etc.
• Rounded rectangles for components
• Clouds for external services (LLM APIs, Pexels)
Detail without over-splitting
• Template and asset folders as a single “Static Resources” store
• Both initial generation and refinement phases