How avrabyt/fastdeck works
Project type and purpose
• Fastdeck is an open-source Python library (not a full-stack web app) whose primary purpose is to generate HTML slide decks programmatically.
• Key indicators:
• A fastdeck/ package with Presentation, Slide, Content modules.
• README shows a pure-Python API that outputs HTML.
• Tests under tests/, no “frontend” or “backend” services.
• Docs under docs/ and a GitHub Actions workflow to publish them.
File structure
Top-level:
• .github/workflows/docs.yaml – CI job to build and publish docs.
• fastdeck/ – core library code (modules: content.py, slide.py, presentation.py).
• tests/ – unit tests.
• docs/ – pre-generated HTML documentation and search script.
• resources/ – branding assets (logos).
• fastdeck_demo_output/ – example output HTML.
• setup.py, requirements.txt – packaging and dependencies.
README for additional insights
• Describes API usage: create Presentation, add Slide, attach Content, then save_html or to_html.
• Mentions integration points: Reveal.js under the hood, optional chart integration via Plotly, video iframes, images.
• Highlights that Fastdeck powers an external “Fastdeck AI” app (but that app is outside this repo).
Components and interactions
1. Client Code (User’s Python script)
2. Fastdeck Library
• Presentation module
• Slide module
• Content module
3. Dependencies
• Reveal.js (JS/CSS for slides)
• Plotly (optional graph embedding)
4. Output
• Generated HTML files (.html)
5. Documentation Pipeline
• GitHub Actions CI → builds docs → publishes to GitHub Pages
6. Resources
• resources/logos asset store
• Client Code → calls → Fastdeck API
• Presentation orchestrates → multiple Slide instances
• Slide uses → Content to render HTML fragments
• Fastdeck Library → bundles Reveal.js assets + content → writes HTML to disk
• (Optional) Client Code imports Plotly → generates JSON → passed into Content → included in HTML
• CI (docs.yaml) → runs Sphinx/Markdown on docs/ → pushes to GitHub Pages
c. Architectural patterns & principles:
• Modular design: clear separation of concerns among Presentation, Slide, and Content.
• Single responsibility: each class handles exactly one part of the slide-generation workflow.
• Extensibility points: ability to plug in new content types (charts, videos, images) via Content API.
• File-based I/O: no persistent database, simply generates static HTML.
• Python 3.x
• Reveal.js (static assets)
• Plotly (optional)
• GitHub Actions (CI/CD)
• pytest (testing)
• Sphinx/Markdown/HTML (docs)
Density and clarity
• Every essential element (API entry point, internal modules, external libraries, output).
• Don’t over-split: group related classes under a single “Fastdeck Library” container.