Skip to content

Comments

chore: add admin form#65

Merged
dan2k3k4 merged 13 commits intomainfrom
add-admin-form
Feb 19, 2026
Merged

chore: add admin form#65
dan2k3k4 merged 13 commits intomainfrom
add-admin-form

Conversation

@dan2k3k4
Copy link
Member

@dan2k3k4 dan2k3k4 commented Feb 9, 2026

Overview

  • Admin Creation: Administrators can now manually onboard users and create App Instances via the admin panel.
  • Dynamic Configuration: Introduces PolydockAppClassDiscovery to dynamically render configuration forms for both "Store Apps" and "App
    Instances" based on the selected App Class's defined schema.

Changes

  • feat(admin): Added CreatePolydockAppInstance page.
    • Form for user details and app selection.
    • Dynamic Fields: Renders instance-specific configuration fields defined by the App Class.
    • Supports custom key-value fields for webhooks.
    • Creates UserRemoteRegistration with admin_created: true
  • feat(admin): Updated PolydockStoreAppResource
    • Integrates PolydockAppClassDiscovery to list available App Classes.
    • Dynamic Fields: Renders and persists app-specific configuration fields (including encrypted values) defined by the App Class.
  • feat(core): Added PolydockAppClassDiscovery service.
    • Discovers PolydockAppInterface implementations.
    • Extracts form/infolist schemas using attributes (PolydockAppStoreFields, PolydockAppInstanceFields).
  • test: Added CreatePolydockAppInstanceTest and PolydockAppClassDiscoveryTest
  • chore: Updated polydock-* dependencies and added larastan

How to Test

  1. Store App Configuration

    1. Go to Polydock Store Apps -> Create/Edit
    2. Select a Polydock App Class
    3. Verify App-Specific Configuration fields appear and save correctly.
  2. Create App Instance

    1. Go to Polydock App Instances -> Create App Instance
    2. Fill user details and select a Store App
    3. Verify Instance Configuration fields appear (if applicable).
    4. Click Create and verify the instance is provisioned and the registration is marked as admin_created

@dan2k3k4 dan2k3k4 changed the base branch from dev to main February 9, 2026 17:25
@dan2k3k4 dan2k3k4 requested a review from bomoko February 9, 2026 17:26
@dan2k3k4 dan2k3k4 force-pushed the add-admin-form branch 5 times, most recently from cf036bc to c56a50b Compare February 15, 2026 11:08
@bomoko bomoko requested a review from Copilot February 19, 2026 00:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a dynamic admin form system that allows administrators to manually onboard users and create App Instances through the admin panel. The core feature is the PolydockAppClassDiscovery service, which discovers and validates Polydock App Classes and dynamically renders their configuration forms.

Changes:

  • Added PolydockAppClassDiscovery service for discovering and validating Polydock App Classes with dynamic form/infolist schema extraction
  • Created CreatePolydockAppInstance admin page with dynamic forms that render app-specific configuration fields
  • Updated PolydockStoreAppResource to dynamically render app-specific configuration fields using the discovery service
  • Added app_config JSON column to polydock_store_apps table and updated model with proper casting
  • Enhanced exception handling in PolydockEngineFunctionCallerTrait to log structured exception details instead of exception objects

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
app/Services/PolydockAppClassDiscovery.php New service that discovers PolydockAppInterface implementations and extracts form/infolist schemas from attributes
app/Filament/Admin/Resources/PolydockAppInstanceResource/Pages/CreatePolydockAppInstance.php New admin page for manually creating app instances with dynamic configuration forms
app/Filament/Admin/Resources/PolydockStoreAppResource.php Updated to integrate dynamic app-specific configuration fields
app/Filament/Admin/Resources/PolydockStoreAppResource/Pages/*.php Updated Create/Edit/View pages to handle app_config JSON field
app/Jobs/ProcessUserRemoteRegistration.php Added method to store instance config fields as PolydockVariables
app/PolydockEngine/Engine.php Added validation to ensure app class implements PolydockAppInterface
app/PolydockEngine/Traits/PolydockEngineFunctionCallerTrait.php Improved exception logging with structured context
app/Models/PolydockStoreApp.php Added app_config field with JSON casting
app/Models/PolydockAppInstance.php Added getName/setName methods
app/Models/User.php Updated groups() relationship to include pivot fields
app/Models/UserGroup.php Updated users() relationship to include pivot fields
database/migrations/2026_02_15_015738_add_app_config_to_polydock_store_apps_table.php Migration adding app_config JSON column
tests/Unit/Services/PolydockAppClassDiscoveryTest.php Comprehensive test suite for the discovery service
tests/Feature/Filament/CreatePolydockAppInstanceTest.php Test suite for admin instance creation
composer.json Updated polydock-* package dependencies and added larastan

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@bomoko bomoko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is useful and seems to work nicely. The logic around extra fields should be developed in the future, but this is a nice step in the right direction.

dan2k3k4 and others added 13 commits February 19, 2026 23:05
…schemas

- Introduced `PolydockAppClassDiscovery` service to dynamically locate and register `PolydockAppInterface` implementations via Composer classmaps.
- Enhanced Filament admin resources (`PolydockStoreApp` and `PolydockAppInstance`) to render dynamic forms and infolists based on class-defined schemas.
- Integrated `PolydockVariable` storage for app and instance-specific configurations, including support for field-level encryption.
- Updated the trial registration flow in `ProcessUserRemoteRegistration` to capture and store instance configuration fields.
- Added validation to `PolydockEngine` to ensure discovered classes correctly implement the required interfaces.
- Applied `declare(strict_types=1);` and improved type hinting across modified core files.
- Bumped `freedomtech-hosting` and `amazeeio` package dependencies to latest versions.
- Added comprehensive unit tests for the new discovery service.
…/CreatePolydockAppInstance.php

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@dan2k3k4 dan2k3k4 merged commit d0bf806 into main Feb 19, 2026
3 checks passed
@dan2k3k4 dan2k3k4 deleted the add-admin-form branch February 19, 2026 22:35
dan2k3k4 added a commit that referenced this pull request Feb 19, 2026
feat: add admin form & hide private ssh key (#62, #65)
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