๐Ÿ“ฆ Petrus-Han / dify-usecase-playground

A playground of real-world Dify use cases, workflow patterns, and DSL examples. This repository collects practical scenarios built during my exploration of Dify, covering triggers, agents, tools, and production-ready workflow designs.

โ˜… 2 stars โ‘‚ 0 forks ๐Ÿ‘ 2 watching โš–๏ธ Apache License 2.0
๐Ÿ“ฅ Clone https://github.com/Petrus-Han/dify-usecase-playground.git
HTTPS git clone https://github.com/Petrus-Han/dify-usecase-playground.git
SSH git clone git@github.com:Petrus-Han/dify-usecase-playground.git
CLI gh repo clone Petrus-Han/dify-usecase-playground
Petrus Han Petrus Han fix: correct gitleaks-action configuration and remove problematic regexTarget 6055f6d 1 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ usecases
๐Ÿ“„ .gitattributes
๐Ÿ“„ .gitignore
๐Ÿ“„ .gitleaks.toml
๐Ÿ“„ CONTRIBUTING.md
๐Ÿ“„ LICENSE
๐Ÿ“„ README.ja.md
๐Ÿ“„ README.md
๐Ÿ“„ README.zh-Hans.md
๐Ÿ“„ README.zh-Hant.md
๐Ÿ“„ SECURITY.md
๐Ÿ“„ README.md

Dify Use Case Playground

๐ŸŽฏ A collection of real-world Dify workflow DSL examples and use cases

English | ็ฎ€ไฝ“ไธญๆ–‡ | ็น้ซ”ไธญๆ–‡ | ๆ—ฅๆœฌ่ชž


Introduction

Dify Use Case Playground is a personal open-source repository that collects practical Dify workflow DSL examples and use cases. This repository serves as a learning resource and reference for building production-ready workflows using Dify's workflow engine.

What's Inside

This repository contains:

  • ๐Ÿ“‹ Workflow DSL Files (.yml) - Complete workflow definitions ready to import into Dify
  • ๐Ÿ“– Documentation (README.md) - Detailed explanations for each use case
  • ๐ŸŽจ Best Practices - Real-world patterns and solutions

Features

  • โœ… Production-ready workflows
  • โœ… Comprehensive documentation
  • โœ… Easy to import and customize
  • โœ… Real-world use cases
  • โœ… Best practices and patterns
  • ๐Ÿ”’ Security: Automated secret scanning via CI/CD

Use Cases

๐Ÿค– Automation

๐Ÿ’ฌ Chatbots & Assistants

Getting Started

  • Browse Use Cases
  • Explore the usecases/ directory
  • Each use case has its own folder with a workflow.yml and README.md
  • Import a Workflow
  • Open Dify console
  • Import the .yml file from the use case folder
  • Follow the setup instructions in the use case README
  • Customize
  • Modify the workflow according to your needs
  • Update configuration parameters
  • Test and deploy

Directory Structure

.
โ”œโ”€โ”€ README.md                 # This file (English)
โ”œโ”€โ”€ README.zh-Hans.md         # Simplified Chinese
โ”œโ”€โ”€ README.zh-Hant.md         # Traditional Chinese
โ”œโ”€โ”€ README.ja.md              # Japanese
โ”œโ”€โ”€ LICENSE                   # Apache 2.0 License
โ”œโ”€โ”€ .gitignore               # Git ignore rules
โ”œโ”€โ”€ .gitleaks.toml          # Secret scanning configuration
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ”œโ”€โ”€ secret-scanning.yml      # CI/CD secret scanning workflow
โ”‚       โ””โ”€โ”€ code-language-check.yml  # CI/CD language check workflow
โ””โ”€โ”€ usecases/                 # Use case collection
    โ”œโ”€โ”€ daily-news-slack/
    โ”‚   โ”œโ”€โ”€ workflow.yml      # Workflow DSL file
    โ”‚   โ””โ”€โ”€ README.md         # Use case documentation (English)
    โ””โ”€โ”€ slack-news-researcher/
        โ”œโ”€โ”€ workflow.yml      # Workflow DSL file
        โ””โ”€โ”€ README.md         # Use case documentation (English)

Requirements

  • Dify platform access
  • Required plugins and API keys (see individual use case READMEs)

Security

๐Ÿ”’ This repository uses automated secret scanning to prevent accidental commits of sensitive information:

  • CI/CD Integration: GitHub Actions workflow automatically scans for secrets on every push and pull request
  • Tools Used:
  • Gitleaks - Comprehensive secret detection
  • Custom pattern matching for common sensitive data
  • What's Checked: API keys, tokens, passwords, webhook URLs, AWS keys, Slack tokens, and more
Important: Never commit sensitive information like API keys, tokens, or credentials. Use environment variables or secure configuration management instead.

Code Language Policy

๐ŸŒ This project maintains an international positioning.

  • โœ… Code files may contain Chinese or other languages - Encouraged for internationalization (i18n) support
  • โœ… i18n fields (zh_Hans, zh_Hant, ja_JP, pt_BR, etc.) in Dify workflow files are fully supported
  • โœ… Git commit messages must be in English - To maintain international project positioning
  • โœ… Pull request titles and descriptions must be in English - For global collaboration
  • ๐Ÿ“– Documentation files are available in multiple languages (English, Simplified Chinese, Traditional Chinese, Japanese)
Note: CI checks enforce English for git commit messages and PR content, but allow any language in code files for internationalization purposes.

Contributing

This is a personal project, but suggestions and feedback are welcome! Feel free to:

  • Open issues for bugs or feature requests
  • Submit pull requests with improvements
  • Share your own use cases

Branch Protection

This repository uses branch protection rules to maintain code quality:

  • All changes must go through Pull Requests
  • PRs require at least one approval before merging
  • All CI checks must pass before merging
  • Direct pushes to main branch are disabled
See Branch Protection Setup Guide for details on configuring these rules.

License

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


Author

Personal project by @petrus


Note: This repository is maintained as a personal learning and reference resource. Use cases are based on real-world scenarios and may require customization for your specific needs.