Skip to content

Conversation

@DJJones66
Copy link
Contributor

🔧 Pull Request: Refactor Initializers to Use GitHub-Based Plugin Installer

Summary

This PR introduces a major improvement to the user initialization process by replacing legacy hardcoded plugin initializers with a dynamic, GitHub-based plugin installation mechanism. It improves maintainability, consistency, and alignment with frontend logic for plugin management.


🧩 Changes Overview

✅ Replaced Hardcoded Initializers

  • Removed:

    • brain_drive_basic_ai_chat_initializer.py
    • brain_drive_settings_initializer.py
  • These files contained embedded plugin/module data that is now sourced directly from GitHub repositories.

🚀 Introduced GitHubPluginInitializer

🗂️ Modified Initializer Registry

  • Updated __init__.py in initializers/:

    • Replaced old imports with the new GitHub installer.
    • Commented out obsolete initializers.

🧠 Pages Initializer Updated

  • pages_initializer.py:

    • Now depends on github_plugin_initializer instead of brain_drive_basic_ai_chat_initializer.
    • Adjusted plugin/module lookup logic to reflect the BrainDriveChat plugin (GitHub-based).
    • Refactored layout generation for "AI Chat" page to work with the new dynamic structure.

📦 Other Changes

  • .gitignore: added backend/tests directory to prevent accidental commits of local test code.

✅ Benefits

  • Consistency: Uses the same backend logic as frontend for plugin installation.
  • Scalability: Easier to add or update plugins in the future.
  • Maintenance: Removes hardcoded plugin metadata from Python files.
  • User Experience: Ensures new users always get the latest plugin version from GitHub.

🧪 Testing & Validation

  • Verified that user registration correctly triggers plugin installation from GitHub.
  • Confirmed page initialization successfully creates dynamic layouts with BrainDriveChat plugin modules.
  • Ensured removed initializers no longer run.

⚠️ Notes

This change removes two initializers that were previously responsible for seeding plugin data from local JSON files. If fallback or offline modes are needed in the future, those features should be revisited separately.

@DJJones66 DJJones66 merged commit 6e70143 into main Aug 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants