PPT Generator is a backend API service that generates PowerPoint presentations (PPTX) using AI (Google Gemini) or custom user content. It allows users to create, configure, and download presentations programmatically, supporting custom slide layouts, fonts, and colors.
- AI-powered slide generation: Generate slide content automatically from a topic and slide count using Google Gemini.
- Custom content: Provide your own slide content and structure.
- Configurable appearance: Set fonts, font colors, and background colors for presentations.
- Downloadable PPTX: Download the generated presentation as a .pptx file.
- Backend: FastAPI (Python)
- Database: PostgreSQL (stores presentations and configurations)
- AI Integration: Google Gemini for content generation
- PPTX Generation: python-pptx
- Containerization: Docker & Docker Compose
- Python 3.12+
- Docker & Docker Compose (recommended)
- Google Gemini API key
Create a .env file in the backend/ directory with the following:
DATABASE_URL=postgresql://service_user:service_password@db:5432/presentation_db
GEMINI_API_KEY=your_gemini_api_key_here
- Build and start the services:
docker-compose up --build
- The API will be available at
http://localhost:8085.
- Install dependencies:
cd backend pip install -r requirements.txt - Ensure PostgreSQL is running and
DATABASE_URLis set in.env. - Run the API:
python main.py
- POST
/api/v1/presentations/ - Request Body:
{ "topic": "Artificial Intelligence", "num_slides": 5, "custom_content": [ // Optional, overrides AI generation { "layout": "title", "title": "Welcome to AI" }, { "layout": "bullet", "title": "Key Points", "bullets": ["History", "Applications", "Future"] } ] } - Response:
{ "presentation_id": 1, "topic": "Artificial Intelligence", "content": [...], "configuration": null }
- POST
/api/v1/presentations/{presentation_id}/configure - Request Body:
{ "font_name": "Arial", "font_color": "#000000", "background_color": "#FFFFFF" } - Response: Same as above, with updated
configuration.
- GET
/api/v1/presentations/{presentation_id} - Response: Presentation details (see above).
- GET
/api/v1/presentations/{presentation_id}/download - Response: Returns the generated
.pptxfile.
Please read our Contributing Guide for details on our code of conduct, development setup, and the process for submitting pull requests.
If you find this useful, please consider:
-
⭐ Starring the repository on GitHub to help others discover it.
-
💖 Sponsoring to support ongoing maintenance and development.
Become a Sponsor on GitHub | Support on Patreon
MIT License - see the LICENSE file for details.
Y. Siva Sai Krishna
-
GitHub: @ysskrishna
-
LinkedIn: ysskrishna
