AI-powered presentation generation. Enter a topic, get professional slides — with themes, visual preview, fullscreen presentation mode, and PowerPoint export.
- Backend: Python 3.12 / Django 5.1
- Database: MySQL
- Frontend: Django Templates + Tailwind CSS
- AI: Together AI (OpenAI-compatible API, Llama 3.3 70B)
- Export: python-pptx (PowerPoint)
# Clone & enter
git clone <repo-url>
cd SlideAI
# Virtual environment
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt
# Environment variables
cp .env.sample .env
# Edit .env with your credentials (see Configuration below)
# Database
python manage.py migrate
# Seed themes & templates
python manage.py seed_data
# Create admin user
python manage.py createsuperuser
# Run
python manage.py runserver- AI Slide Generation — Enter a topic, pick a style and template, AI generates complete slide content
- Template-Driven — 4 built-in templates (Pitch Deck, Educational, Business Report, Project Proposal) guide AI output structure
- 6 Themes — Corporate Blue, Dark Mode, Minimalist, Nature Green, Warm Sunset, Tech Neon
- Visual Preview — 16:9 slide cards with theme colors, drag-drop reorder
- Presentation Mode — Fullscreen slideshow with keyboard/touch navigation
- Theme Switching — One-click theme change on any presentation
- PowerPoint Export — Download .pptx with theme colors, fonts, and speaker notes
- Slide Regeneration — Regenerate individual slides with AI
- Public Sharing — Share link for public presentations
- Duplicate — Copy any presentation with all slides
SlideAI follows the Service-Repository pattern with Registry Patterns for extensibility:
HTTP Request
→ View (parse request, call service, return response)
→ Service (pure business logic, no HTTP, no ORM)
→ Repository (all database queries live here)
→ Model (data definition only)
| Want to add... | How |
|---|---|
| New AI provider | 1 file in apps/ai/clients/, call register_client() |
| New export format | 1 file in apps/presentations/services/exporters/, call register_exporter() |
| New slide template | Add via admin panel or seed_data command |
| New theme | Add via admin panel or seed_data command |
| New slide layout | Add to SlideLayout enum + CSS class + pptx mapping |
config/ Django settings (base/dev/prod/test)
apps/
├── core/ Shared foundation
│ ├── base_repository.py Generic BaseRepository[T]
│ ├── exceptions.py Custom exception hierarchy
│ ├── dtos.py ServiceResult, PaginatedResult
│ ├── mixins.py UUID PK, timestamps, soft delete
│ ├── middleware/ DomainExceptionMiddleware
│ ├── constants.py SlideLayout enum
│ └── views.py Landing page
├── accounts/ Authentication
│ ├── models/ User, UserProfile
│ ├── backends.py EmailAuthBackend
│ ├── services/ auth_service, profile_service
│ └── views/ register, login, logout, profile
├── presentations/ Main domain
│ ├── models/ Presentation, Slide, SlideTemplate, Theme
│ ├── repositories/ 4 repositories + singletons
│ ├── services/
│ │ ├── presentation_service.py CRUD + duplicate
│ │ ├── slide_service.py CRUD + reorder
│ │ ├── theme_service.py list, apply
│ │ ├── export_service.py registry-based export
│ │ └── exporters/ BaseExporter + PptxExporter
│ ├── views/ presentations, slides, export, templates (template routes are top-level)
│ ├── forms/ PresentationForms, SlideForm, AIGenerateForm
│ ├── management/commands/ seed_data
│ └── urls.py 17 URL patterns
└── ai/ AI integration
├── clients/ Registry + TogetherClient + BaseAIClient ABC
├── services/ generation_service, prompt_service
├── prompts/ System/user prompt templates
├── dtos.py GenerationRequest, SlideContent, GenerationResult
└── tests/ MockAIClient
templates/ 32 templates (Tailwind CSS)
static/
├── css/ app.css, slides.css
└── js/ app.js, slideshow.js, slide-reorder.js
| Variable | Description | Default |
|---|---|---|
DJANGO_ENV |
development / production / test |
development |
SECRET_KEY |
Django secret key | — |
DB_NAME |
MySQL database name | slideai |
DB_USER |
MySQL user | root |
DB_PASSWORD |
MySQL password | — |
DB_HOST |
MySQL host | 127.0.0.1 |
DB_PORT |
MySQL port | 3306 |
AI_PROVIDER |
AI provider: together or mock |
— |
AI_API_KEY |
Together AI API key | — |
AI_MODEL |
Model ID (e.g. meta-llama/Llama-3.3-70B-Instruct-Turbo) |
— |
AI_BASE_URL |
API base URL (e.g. https://api.together.xyz/v1) |
— |
AI_MAX_SLIDES |
Maximum slides per generation | 20 |
AI_DEFAULT_SLIDES |
Default slide count | 8 |
Settings are split by environment:
config/settings/base.py— Shared configurationconfig/settings/development.py— Debug mode, console email, SQLite fallbackconfig/settings/production.py— Security headers, HTTPS enforcementconfig/settings/test.py— Fast password hasher, mock AI provider
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Run specific app tests
pytest apps/accounts/
pytest apps/presentations/
# Code formatting
black .
isort .
# Type checking
mypy .
# Linting
flake8The seed_data management command creates:
- 6 themes with colors and fonts
- 4 slide templates with structured JSON layouts (Pitch Deck, Educational Lesson, Business Report, Project Proposal)
python manage.py seed_dataIdempotent — safe to run multiple times.
GET /dashboard/— User dashboard with stats and recent presentations
GET /presentations/— List user's presentationsGET /presentations/create/— Manual creation formGET /presentations/generate/— AI generation formGET /presentations/<uuid>/— Detail with visual slide gridGET /presentations/<uuid>/present/— Fullscreen presentation modePOST /presentations/<uuid>/theme/— Change themePOST /presentations/<uuid>/duplicate/— Duplicate presentationGET /presentations/<uuid>/edit/— Edit formPOST /presentations/<uuid>/delete/— Delete presentation
GET /presentations/<uuid>/slides/— List slidesPOST /presentations/<uuid>/slides/create/— Add slidePOST /presentations/<uuid>/slides/<uuid>/edit/— Edit slidePOST /presentations/<uuid>/slides/<uuid>/delete/— Delete slidePOST /presentations/<uuid>/slides/<uuid>/regenerate/— AI regenerate slidePOST /presentations/<uuid>/slides/reorder/— Reorder (JSON)
GET /templates/— Template galleryGET /templates/<uuid>/preview/— Template preview
GET /presentations/<uuid>/export/pptx/— Download PowerPointGET /presentations/<uuid>/export/pdf/— PDF (coming soon)
A thin Django REST Framework layer (apps/api/) exposes the existing services
as JSON for the Flutter mobile app. Auth is JWT (access + refresh) via
djangorestframework-simplejwt, reusing the email-based EmailAuthBackend.
The API is additive — the server-rendered web app above is unchanged.
POST /api/v1/auth/register|login,POST /api/v1/auth/token/refresh/,GET /api/v1/auth/me/GET|POST /api/v1/presentations/,GET|PATCH|DELETE /api/v1/presentations/<uuid>/,POST .../duplicate/GET|POST /api/v1/presentations/<uuid>/slides/,POST .../slides/reorder/,GET|PATCH|DELETE /api/v1/slides/<uuid>/GET /api/v1/themes/,GET /api/v1/templates/,GET /api/v1/dashboard/stats/POST /api/v1/ai/generate/(sync),POST /api/v1/ai/slides/<uuid>/edit/GET /api/v1/presentations/<uuid>/export/pptx/
Errors are returned as JSON (apps/api/exceptions.py) instead of the SSR HTML
error pages. Tests: DJANGO_ENV=test pytest apps/api/.
A native Flutter client lives in mobile/. It consumes the
/api/v1/ API and faithfully reproduces the slide design system (cover / split
/ closing + 8 visual types) using the same proportional unit system as
static/css/slides.css.
cd mobile
flutter pub get
flutter run # Android emulator reaches the dev server at 10.0.2.2:8000See mobile/README.md for architecture, the per-platform
API base URL, and run/test instructions.
All rights reserved.