| title | AI Presentation Generator |
|---|---|
| emoji | 🚀 |
| colorFrom | blue |
| colorTo | purple |
| sdk | docker |
| pinned | false |
AI-powered Markdown-to-PowerPoint pipeline that turns long-form research documents into consulting-style presentation decks.
The project combines a Next.js upload UI with a FastAPI backend that runs a three-stage generation flow:
- Parse the Markdown and extract embedded chart images.
- Summarize the content into a slide storyline with Gemini.
- Design slide blueprints and compile a
.pptxdeck.
- Accepts
.mdfiles from the web UI. - Processes jobs asynchronously in the backend.
- Tracks job progress with polling.
- Extracts base64 charts/images from Markdown and maps them to section topics.
- Uses Gemini to summarize large documents into slide-ready content.
- Uses a second Gemini pass to assign premium slide layouts, themes, and image directions.
- Compiles a downloadable PowerPoint deck with
python-pptx. - Includes sample Markdown inputs and generated decks under
tests/.
flowchart LR
U["User"] --> F["Frontend<br/>Next.js 16 + React 19"]
F -->|POST /upload| B["FastAPI Backend"]
F -->|GET /status by job id| B
F -->|GET /download by job id| B
B --> P["Pipeline Orchestrator<br/>backend/main.py"]
P --> A1["Agent 1: Phaser<br/>Extract headings + base64 charts"]
P --> A2["Agent 2: Story Director<br/>Chunk, summarize, merge slides"]
P --> A3["Agent 3: Art Director<br/>Assign layouts, themes, visuals"]
P --> C["Compiler<br/>python-pptx deck builder"]
A2 --> G["Google Gemini API"]
A3 --> G
A1 --> X["Extracted chart/topic map"]
X --> C
A3 --> C
C --> O["Generated .pptx file<br/>saved on server"]
O --> B
- The frontend accepts a Markdown file and sends it to
POST /upload. - The backend creates a
job_id, stores an in-memory status record, and starts background processing.
- File:
backend/phaser.py - Scans headings to understand topic boundaries.
- Detects inline base64 images like
data:image/...;base64,.... - Replaces large image blobs with
[REFERENCE_CHART_EXTRACTED]markers so the LLM can keep chart context without huge payloads. - Returns:
- cleaned Markdown
- topic-to-images mapping
- File:
backend/storyDirector.py - Splits large Markdown into chunks.
- Sends each chunk to Gemini for slide candidate generation.
- Merges chunk outputs into a final presentation outline.
- Preserves chart references when the source implies an existing visualization.
- Emits structured slide content such as:
- title
- summary
- bullets
- highlight metrics
- recommended visual type
- File:
backend/artDirector.py - Takes summarized slide JSON and transforms it into a visual blueprint.
- Chooses:
- layout type
- theme variant
- visual priority
- background design elements
- content blocks
- whether to use extracted charts or generated visuals
- File:
backend/compiler.py - Builds the final deck with
python-pptx. - Adds a cover slide.
- Renders themed layouts and decorative elements.
- Places extracted charts when topic matches are found.
- Generates fallback visual assets for slides when needed.
- Saves the final file as
Deck_<job_id>.pptx.
- The frontend polls
GET /status/{job_id}every 2 seconds. - Once complete, it redirects the browser to
GET /download/{job_id}to fetch the PowerPoint.
- Next.js 16
- React 19
- TypeScript
- Tailwind CSS 4
- FastAPI
- Uvicorn
- Google GenAI SDK
- python-pptx
- Pillow
- requests
- python-dotenv
- Docker
- GitHub Actions
- Hugging Face Spaces sync workflow
Code-EZ-MultiAgent.PipeLine/
|-- backend/
| |-- main.py # FastAPI app and pipeline orchestration
| |-- phaser.py # Markdown cleanup and chart extraction
| |-- storyDirector.py # Slide summarization and merge logic
| |-- artDirector.py # Layout/theme blueprint generation
| |-- compiler.py # PPTX generation
| |-- requirements.txt # Python dependencies
| `-- .env # Backend environment variables
|-- frontend/
| |-- app/
| | |-- page.tsx # Upload UI, polling, download redirect
| | |-- layout.tsx # App shell metadata
| | `-- globals.css # Global styles
| |-- package.json
| `-- next.config.ts
|-- tests/ # Sample markdown inputs and generated outputs
|-- .github/workflows/
| `-- synTo_HF.yml # Pushes repo to Hugging Face Space
|-- Dockerfile # Backend container image
`-- README.md
Returns a basic API message.
Uploads a Markdown file and starts background processing.
Request:
curl -X POST -F "[email protected]" http://localhost:7860/uploadExample response:
{
"status": "success",
"job_id": "uuid-value",
"message": "Background processing started"
}Returns progress for a running or completed job.
Example response:
{
"status": "processing",
"message": "Generating presentation content...",
"progress": 20
}Completed response includes file_path.
Downloads the generated PowerPoint when the job is complete.
- Node.js 18+
- Python 3.11+
- A valid
GEMINI_API_KEY
cd backend
pip install -r requirements.txt
uvicorn main:app --host 0.0.0.0 --port 7860 --reloadFor package-style imports from the repo root, this also works:
uvicorn backend.main:app --host 0.0.0.0 --port 7860 --reloadcd frontend
npm install
npm run dev- Frontend:
http://localhost:3000 - Backend:
http://localhost:7860
The backend expects:
GEMINI_API_KEY=your_api_key_hereOptional runtime values commonly used in deployment:
PORTHOSTWORKERS
Build and run:
docker build -t code-ez-pipeline .
docker run -p 7860:7860 --env-file backend/.env code-ez-pipelineThe current Docker image runs the backend with multiple Uvicorn workers.
The tests/ folder includes:
- sample Markdown research documents
- generated PowerPoint decks
- template decks / slide masters
These examples are useful for:
- evaluating slide quality
- checking formatting behavior
- validating chart extraction cases
- Job state is stored in memory, so status is lost if the backend restarts.
- Generated
.pptxfiles are written to the server filesystem, currently in the repo/runtime working directory. - The frontend currently calls
http://localhost:7860directly, so it is tied to local backend development unless configured differently. - CORS is currently open to all origins.
- The Gemini-based summarization step adds cooldown delays between chunks to reduce rate-limit issues.
- The compiler can use extracted charts from the source Markdown and combine them with generated visual styling.
- Large documents are chunked before summarization to stay within model constraints.
- No persistent database or job queue.
- No authentication or multi-tenant isolation.
- No configurable frontend API base URL yet.
- No formal automated test suite for the API/UI flow.
- Dependency files may need tightening for fully reproducible fresh installs.
- Progress and output tracking are process-local, which matters when running multiple workers.
- The repo includes a GitHub Actions workflow that force-pushes the
Masterbranch to a Hugging Face Space. - The root
Dockerfileis backend-focused and does not build or serve the Next.js frontend. - If you want a single deployed app, you will likely need:
- frontend deployment separately
- or a unified deployment strategy that serves both frontend and backend together
This project is a hackathon/prototype codebase.