DeckSmith is an AI-powered slide deck generator that creates professional McKinsey/BCG/Bain-style presentations from simple descriptions. It leverages Azure OpenAI for content generation and DALL-E for image creation.
- AI-Powered Content Generation: Creates structured, professional slide content using Azure OpenAI
- Image Generation: Generates relevant images for slides using DALL-E 3
- Document Upload: Upload PDF or Word documents to provide context for your presentations
- Vector Search: Uses FAISS for intelligent document retrieval and context-aware responses
- Multiple Templates: Choose from different PowerPoint templates
- Interactive Chatbot: Ask questions about uploaded documents
- Email Integration: Send chat summaries via email
DeckSmith/
├── main.py # Streamlit application entry point
├── chatbot.py # Conversational AI with vector search
├── slide_deck_gen_v2.py # Slide generation with retry logic
├── image_generator.py # DALL-E image generation
├── vector_db.py # FAISS vector database with persistence
├── document_processing.py # PDF/Word processing with chunking
├── validation.py # Authentication and input sanitization
├── tools.py # Email tools with validation
├── constants.py # Configuration constants
├── ui.py # Streamlit UI components
├── utils.py # Utility functions
└── tests/ # Test suite
- Python 3.11 or higher
- Azure OpenAI API access
- Azure DALL-E API access (optional, for image generation)
- SMTP server access (optional, for email features)
- Clone the repository:
git clone https://github.com/your-repo/DeckSmith.git
cd DeckSmith- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Configure environment variables:
cp .env.example .env
# Edit .env with your API keys and configuration- Run the application:
streamlit run main.py- Build and run with Docker Compose:
docker-compose up --build- Access the application at
http://localhost:8502
Create a .env file based on .env.example:
# Azure OpenAI (Required)
AZURE_OPENAI_API_KEY=your_key
AZURE_OPENAI_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_OPENAI_API_VERSION=2024-02-15-preview
AZURE_OPENAI_DEPLOYMENT_NAME=your_deployment
AZURE_OPENAI_MODEL_NAME=gpt-4
# Azure DALL-E (Optional)
AZURE_DALLE_API_KEY=your_dalle_key
AZURE_DALLE_ENDPOINT=https://your-resource.openai.azure.com/
AZURE_DALLE_API_VERSION=2024-02-15-preview
AZURE_DALLE_DEPLOYMENT_NAME=dall-e-3
# Authentication
DJANGO_BACKEND_URL=http://localhost:8000
FRONTENDURL=http://localhost:3000
API_KEY=your_secure_api_key
# Email (Optional)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=465
EMAIL_HOST_USER=your_email@gmail.com
EMAIL_HOST_PASSWORD=your_app_password
# Debug
DEBUG_MODE=false- Enter a description of your presentation topic
- Select a template
- Click "Generate Slide Deck"
- Download the generated PowerPoint file
- Upload PDF or Word documents
- Ask questions about the content
- Request email summaries if needed
# Run all tests
pytest tests/ -v
# Run with coverage
pytest tests/ -v --cov=. --cov-report=html# Run Ruff linter
ruff check .
# Run mypy type checker
mypy --ignore-missing-imports *.py
# Run Bandit security scanner
bandit -r . -x ./testsThe project uses:
- Ruff: Fast Python linter
- mypy: Static type checking
- Bandit: Security vulnerability scanner
- pytest: Testing framework
The slide generator creates a 12-slide presentation:
- Front Page
- Executive Summary (SCR framework)
- Key Point 1
- Key Point 2
- Key Point 3
- Recommendations (3 points)
- Conclusion
- Additional Examples (2 examples)
- Important Data
- Benefits
- Risks
- Final Conclusion
Documents are chunked and stored in a FAISS index for semantic search:
- Chunk size: 1000 characters
- Chunk overlap: 200 characters
- Embedding model: all-MiniLM-L6-v2
- Search returns top 5 results
- Input sanitization for all user inputs
- Email validation with regex
- API key authentication
- No hardcoded credentials
- Debug mode controlled via environment variable
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
- Add type hints to all functions
- Include docstrings for public functions
- Write tests for new features
- Follow existing code style
MIT License - see LICENSE file for details.
- Azure OpenAI for LLM capabilities
- Streamlit for the web framework
- FAISS for vector search
- LangChain for AI orchestration