Created on 6 August 2025, 7 days ago

Project Description

https://www.drupal.org/project/dify →
Dify Integration for Drupal integrates the Dify AI platform with Drupal to provide AI-powered chatbots that answer questions based on site content.

Key Features:

  • Search API backend for indexing Drupal content to Dify knowledge base
  • Official Dify widget integration
  • Custom chatbot widget with streaming responses
  • AI-enhanced search results

What makes it different:

  • Official authorization from LangGenius Inc. (Dify creators)
  • Content-aware AI responses based on actual site content (not generic chatbot)
  • Multiple integration options (official widget + custom widget + search enhancement)

Security:

  • Credentials stored in Drupal state system (never exported)
  • Respects Drupal access control
  • Authentication restrictions available
  • Input sanitization for API calls

Who i am

Experience: 10+ years Drupal, Team Leader Drupal at Adimeo https://www.drupal.org/u/asterovim →

📌 Task
Status

Needs review

Component

module

Created by

🇫🇷France Asterovim Paris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Asterovim
  • 🇫🇷France Asterovim Paris
  • 🇮🇳India vishal.kadam Mumbai
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Thank you for applying!

    Please read Review process for security advisory coverage: What to expect → for more details and Security advisory coverage application checklist → to understand what reviewers look for. Tips for ensuring a smooth review → gives some hints for a smoother review.

    The important notes are the following.

    • If you have not done it yet, enable GitLab CI for the project, and fix what reported from the phpcs job. This help to fix most of what reviewers would report.
    • For the time this application is open, only your commits are allowed. No other people, including other maintainers/co-maintainers can make commits.
    • The purpose of this application is giving you a new drupal.org role that allows you to opt projects into security advisory coverage, either projects you already created, or projects you will create. The project status won't be changed by this application.
    • Nobody else will get the permission to opt projects into security advisory policy. If there are other maintainers/co-maintainers who will to get that permission, they need to apply with a different module.
    • We only accept an application per user. If you change your mind about the project to use for this application, or it is necessary to use a different project for the application, please update the issue summary with the link to the correct project and the issue title with the project name and the branch to review.

    To the reviewers

    Please read How to review security advisory coverage applications → , Application workflow → , What to cover in an application review → , and Tools to use for reviews → .

    The important notes are the following.

    • It is preferable to wait for a Code Review Administrator before commenting on newly created applications. Code Review Administrators will do some preliminary checks that are necessary before any change on the project files is suggested.
    • Reviewers should show the output of a CLI tool → only once per application. The configuration used for these tools needs to be the same configuration used by GitLab CI, stored in the GitLab Templates repository.
    • It may be best to have the applicant fix things before further review.

    For new reviewers, I would also suggest to first read In which way the issue queue for coverage applications is different from other project queues → .

  • 🇮🇳India vishal.kadam Mumbai

    1. FILE: dify.info.yml

    core_version_requirement: ^9 || ^10 || ^11

    FILE: modules/dify_augmented_search/dify_augmented_search.info.yml

    core_version_requirement: ^9 || ^10 || ^11

    FILE: modules/dify_search_api/dify_search_api.info.yml

    core_version_requirement: ^9 || ^10 || ^11

    FILE: modules/dify_widget_official/dify_widget_official.info.yml

    core_version_requirement: ^9 || ^10 || ^11

    FILE: modules/dify_widget_vanilla/dify_widget_vanilla.info.yml

    core_version_requirement: ^9 || ^10 || ^11

    A new project should not declare itself compatible with a Drupal release that is no longer supported. No site should be using Drupal 8 nor Drupal 9, and people should not be encouraged to use those Drupal releases.

    2. FILE: dify.links.menu.yml

    File is empty and can be removed.

    FILE: dify.module,
    FILE: modules/dify_search_api/dify_search_api.module

    Only one hook is present in file but it is empty and can be removed.

    3. FILE: src/DifyClient.php

      /**
       * Creates a new Guzzle client.
       *
       * @param string $base_url
       *   The base URL of the Dify API.
       * @param string $authorization_token
       *   The authorization token to use for requests.
       */
      public function __construct(string $base_url, string $authorization_token) {

    The documentation comment for constructors is not mandatory anymore, If it is given, the description must be “Constructs a new [class name] object”, where [class name] includes the class namespace.

    4. FILE: modules/dify_augmented_search/dify_augmented_search.module

    /**
     * @file
     * Dify Augmented Search module hooks.
     */

    FILE: modules/dify_widget_official/dify_widget_official.module

    /**
     * @file
     * Dify official widget module hooks.
     */

    FILE: modules/dify_widget_vanilla/dify_widget_vanilla.module

    /**
     * @file
     * Dify Widget Vanilla module.
     *
     * Floating chatbot widget with direct Dify API integration.
     */

    The usual description for a .module file is “Hook implementations for the [module name] module”, where [module name] is the module name given in the .info.yml file.

    5. FILE: modules/dify_widget_vanilla/templates/dify-widget-vanilla.html.twig

    <style>
    :root {
      --dify-primary-color: {{ custom_colors['primary-color'] }};
      --dify-primary-hover: {{ custom_colors['primary-hover'] }};
      --dify-primary-light: {{ custom_colors['primary-light'] }};
      --dify-background-main: {{ custom_colors['background-main'] }};
      --dify-background-secondary: {{ custom_colors['background-secondary'] }};
      --dify-background-tertiary: {{ custom_colors['background-tertiary'] }};
      --dify-background-input: {{ custom_colors['background-input'] }};
      --dify-text-primary: {{ custom_colors['text-primary'] }};
      --dify-text-secondary: {{ custom_colors['text-secondary'] }};
      --dify-text-muted: {{ custom_colors['text-muted'] }};
      --dify-text-placeholder: {{ custom_colors['text-placeholder'] }};
      --dify-border-color: {{ custom_colors['border-color'] }};
      --dify-border-light: {{ custom_colors['border-light'] }};
      --dify-user-message-bg: {{ custom_colors['user-message-bg'] }};
      --dify-bot-message-bg: {{ custom_colors['bot-message-bg'] }};
      --dify-error-bg: {{ custom_colors['error-bg'] }};
      --dify-error-text: {{ custom_colors['error-text'] }};
      --dify-notification-color: {{ custom_colors['notification-color'] }};
      --dify-success-color: {{ custom_colors['success-color'] }};
      --dify-warning-color: {{ custom_colors['warning-color'] }};
    }
    </style>

    Move styles (CSS) into a library and attach them. See the process here → .

  • 🇫🇷France Asterovim Paris
  • 🇫🇷France Asterovim Paris
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    I will review the project in the next 24 hours, if nobody beats me.

Production build 0.71.5 2024