- Input: User provides Repo URL + Date Range.
- GitHub Service (
services/githubService.ts):- Fetches the list of commits within the date range.
- Fetches detailed data (diffs/patches) for the top 50 commits to understand code changes.
- Gemini Analysis (
services/geminiService.ts):- The commit data (messages, authors, diff snippets) is packaged into a prompt.
- Model:
gemini-3-flash-previewis used for its large context window and reasoning speed. - Output: The model returns a structured JSON object containing:
htmlContent: Raw HTML string for the slide visual (using Tailwind classes).speakerNotes: A script for the presenter.pptxContent: Structured text data (titles, bullets) as a fallback.
- Presentation (
components/SlideViewer.tsx):- Renders the
htmlContentsafely inside a container. - Allows editing of local state (
slidesarray).
- Renders the
- Export (
services/pptService.ts):- High Fidelity: We render each slide into a hidden DOM container, use
html-to-imageto create a PNG, and place that PNG onto a PowerPoint slide usingpptxgenjs. This ensures the exported file looks exactly like the web app.
- High Fidelity: We render each slide into a hidden DOM container, use
- HTML Generation: Instead of asking the AI for a JSON schema that maps to specific React components (which limits design flexibility), we ask the AI to generate raw HTML strings with Tailwind classes. This allows Gemini to be creative with layouts, grids, and typography without us needing to maintain a library of slide templates.
- Security: HTML injection is generally dangerous. In this app, we assume the input comes strictly from the LLM. In a production environment with user sharing, sanitization (e.g.,
DOMPurify) would be mandatory. - Snapshot Export: PowerPoint's native rendering engine is very limited compared to CSS/HTML. To support gradients, rounded corners, and complex grids, we use the "Screenshot" approach for export.
/
├── components/ # React UI components
│ ├── ConfigForm.tsx # Input form
│ ├── SlideViewer.tsx # Main presentation view & editor
│ └── SlidePreview.tsx# Individual slide renderer
├── services/ # Logic layer
│ ├── geminiService.ts# AI interaction
│ ├── githubService.ts# GitHub API interaction
│ └── pptService.ts # Export logic
├── types.ts # TypeScript interfaces
├── App.tsx # Main entry controller
└── index.html # Entry point & Tailwind config