An AI-powered tool that generates complete educational presentations from a topic and difficulty level. Enter any subject, select an instructional level, and the app produces a full slide deck with AI-generated content and images — exported as a viewable presentation or downloadable PowerPoint file.
🌐 Live Demo: ai-educator-ten.vercel.app
Deployed on Vercel (frontend) with a FastAPI backend.
- 📝 Generates slide outlines — AI creates a structured educational outline from any topic
- 🖼️ AI-generated images — each slide gets a contextually relevant image via Google Vertex AI (Imagen) with DALL-E as fallback
- 🎓 Multiple instructional levels — adapts content complexity for different audiences
- 📊 Fullscreen presentation mode — built-in slideshow viewer in the browser
- 💾 PowerPoint export — download the generated deck as a
.pptxfile - 🛡️ Rate limiting & error handling — exponential backoff, content safety checks, automatic fallback between image providers
| Layer | Technology |
|---|---|
| Frontend | React.js |
| Backend | FastAPI + Uvicorn |
| LLM | OpenAI GPT (content generation) |
| Image Generation | Google Vertex AI (Imagen) + DALL-E fallback |
| Cloud | Google Cloud Platform (Vertex AI) |
| Deployment | Vercel (frontend) |
| Dependency Management | pip + virtualenv |
ai-educator/
├── backend/
│ ├── main.py # FastAPI app entry point, all API routes
│ ├── ai_service.py # Core AI logic — outline generation, image generation
│ ├── presentation_service.py # PowerPoint (.pptx) creation and export
│ ├── models.py # Pydantic data models
│ ├── rate_limiter.py # Rate limiting with exponential backoff
│ ├── exceptions.py # Custom error types and handlers
│ ├── app.py # Flask app (image generation endpoint)
│ └── requirements.txt # Python dependencies
├── frontend/ # React frontend
├── static/ # Generated slide images
├── env.template # Environment variable template
└── Procfile # Deployment config
- Python 3.10+
- Node.js 18+
- OpenAI API key
- Google Cloud account with Vertex AI enabled (for Imagen)
git clone https://github.com/kamilj62/ai-educator.git
cd ai-educatorcp env.template .envEdit .env with your credentials:
OPENAI_API_KEY=your_openai_key_here
GOOGLE_CLOUD_PROJECT=your_gcp_project_id
GOOGLE_APPLICATION_CREDENTIALS=backend/credentials/your-service-account-key.json- Create a project in Google Cloud Console
- Enable the Vertex AI API
- Create a service account with these roles:
roles/aiplatform.userroles/serviceusage.serviceUsageViewer
- Download the service account key JSON and place it in
backend/credentials/
If Imagen is unavailable, the app automatically falls back to DALL-E.
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r backend/requirements.txtcd frontend
npm installBackend:
source venv/bin/activate
cd backend
python3 main.pyFrontend (new terminal):
cd frontend
npm startThe app will be available at:
- Frontend:
http://localhost:3000 - Backend API:
http://localhost:8000
- User enters a topic and selects an instructional level
- Backend sends the topic to OpenAI to generate a structured slide outline
- For each slide, the AI generates:
- Educational content (title, bullets, examples)
- A contextually relevant image prompt
- Images are generated via Google Vertex AI Imagen (with automatic DALL-E fallback if Imagen is unavailable or rate-limited)
- The complete presentation is rendered in the browser with a fullscreen slideshow mode
- User can export the deck as a .pptx PowerPoint file
Dual image provider with automatic fallback The app tries Google Vertex AI Imagen first for higher quality images. If it hits a rate limit or error, it automatically switches to DALL-E without any interruption to the user.
Rate limiting with exponential backoff Built-in rate limiter handles API throttling gracefully — retries with increasing delays rather than failing immediately.
Content safety checks Sensitive topics are detected and handled with appropriate guardrails before being sent to image generation APIs.
PowerPoint export
Generated presentations can be downloaded as .pptx files using python-pptx, preserving slide structure and images.
Joseph Kamil — AI/ML Engineer based in Los Angeles, CA
Built with AI coding assistance (Windsurf/Codeium). Architecture, design decisions, and implementation directed by Joseph Kamil.
- GitHub: @kamilj62
- Email: kamilj@umich.edu
MIT