Scaffold Ladill Woo Manager for WooCommerce order fulfillment.
Deploy Ladill Woo Manager / deploy (push) Failing after 2s

Standalone app with SSO shell, WordPress plugin connect flow, webhook ingest,
fulfillment inbox, and plugin activation API — no payment processing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-06 22:39:38 +00:00
co-authored by Cursor
commit ffe0b9d877
326 changed files with 33210 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
*.sqlite*
+46
View File
@@ -0,0 +1,46 @@
<?php
namespace Database\Factories;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Str;
/**
* @extends Factory<User>
*/
class UserFactory extends Factory
{
/**
* The current password being used by the factory.
*/
protected static ?string $password;
/**
* Define the model's default state.
*
* @return array<string, mixed>
*/
public function definition(): array
{
return [
'public_id' => (string) Str::uuid(),
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
];
}
/**
* Indicate that the model's email address should be unverified.
*/
public function unverified(): static
{
return $this->state(fn (array $attributes) => [
'email_verified_at' => null,
]);
}
}
@@ -0,0 +1,52 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
// Local mirror of the platform identity, keyed by public_id (OIDC sub).
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->uuid('public_id')->unique();
$table->string('name')->nullable();
$table->string('email')->unique();
$table->string('avatar_url')->nullable();
$table->timestamp('email_verified_at')->nullable();
$table->string('password')->nullable();
$table->rememberToken();
$table->timestamps();
});
Schema::create('password_reset_tokens', function (Blueprint $table) {
$table->string('email')->primary();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
Schema::create('sessions', function (Blueprint $table) {
$table->string('id')->primary();
$table->foreignId('user_id')->nullable()->index();
$table->string('ip_address', 45)->nullable();
$table->text('user_agent')->nullable();
$table->longText('payload');
$table->integer('last_activity')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('users');
Schema::dropIfExists('password_reset_tokens');
Schema::dropIfExists('sessions');
}
};
@@ -0,0 +1,35 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('cache', function (Blueprint $table) {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration')->index();
});
Schema::create('cache_locks', function (Blueprint $table) {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration')->index();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};
@@ -0,0 +1,57 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('jobs', function (Blueprint $table) {
$table->id();
$table->string('queue')->index();
$table->longText('payload');
$table->unsignedTinyInteger('attempts');
$table->unsignedInteger('reserved_at')->nullable();
$table->unsignedInteger('available_at');
$table->unsignedInteger('created_at');
});
Schema::create('job_batches', function (Blueprint $table) {
$table->string('id')->primary();
$table->string('name');
$table->integer('total_jobs');
$table->integer('pending_jobs');
$table->integer('failed_jobs');
$table->longText('failed_job_ids');
$table->mediumText('options')->nullable();
$table->integer('cancelled_at')->nullable();
$table->integer('created_at');
$table->integer('finished_at')->nullable();
});
Schema::create('failed_jobs', function (Blueprint $table) {
$table->id();
$table->string('uuid')->unique();
$table->text('connection');
$table->text('queue');
$table->longText('payload');
$table->longText('exception');
$table->timestamp('failed_at')->useCurrent();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('jobs');
Schema::dropIfExists('job_batches');
Schema::dropIfExists('failed_jobs');
}
};
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->text('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable()->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('personal_access_tokens');
}
};
@@ -0,0 +1,25 @@
<?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('notifications', function (Blueprint $table) {
$table->uuid('id')->primary();
$table->string('type');
$table->morphs('notifiable');
$table->text('data');
$table->timestamp('read_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('notifications');
}
};
@@ -0,0 +1,39 @@
<?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('mini_payments', function (Blueprint $table) {
$table->id();
$table->foreignId('qr_code_id')->constrained('qr_codes')->cascadeOnDelete();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('reference', 32)->unique();
$table->unsignedInteger('amount_minor');
$table->string('currency', 3)->default('GHS');
$table->unsignedInteger('platform_fee_minor')->default(0);
$table->unsignedInteger('merchant_amount_minor')->default(0);
$table->string('payer_name')->nullable();
$table->string('payer_email')->nullable();
$table->string('payer_phone', 32)->nullable();
$table->string('payer_note')->nullable();
$table->string('status', 16)->default('pending');
$table->string('payment_reference', 64)->nullable()->unique();
$table->timestamp('paid_at')->nullable();
$table->json('metadata')->nullable();
$table->timestamps();
$table->index(['user_id', 'status', 'paid_at']);
$table->index(['qr_code_id', 'status']);
});
}
public function down(): void
{
Schema::dropIfExists('mini_payments');
}
};
@@ -0,0 +1,22 @@
<?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::table('mini_payments', function (Blueprint $table) {
$table->unsignedBigInteger('pay_order_id')->nullable()->after('id');
});
}
public function down(): void
{
Schema::table('mini_payments', function (Blueprint $table) {
$table->dropColumn('pay_order_id');
});
}
};
@@ -0,0 +1,36 @@
<?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('user_push_tokens', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->string('token', 512)->unique();
$table->string('platform', 32)->default('android');
$table->string('device_name')->nullable();
$table->timestamp('last_seen_at')->nullable();
$table->timestamps();
$table->index(['user_id', 'updated_at']);
});
Schema::table('users', function (Blueprint $table) {
$table->timestamp('last_app_active_at')->nullable()->after('remember_token');
});
}
public function down(): void
{
Schema::table('users', function (Blueprint $table) {
$table->dropColumn('last_app_active_at');
});
Schema::dropIfExists('user_push_tokens');
}
};
@@ -0,0 +1,61 @@
<?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('woo_stores', function (Blueprint $table) {
$table->id();
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
$table->uuid('public_id')->unique();
$table->string('site_url');
$table->string('site_name')->nullable();
$table->string('return_url', 2048)->nullable();
$table->text('webhook_secret');
$table->string('plugin_token_hash', 64)->nullable();
$table->string('status')->default('pending');
$table->timestamp('connected_at')->nullable();
$table->timestamp('last_webhook_at')->nullable();
$table->json('metadata')->nullable();
$table->timestamps();
$table->unique(['user_id', 'site_url']);
$table->index(['user_id', 'status']);
});
Schema::create('woo_orders', function (Blueprint $table) {
$table->id();
$table->foreignId('woo_store_id')->constrained('woo_stores')->cascadeOnDelete();
$table->unsignedBigInteger('external_order_id');
$table->string('order_number')->nullable();
$table->string('wc_status')->nullable();
$table->string('payment_status')->nullable();
$table->string('customer_name')->nullable();
$table->string('customer_email')->nullable()->index();
$table->string('customer_phone')->nullable();
$table->json('line_items');
$table->json('billing_address')->nullable();
$table->json('shipping_address')->nullable();
$table->string('currency', 3)->default('GHS');
$table->unsignedBigInteger('total_minor')->default(0);
$table->string('fulfillment_status')->default('new');
$table->timestamp('wc_updated_at')->nullable();
$table->json('metadata')->nullable();
$table->timestamps();
$table->unique(['woo_store_id', 'external_order_id']);
$table->index(['woo_store_id', 'fulfillment_status']);
$table->index(['woo_store_id', 'created_at']);
});
}
public function down(): void
{
Schema::dropIfExists('woo_orders');
Schema::dropIfExists('woo_stores');
}
};
+29
View File
@@ -0,0 +1,29 @@
<?php
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;
use Database\Seeders\HostingProductSeeder;
class DatabaseSeeder extends Seeder
{
use WithoutModelEvents;
/**
* Seed the application's database.
*/
public function run(): void
{
$this->call([
HostingProductSeeder::class,
]);
// User::factory(10)->create();
User::factory()->create([
'name' => 'Test User',
'email' => 'test@example.com',
]);
}
}
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace Database\Seeders;
use App\Models\HostingNode;
use Illuminate\Database\Seeder;
class HostingNodeSeeder extends Seeder
{
public function run(): void
{
HostingNode::firstOrCreate(
['provider' => 'local', 'ip_address' => '127.0.0.1'],
[
'name' => 'Primary Server',
'hostname' => gethostname() ?: 'localhost',
'ip_address' => '127.0.0.1',
'ipv6_address' => '::1',
'type' => 'shared',
'segment' => 'general',
'provider' => 'local',
'cpu_cores' => 4,
'ram_mb' => 8192,
'disk_gb' => 150,
'oversell_ratio' => 3,
'bandwidth_tb' => 10,
'max_accounts' => 100,
'current_accounts' => 0,
'status' => 'active',
'ssh_port' => 22,
'features' => ['php', 'mysql', 'nginx', 'ssl'],
'installed_software' => [
'php' => ['8.1', '8.2', '8.3'],
'mysql' => '8.0',
'nginx' => '1.24',
],
]
);
}
}