mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 05:35:30 +02:00
[PR #953] [CLOSED] feat: plugin system with OctoPrint converter and PrettyGCode viewer #1136
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#1136
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/953
Author: @Soopahfly
Created: 4/12/2026
Status: ❌ Closed
Base:
dev← Head:feature/plugin-system📝 Commits (1)
5e49c61feat: add plugin system with OctoPrint converter and PrettyGCode viewer📊 Changes
40 files changed (+17571 additions, -10 deletions)
View changed files
📝
.gitignore(+6 -0)➕
backend/app/api/routes/plugins.py(+365 -0)📝
backend/app/core/config.py(+2 -0)📝
backend/app/core/database.py(+1 -0)📝
backend/app/main.py(+51 -9)➕
backend/app/models/plugin.py(+22 -0)➕
backend/app/plugins/__init__.py(+0 -0)➕
backend/app/plugins/base.py(+208 -0)➕
backend/app/plugins/loader.py(+166 -0)➕
backend/app/plugins/octoprint_converter.py(+520 -0)➕
backend/app/plugins/registry.py(+164 -0)📝
docker-compose.yml(+4 -0)📝
frontend/src/App.tsx(+2 -0)📝
frontend/src/api/client.ts(+73 -0)📝
frontend/src/components/Layout.tsx(+2 -1)➕
frontend/src/components/PluginsSettings.tsx(+548 -0)📝
frontend/src/i18n/locales/en.ts(+53 -0)➕
frontend/src/pages/PluginsPage.tsx(+9 -0)➕
plugins/.gitkeep(+0 -0)➕
plugins/example_plugin/__init__.py(+87 -0)...and 20 more files
📄 Description
Description
Adds a first-class plugin system to Bambuddy, allowing users to install, enable/disable, and configure plugins — including automatic conversion of existing OctoPrint plugins.
Ships with a bundled PrettyGCode plugin as a reference implementation: a full 3D GCode viewer with layer sync and nozzle animation driven by Bambu MQTT data.
Related Issue
Fixes #952
Documentation
Companion docs PRs (delete lines that don't apply):
Pick one:
Type of Change
Changes Made
Backend (
backend/app/plugins/)data/plugins/on startup, registers to DB, loads enabled pluginsStartupPlugin,ShutdownPlugin,EventHandlerPlugin,SettingsPlugin,AssetPlugin,SimpleApiPluginPluginRecordDB model (added via existinginit_db()path, no migration required)/api/v1/plugins) — list, upload/analyse/install, enable/disable, get/set settings, static asset serving, SimpleApiPlugin command dispatchoctoprint_converter.py) — AST-based; maps supported mixins 1:1, stubs unsupported ones with commentson_print_start,on_print_complete, archive creation, app startup/shutdowndocker-compose.yml—./plugins:/app/data/pluginsvolume so plugins survive image rebuildsconfig.py—plugins_dirsetting, preserves_external_db_urlfrom devFrontend
Pluginssidebar nav item (Packageicon,/pluginsroute, between Notifications and Settings)PluginsSettingscomponent — plugin cards with enable toggle, inline settings editor, "Open Viewer" button for plugins withstatic/index.html.zip, detects Bambuddy vs OctoPrint, previews mixin support and generated code before confirming installPrettyGCode plugin (
plugins/prettygcode/)/api/v1/plugins/prettygcode/assets/index.htmlbambuddy_adapter.jsbridges OctoPrint ViewModel/Knockout API to Bambuddy WebSocket + RESTlayer_num → byte offsetmap;layer_numfrom MQTT drivesfileposinto prettygcode's existingsyncGcodeObjToFilePos()Send:log entries — works around Bambu not exposing GCode serial echoScreenshots
Plugins sidebar and card view:
PrettyGCode viewer:
(Screenshots available on request — running locally against an X1C)
Testing
Checklist
Additional Notes
plugins/prettygcode/static JS files are third-party libs bundled from the original OctoPrint-PrettyGCode repo (MIT). Happy to exclude them and use CDN links instead if bundling large vendor files is a concern.# TODOcomment for anything it can't safely map.mainwithout an issue). This submission is againstdevwith the issue linked.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.