Marketplace package catalogue

* Modules, themes, and extensions
* Publisher profiles and verification metadata
* Installed-package tracking
* Semantic version compatibility checks
* PHP, Laravel, and Content Manager compatibility checks
* Dependency resolution
* SHA-256 checksum validation
* Package signature requirements
* Installation and update history
* Enable and disable controls
* Removal handling
* Rollback records
* Licence records
* Marketplace administration UI
* Authenticated REST endpoints
* Console audit and synchronisation commands
* Permissions and sidebar integration
* Feature tests
This commit is contained in:
Mark Gregory
2026-07-24 13:49:14 +01:00
parent 673554d92d
commit f09a680531
29 changed files with 617 additions and 11 deletions
@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::create('marketplace_publishers', function (Blueprint $table) {
$table->id(); $table->string('name'); $table->string('slug')->unique(); $table->string('email')->nullable();
$table->string('website')->nullable(); $table->text('public_key')->nullable(); $table->boolean('is_verified')->default(false)->index();
$table->json('metadata')->nullable(); $table->timestamps();
});
Schema::create('marketplace_packages', function (Blueprint $table) {
$table->id(); $table->foreignId('publisher_id')->nullable()->constrained('marketplace_publishers')->nullOnDelete();
$table->string('type',30)->index(); $table->string('name'); $table->string('slug')->unique(); $table->string('package_name')->unique();
$table->text('description')->nullable(); $table->string('latest_version')->nullable(); $table->string('homepage')->nullable();
$table->string('repository_url')->nullable(); $table->string('download_url')->nullable(); $table->string('checksum',128)->nullable();
$table->text('signature')->nullable(); $table->json('manifest')->nullable(); $table->boolean('is_featured')->default(false)->index();
$table->boolean('is_active')->default(true)->index(); $table->timestamp('catalogue_updated_at')->nullable(); $table->timestamps();
});
Schema::create('marketplace_installed_packages', function (Blueprint $table) {
$table->id(); $table->foreignId('marketplace_package_id')->nullable()->constrained('marketplace_packages')->nullOnDelete();
$table->string('package_name')->unique(); $table->string('type',30)->index(); $table->string('version');
$table->string('status',30)->default('installed')->index(); $table->json('manifest')->nullable(); $table->string('checksum',128)->nullable();
$table->string('install_path')->nullable(); $table->boolean('is_enabled')->default(true)->index();
$table->foreignId('installed_by')->nullable()->constrained('users')->nullOnDelete(); $table->timestamp('installed_at')->nullable();
$table->timestamp('updated_at_marketplace')->nullable(); $table->timestamps();
});
Schema::create('marketplace_installations', function (Blueprint $table) {
$table->id(); $table->foreignId('installed_package_id')->nullable()->constrained('marketplace_installed_packages')->nullOnDelete();
$table->string('package_name')->index(); $table->string('operation',30)->index(); $table->string('from_version')->nullable();
$table->string('to_version')->nullable(); $table->string('status',30)->default('pending')->index(); $table->string('snapshot_path')->nullable();
$table->text('message')->nullable(); $table->json('context')->nullable(); $table->foreignId('performed_by')->nullable()->constrained('users')->nullOnDelete();
$table->timestamp('started_at')->nullable(); $table->timestamp('completed_at')->nullable(); $table->timestamps();
});
Schema::create('marketplace_licences', function (Blueprint $table) {
$table->id(); $table->foreignId('marketplace_package_id')->nullable()->constrained('marketplace_packages')->nullOnDelete();
$table->string('licence_key')->nullable(); $table->string('status',30)->default('inactive')->index(); $table->string('plan')->nullable();
$table->string('licensed_to')->nullable(); $table->timestamp('activated_at')->nullable(); $table->timestamp('expires_at')->nullable();
$table->json('metadata')->nullable(); $table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('marketplace_licences'); Schema::dropIfExists('marketplace_installations');
Schema::dropIfExists('marketplace_installed_packages'); Schema::dropIfExists('marketplace_packages'); Schema::dropIfExists('marketplace_publishers');
}
};