Skip to content

Add a Modules page to Toolkit for listing and enabling/disabling project modules #544

Description

@armanist

Summary

Add a new Modules section to Toolkit that allows developers to view project modules and toggle their enabled/disabled state from the Toolkit UI.

This should be the first step toward module management inside Toolkit.

Why

Toolkit already provides a web UI for several developer-oriented features such as:

  • database access
  • logs
  • emails

Module state is already modeled in the project through shared/config/modules.php, where each module has configuration such as:

  • prefix
  • enabled

ModuleLoader already uses that configuration to determine which modules should be loaded.

That makes Toolkit a reasonable place to expose a simple module-management UI instead of requiring developers to edit the module config file manually for basic enable/disable changes.

Goal

Add a Toolkit page that lists project modules and allows their enabled/disabled state to be toggled from the UI.

Scope

This first version should focus on:

  • listing modules from shared/config/modules.php
  • showing key module information such as module name, prefix, and enabled state
  • allowing enable/disable toggling

It should not yet try to handle broader module management concerns such as:

  • editing module prefixes
  • creating modules
  • deleting modules
  • installing modules from Toolkit

Proposed Direction

Add a new Toolkit menu/page

Add a new Toolkit navigation item:

  • Modules

and a corresponding Toolkit page for module management.

Use shared/config/modules.php as the source of truth

The page should use shared/config/modules.php as the canonical source of module state.

Optional diagnostics can later compare config entries with actual module directories on disk, but config should remain the primary source for this feature.

Support enable/disable toggling

Allow users to toggle the enabled flag for modules from the Toolkit UI.

This should update the module config file in a controlled way so the change is reflected in subsequent requests/module loading.

Protect Toolkit from self-disable

Toolkit should not allow disabling the Toolkit module from inside its own UI.

That row should be protected or non-toggleable to avoid locking users out of the feature immediately.

Acceptance Criteria

  • Toolkit has a new Modules page
  • the Modules page lists modules from shared/config/modules.php
  • the page shows at least module name, prefix, and enabled state
  • users can enable or disable modules from the Toolkit UI
  • Toolkit cannot be disabled from inside its own Modules page
  • updated module state is persisted back to shared/config/modules.php
  • the feature integrates cleanly with existing Toolkit navigation and structure

Notes

Relevant code:

  • src/Module/Templates/Toolkit/src/routes/routes.php.tpl
  • src/Module/Templates/Toolkit/src/Views/partials/navbar.php.tpl
  • src/Module/Templates/Toolkit/src/Controllers
  • src/Module/Templates/Toolkit/src/Services
  • src/Module/ModuleLoader.php
  • src/Module/ModuleManager.php

Project-side state involved:

  • shared/config/modules.php

Metadata

Metadata

Assignees

No one assigned

    Labels

    modulesModule system and module templatestoolkitToolkit module and developer UI
    No fields configured for Feature.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions