Skip to content

TyCoding/langchat-slides

Repository files navigation

LangChat Slides - Next-Gen AI Slide Generator

LangChat Slides is an intelligent slide generation tool powered by Generative AI. Built by the LangChat Team.

LangChat Slides Demo

License

Website Β· Preview Β· Documentation Β· GitHub Β· Report Bug

πŸ‡¨πŸ‡³ δΈ­ζ–‡ζ–‡ζ‘£ | English README


πŸ“– About LangChat Pro

LangChat Pro is an enterprise-level AIGC (AI Generated Content) platform, a full-stack AI application system based on Spring Boot 3 + LangChain4j + Vue3 + VueFlow.

LangChat Slides is one of the flagship products of LangChat Pro, leveraging the powerful model capabilities of LangChat and the visualization engine of @antv/infographic. Users can simply input natural language descriptions to instantly generate clear, well-designed infographic slides.


πŸ’Ž About LangChat Pro Commercial Edition

LangChat Pro is an enterprise-grade AIGC application development platform commercial edition built on the Java ecosystem, providing enterprises with complete AI large model integration solutions. Built on Spring Boot 3 and Vue 3, it supports rapid development of intelligent knowledge bases, multimodal AI applications, and intelligent workflows, helping enterprises achieve AI-driven digital transformation.

Official Website: http://langchat.cn/

Open Source Edition: https://github.com/tycoding/langchat (Basic features)

Commercial Edition Consultation: Add WeChat LangchainChat (Note: Company Name + [Consultation Content])

workflows

✨ Features

  • ⚑️ Real-time Streaming Generation: What you see is what you get - slides render instantly as the AI thinks
  • 🎨 Intelligent Layout Design: Based on declarative visualization syntax, automatically adapts to the best layout,ε‘Šεˆ«ηΉηηš„ PPT ζ‹–ζ‹½
  • πŸ’¬ Conversational Editing: Not satisfied? Just tell the AI "change the title to red" or "add a timeline" and see immediate results
  • 🧩 Modular Components: Based on Shadcn UI and Tailwind CSS, featuring a modern, minimal, and premium user experience
  • πŸ“€ Easy Export: One-click PDF export to easily share your creativity

🎯 Use Cases

  • Quick Reports: Generate project progress report pages in minutes
  • Knowledge Popularization: Transform complex concepts into timelines, lists, or hierarchy diagrams
  • Data Presentation: Visual representation of structured data

πŸ› οΈ Tech Stack

Frontend

  • Framework: Vue 3 (Composition API) + TypeScript
  • Styling: Tailwind CSS v4, shadcn-vue (UI Components)
  • State Management: Pinia
  • Icons: Lucide Vue Next
  • Visualization: @antv/infographic
  • Export: html2canvas + jspdf

AI Integration

  • OpenAI SDK: Direct frontend integration with streaming support
  • Vercel AI SDK: Helper utilities (optional)

Development Tools

  • Build Tool: Vite 7
  • Package Manager: pnpm
  • Code Quality: TypeScript strict mode, ESLint

πŸ“ Project Structure

langchat-slides/
β”œβ”€β”€ docs/                    # Documentation
β”‚   β”œβ”€β”€ PRODUCT.md           # Product introduction
β”‚   └── REQUIREMENTS.md      # Requirements & implementation
β”œβ”€β”€ public/                  # Static assets
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/                 # API integration
β”‚   β”‚   └── ai.ts           # OpenAI API wrapper
β”‚   β”œβ”€β”€ assets/
β”‚   β”‚   └── prompts/        # System prompts
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ chat/           # Chat components
β”‚   β”‚   β”œβ”€β”€ slides/         # Slide components
β”‚   β”‚   β”œβ”€β”€ layout/         # Layout components
β”‚   β”‚   └── ui/             # UI components (shadcn-vue)
β”‚   β”œβ”€β”€ composables/        # Vue composables
β”‚   β”œβ”€β”€ lib/                # Utility functions
β”‚   β”œβ”€β”€ locales/            # i18n translations
β”‚   β”œβ”€β”€ stores/             # Pinia stores
β”‚   └── types/              # TypeScript definitions
β”œβ”€β”€ Dockerfile              # Docker configuration
β”œβ”€β”€ docker-compose.yml      # Docker Compose configuration
β”œβ”€β”€ package.json
└── vite.config.ts

