diff --git a/log_plotly_chart.info.yml b/log_plotly_chart.info.yml
index 7f176bd..5719086 100644
--- a/log_plotly_chart.info.yml
+++ b/log_plotly_chart.info.yml
@@ -1,7 +1,7 @@
 name: 'Log Plotly Chart'
 type: module
 description: 'Displays a line chart with recent system logs using a local Plotly library.'
-core_version_requirement: ^11
+core_version_requirement: ^11.0 || ^12
 package: Custom
 configure: log_plotly_chart.settings
 dependencies:
diff --git a/log_plotly_chart.module b/log_plotly_chart.module
index 61309c7..805b7df 100644
--- a/log_plotly_chart.module
+++ b/log_plotly_chart.module
@@ -7,52 +7,15 @@
 
 declare(strict_types=1);
 
+use Drupal\Core\Hook\Attribute\LegacyHook;
+use Drupal\log_plotly_chart\Hook\LogPlotlyChartHooks;
 use Drupal\Core\Routing\RouteMatchInterface;
 
 /**
  * Implements hook_help().
  */
-function log_plotly_chart_help(string $route_name, RouteMatchInterface $route_match): ?string {
-  switch ($route_name) {
-    case 'help.page.log_plotly_chart':
-      $output = '';
-      $output .= '<h2>' . t('About Log Plotly Chart') . '</h2>';
-      $output .= '<p>' . t('This module displays a real-time line chart featuring the latest database log entries (dblog) grouped dynamically by category type using a local installation of the Plotly.js library.') . '</p>';
-      
-      $output .= '<h3>' . t('Directory Structure') . '</h3>';
-      $output .= '<pre>';
-      $output .= "modules/custom/log_plotly_chart/\n";
-      $output .= "├── log_plotly_chart.info.yml\n";
-      $output .= "├── log_plotly_chart.libraries.yml\n";
-      $output .= "├── log_plotly_chart.routing.yml\n";
-      $output .= "├── log_plotly_chart.links.menu.yml\n";
-      $output .= "├── log_plotly_chart.module\n";
-      $output .= "├── README.md\n";
-      $output .= "├── config/\n";
-      $output .= "│   └── install/\n";
-      $output .= "│       └── log_plotly_chart.settings.yml\n";
-      $output .= "├── css/\n";
-      $output .= "│   └── log_chart.css\n";
-      $output .= "├── src/\n";
-      $output .= "│   ├── Form/\n";
-      $output .= "│   │   └── SettingsForm.php\n";
-      $output .= "│   └── Plugin/\n";
-      $output .= "│       └── Block/\n";
-      $output .= "│           └── LogChartBlock.php\n";
-      $output .= "└── js/\n";
-      $output .= "    └── log_chart.js\n";
-      $output .= '</pre>';
-
-      $output .= '<h3>' . t('Requirements & Installation') . '</h3>';
-      $output .= '<p>' . t('1. Ensure the core <strong>Database Logging (dblog)</strong> module is enabled.') . '</p>';
-      $output .= '<p>' . t('2. Create a folder in your Drupal root directory at <code>/libraries/plotly/</code>.') . '</p>';
-      $output .= '<p>' . t('3. Download the minified production script <code>plotly-latest.min.js</code> and place it inside that folder.') . '</p>';
-      
-      $output .= '<h3>' . t('Styling and Customization') . '</h3>';
-      $output .= '<p>' . t('You can alter the line colors or layout typography directly without editing JavaScript by overriding the CSS Variables defined in the local <code>css/log_chart.css</code> stylesheet.') . '</p>';
-      
-      return $output;
-  }
-
-  return null;
+#[LegacyHook]
+function log_plotly_chart_help(string $route_name, RouteMatchInterface $route_match): ?string
+{
+    return \Drupal::service(LogPlotlyChartHooks::class)->help($route_name, $route_match);
 }
diff --git a/log_plotly_chart.services.yml b/log_plotly_chart.services.yml
new file mode 100644
index 0000000..2325503
--- /dev/null
+++ b/log_plotly_chart.services.yml
@@ -0,0 +1,5 @@
+
+services:
+  Drupal\log_plotly_chart\Hook\LogPlotlyChartHooks:
+    class: Drupal\log_plotly_chart\Hook\LogPlotlyChartHooks
+    autowire: true
diff --git a/src/Hook/LogPlotlyChartHooks.php b/src/Hook/LogPlotlyChartHooks.php
new file mode 100644
index 0000000..834e916
--- /dev/null
+++ b/src/Hook/LogPlotlyChartHooks.php
@@ -0,0 +1,58 @@
+<?php
+
+namespace Drupal\log_plotly_chart\Hook;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Hook\Attribute\Hook;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
+/**
+ * Hook implementations for log_plotly_chart.
+ */
+class LogPlotlyChartHooks
+{
+    use StringTranslationTrait;
+    /**
+     * Implements hook_help().
+     */
+    #[Hook('help')]
+    public function help(string $route_name, \Drupal\Core\Routing\RouteMatchInterface $route_match): ?string
+    {
+        switch ($route_name) {
+            case 'help.page.log_plotly_chart':
+                $output = '';
+                $output .= '<h2>' . $this->t('About Log Plotly Chart') . '</h2>';
+                $output .= '<p>' . $this->t('This module displays a real-time line chart featuring the latest database log entries (dblog) grouped dynamically by category type using a local installation of the Plotly.js library.') . '</p>';
+                $output .= '<h3>' . $this->t('Directory Structure') . '</h3>';
+                $output .= '<pre>';
+                $output .= "modules/custom/log_plotly_chart/\n";
+                $output .= "├── log_plotly_chart.info.yml\n";
+                $output .= "├── log_plotly_chart.libraries.yml\n";
+                $output .= "├── log_plotly_chart.routing.yml\n";
+                $output .= "├── log_plotly_chart.links.menu.yml\n";
+                $output .= "├── log_plotly_chart.module\n";
+                $output .= "├── README.md\n";
+                $output .= "├── config/\n";
+                $output .= "│   └── install/\n";
+                $output .= "│       └── log_plotly_chart.settings.yml\n";
+                $output .= "├── css/\n";
+                $output .= "│   └── log_chart.css\n";
+                $output .= "├── src/\n";
+                $output .= "│   ├── Form/\n";
+                $output .= "│   │   └── SettingsForm.php\n";
+                $output .= "│   └── Plugin/\n";
+                $output .= "│       └── Block/\n";
+                $output .= "│           └── LogChartBlock.php\n";
+                $output .= "└── js/\n";
+                $output .= "    └── log_chart.js\n";
+                $output .= '</pre>';
+                $output .= '<h3>' . $this->t('Requirements & Installation') . '</h3>';
+                $output .= '<p>' . $this->t('1. Ensure the core <strong>Database Logging (dblog)</strong> module is enabled.') . '</p>';
+                $output .= '<p>' . $this->t('2. Create a folder in your Drupal root directory at <code>/libraries/plotly/</code>.') . '</p>';
+                $output .= '<p>' . $this->t('3. Download the minified production script <code>plotly-latest.min.js</code> and place it inside that folder.') . '</p>';
+                $output .= '<h3>' . $this->t('Styling and Customization') . '</h3>';
+                $output .= '<p>' . $this->t('You can alter the line colors or layout typography directly without editing JavaScript by overriding the CSS Variables defined in the local <code>css/log_chart.css</code> stylesheet.') . '</p>';
+                return $output;
+        }
+        return null;
+    }
+}
