feat(plugins): add plugin framework for extending The Inventory - #187
Merged
Conversation
Introduce a plugin framework that turns The Inventory into a host for optional, self-contained Django apps. A plugin declares metadata by subclassing plugins.base.PluginConfig in its apps.py, can register DRF ViewSets / extra routes via an api_register module, and is loaded either through INSTALLED_APPS, the PLUGINS env var, or a the_inventory.plugins entry point exposed by an installed distribution. The framework reuses Django/Celery/Wagtail's existing auto-discovery instead of inventing new machinery: api_register modules are discovered the same way Wagtail discovers wagtail_hooks. - src/plugins/: discovery, registry, manager (dependency validation), versioning, settings helpers, management command, and a hello example. - Settings-time discovery appends discovered apps to INSTALLED_APPS; api/urls.py applies the populated registry before reading router.urls. - Convert the core domain apps (inventory, procurement, reports, sales) to PluginConfig with metadata and dependency declarations. - docs/plugins.md authoring guide + README link. - tests/plugins/: 30 tests covering registry, manager, settings, versioning, API. - gitignore stray default_*.sqlite3 test databases.
Ndevu12
force-pushed
the
feat/plugins-framework
branch
from
June 23, 2026 13:50
d7852ba to
48b698c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce a plugin framework that turns The Inventory into a host for optional, self-contained Django apps. A plugin declares metadata by subclassing plugins.base.PluginConfig in its apps.py, can register DRF ViewSets / extra routes via an api_register module, and is loaded either through INSTALLED_APPS, the PLUGINS env var, or a the_inventory.plugins entry point exposed by an installed distribution.
The framework reuses Django/Celery/Wagtail's existing auto-discovery instead of inventing new machinery: api_register modules are discovered the same way Wagtail discovers wagtail_hooks.
Type of Change
Checklist for Contributors
python manage.py testpasses locallypython manage.py checkreports no issuespython manage.py makemigrations --check --dry-runshows no missing migrationsruff check .) pass locally (if configured)README.md,CONTRIBUTING.md,docs/*.md)