πŸš€ Quick Start

Prerequisites

  • Node.js >= 20.x
  • pnpm >= 8.x
  • OpenAI API Key

Local Development

  1. Clone the repository

    git clone https://github.com/langchat/langchat-slides.git
    cd langchat-slides
  2. Install dependencies

    pnpm install
  3. Configure environment variables

    cp .env.example .env
    # Edit .env and add your OpenAI API key
  4. Start development server

    pnpm dev

    Access at http://localhost:5173

  5. Build for production

    pnpm build

🐳 Docker Deployment

Using Docker Compose (Recommended)

  1. Clone the repository

    git clone https://github.com/langchat/langchat-slides.git
    cd langchat-slides
  2. Configure environment variables

    cp .env.example .env
    # Edit .env and add your OpenAI API key
  3. Build the Docker image

    docker-compose build
  4. Start with Docker Compose

    docker-compose up -d

    The application will be available at http://localhost:5173

  5. View logs

    docker-compose logs -f
  6. Stop the service

    docker-compose down

Using Docker directly

  1. Build the Docker image

    docker build -t langchat-slides .
  2. Run the container

    docker run -d \
      --name langchat-slides \
      -p 5173:5173 \
      -e VITE_OPENAI_API_KEY=your-api-key \
      langchat-slides

🌐 Environment Variables

Create a .env file in the root directory:

# OpenAI Configuration
VITE_OPENAI_API_KEY=sk-your-api-key-here
VITE_OPENAI_MODEL=gpt-4o

# Application Configuration
VITE_APP_LOCALE=en
VITE_APP_THEME=auto

πŸ“– Usage Guide

Creating Slides

  1. Describe your needs: Type your slide requirements in natural language

    • Example: "Create a timeline showing the history of AI from 1950 to 2024"
  2. Real-time generation: Watch as AI generates and renders slides in real-time

  3. Iterative refinement: Chat with AI to make adjustments

    • "Change the color theme to blue"
    • "Add more details about machine learning"
    • "Make the timeline horizontal"
  4. Export: Click the export button to download as PDF

Features

  • Multi-page slides: Generate multiple slides with thumbnail navigation
  • Customization: Modify layouts, colors, and content through conversation
  • Export options: Save as PDF or image format
  • Theme support: Light/Dark modes with multiple color themes

πŸ—οΈ Architecture

Component Architecture

App.vue (Main Layout)
β”œβ”€β”€ Header
β”‚   β”œβ”€β”€ Logo
β”‚   β”œβ”€β”€ Theme Toggle
β”‚   └── Language Switcher
β”œβ”€β”€ ResizablePanelGroup
β”‚   β”œβ”€β”€ Chat Area
β”‚   β”‚   β”œβ”€β”€ ChatContainer
β”‚   β”‚   β”‚   β”œβ”€β”€ ChatMessage (User/AI)
β”‚   β”‚   β”‚   └── ChatInput
β”‚   β”‚   └── ExampleGenerator
β”‚   └── Slide Area
β”‚       β”œβ”€β”€ SlidesContainer
β”‚       β”‚   β”œβ”€β”€ SlidePreview
β”‚       β”‚   └── SlideThumbnail
β”‚       └── SlideToolbar
└── SettingsDialog

Data Flow

User Input β†’ ChatInput β†’ OpenAI API (Stream)
              ↓
         Parse Markdown
              ↓
         Extract Infographic Syntax
              ↓
         Update Pinia Store
              ↓
         Reactive Render in SlidePreview
              ↓
         Export (html2canvas β†’ jspdf)

🀝 Contributing

We welcome contributions! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

πŸ“§ Contact

πŸ™ Acknowledgments

  • OpenAI for providing powerful AI models
  • AntV for the infographic visualization engine
  • Vue.js for the reactive framework
  • Shadcn for beautiful UI components
  • Tailwind CSS for utility-first styling

Developed with ❀️ by LangChat Team

About

LangChat Slides - Next-Gen AI Slide Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published