AI-Powered Presentation Engine
从主题到专业 PPTX,AI 研究引擎 + 自动生成
Features • Quick Start • How It Works • Configuration • Roadmap
- Web Search Integration: Claude's
web_searchtool for real-time data - Multi-query Strategy: 10+ targeted searches per topic
- Source Tracking: Every data point linked to its source
- Knowledge Fallback: Model knowledge when web search unavailable
- 16 Layout Types: metrics-grid, chart-focus, diagram, big-number, etc.
- 13 Theme Styles: Google, Amazon, Microsoft, Deloitte, PwC, Brand, Haio, etc.
- Smart Layout Selection: AI auto-selects best layout for content
- Visual Rhythm Enforcement: Prevents 3+ consecutive text-heavy slides
- Flowchart Support:
graph TDandgraph LRsyntax - Auto-layout: Dagre-based automatic positioning
- PPTX Export: Shapes + text, no image dependencies
- Next.js 16 with App Router
- React 19 with Server Components
- Zustand with undo/redo (50 steps)
- Prisma with SQLite/PostgreSQL
- NextAuth v5 for authentication
- Node.js 18+
- Anthropic API key (Claude)
# Clone the repository
git clone https://github.com/your-username/gammer.git
cd gammer
# Install dependencies
npm install
# Set up environment
cp .env.example .env
# Edit .env and add your ANTHROPIC_API_KEY
# Initialize database
npx prisma db push
# Start development server
npm run devOpen http://localhost:3000 to see the app.
npm run build
npm start┌─────────────┐ ┌──────────────┐ ┌─────────────┐
│ Topic │───▶│ Outline │───▶│ Slides │
│ Input │ │ Research │ │ Preview │
└─────────────┘ └──────────────┘ └─────────────┘
│ │
▼ ▼
┌──────────────┐ ┌─────────────┐
│ Web Search │ │ PPTX │
│ 10 queries │ │ Export │
└──────────────┘ └─────────────┘
- Topic → Outline: AI generates structured outline with research
- Outline → Slides: Stream-based slide generation with real-time preview
- Slides → PPTX: Professional PowerPoint export with theme styling
| Phase | Duration | Output |
|---|---|---|
| Research | 30-60s | Key stats, findings, sources |
| Outline | 10-20s | Page titles, bullets, layouts |
| Generation | 60-120s | Full slide content with metrics |
| Quality Check | 5-10s | Visual rhythm, data validation |
| PPTX Build | 5-10s | Binary .pptx file |
| Variable | Required | Description |
|---|---|---|
AI_BACKEND |
Yes | claude or gpt |
ANTHROPIC_API_KEY |
Yes* | Claude API key |
DATABASE_URL |
Yes | SQLite or PostgreSQL URL |
NEXTAUTH_SECRET |
Yes | Random string for JWT |
NEXTAUTH_URL |
No | Your app URL (auto-detected) |
* Only required when AI_BACKEND=claude (recommended)
Add custom themes in src/lib/themes.ts:
export const themes: Record<StyleTheme, ThemeConfig> = {
'my-brand': {
name: 'My Brand',
primary: '#1E40AF',
secondary: '#6B7280',
accent: '#F59E0B',
background: '#FFFFFF',
text: '#111827',
lightGray: '#F3F4F6',
},
};Add theme design in src/lib/theme-design.ts:
'my-brand': {
coverStyle: 'left-block',
accentPosition: 'left-bar',
preferredLayouts: ['metrics-grid', 'chart-focus', 'two-column'],
// ... see theme-design.ts for full options
},src/
├── app/ # Next.js App Router
│ ├── api/ # API routes (research, generate, export)
│ ├── create/ # Main editor page
│ ├── dashboard/ # Project list
│ └── edit/[id]/ # Edit existing project
├── components/
│ ├── SlideRenderer.tsx # Slide preview component
│ ├── MermaidDiagram.tsx # Mermaid rendering
│ └── ...
├── lib/
│ ├── ai-generator.ts # AI slide generation
│ ├── research-engine.ts # Web search + research
│ ├── pptx-engine.ts # PowerPoint rendering
│ └── ...
├── store/
│ └── presentation.ts # Zustand state with undo/redo
└── types/
└── next-auth.d.ts # Type extensions
- AI research engine
- 16 slide layouts
- 13 theme styles
- Mermaid diagram support
- Stream-based preview
- Undo/redo (50 steps)
- Image generation integration
- Thumbnail navigation in editor
- Bullet list editing
- Export history with re-download
- PostgreSQL support
- Team collaboration
- Template gallery
- PDF export
- Google Slides export
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Anthropic for Claude API
- pptxgenjs for PowerPoint generation
- Mermaid for diagram syntax
- Zustand for state management
Made with ❤️ by Your Name
