Generate customizable presentation slides using AI. Built with FastAPI, SQLite, and a modular, swappable architecture.
- AI-powered slide generation
- Customizable themes & aspect ratios
- Persistent SQLite storage
- Fast in-memory caching
- PPTX export
- Modular, pluggable design
- Interactive API docs (Swagger)
Check the sample_outputs/ folder for example PPTX files generated by the API.
git clone <repository-url>
cd slide-generator
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env # Add your OpenAI API key
python -m app.main
# or
uvicorn app.main:app --reload
Visit localhost:8000/docs for interactive API docs.
📚 Detailed documentation is available in the docs/ folder:
- API Documentation - Complete API reference
- Architecture Guide - System design and patterns
- Environment Setup - Configuration details
- Middleware Guide - Auth, rate limiting, etc.
- Setup Instructions - Step-by-step guide
POST /api/v1/presentations– Create presentationGET /api/v1/presentations/{id}– Get presentationGET /api/v1/presentations– List presentationsGET /api/v1/presentations/{id}/download– Download PPTXPOST /api/v1/presentations/{id}/configure– Update config
curl -X POST "http://localhost:8000/api/v1/presentations" \
-H "Content-Type: application/json" \
-d '{"topic": "Machine Learning Basics", "num_slides": 5}'
- Interfaces: Abstract contracts for LLM, cache, storage
- Implementations: Pluggable (OpenAI, dummy LLM, Redis, etc.)
- Factory pattern: Easy to swap components
app/
apis/ # API routes
config/ # Config & themes
interfaces/ # Abstract interfaces
middleware/ # Auth, rate limiting
models/ # Data models
services/ # Logic & implementations
main.py # Entry point
.envfor secrets and API keys- See
docs/ENVIRONMENT_SETUP.mdfor details
The tests in the tests/ folder are integration tests that require the server to be running for successful execution.
# Start the server first (in one terminal)
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
# Then run the tests (in another terminal)
python -m pytest tests/ -v
Note: These are integration tests that test the full API endpoints, not unit tests. They require the FastAPI server to be running to properly test the complete request-response cycle.
- Replace API calls with API + WebSocket or API + periodic lookup - Handle long response times by implementing real-time communication or polling mechanisms
- Allow changing LLM prompts from config - Enable dynamic prompt updates without requiring service restart
- Integrate LangChain for complex content generation flows - Implement sophisticated reasoning chains, multi-step content generation, and advanced prompt orchestration
MIT