quantum-php / quantum-php/framework

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

Open
#544 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

modules toolkit
Dominant language
PHP
Stars
36
Forks
22
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/Module/Templates/Toolkit/src/routes/routes.php.tpl and navbar.php.tpl to understand Toolkit navigation, then inspect its Controllers and Services. Read src/Module/ModuleLoader.php, src/Module/ModuleManager.php, and shared/config/modules.php to trace module state. Done means a Modules page lists name, prefix, and enabled state, persists toggles, and prevents Toolkit from being disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.