No description
Find a file
Clotho 23b3339b0b
Some checks failed
CI / PHP 8.2 (pull_request) Failing after 1s
CI / PHP 8.3 (pull_request) Failing after 1s
CI / PHP 8.4 (pull_request) Failing after 1s
CI / Assets (pull_request) Failing after 1s
security: validate JSON metadata fields to prevent mass assignment
Add mutators to Service and HoneypotHit models that enforce size and
structure limits on JSON fields (metadata, headers). Service.setMeta()
now validates key format. TeapotController pre-filters header count
before passing to the model.

Fixes #14

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 12:06:18 +00:00
.gemini Initial commit 2026-01-26 20:48:24 +00:00
.github Initial commit 2026-01-26 20:48:24 +00:00
app Initial commit 2026-01-26 20:48:24 +00:00
bootstrap Initial commit 2026-01-26 20:48:24 +00:00
changelog/2026/jan docs: add January 2026 completed items to changelog 2026-01-29 19:51:57 +00:00
config Initial commit 2026-01-26 20:48:24 +00:00
database Initial commit 2026-01-26 20:48:24 +00:00
docs docs: add package documentation 2026-01-29 10:47:50 +00:00
public Initial commit 2026-01-26 20:48:24 +00:00
resources monorepo sepration 2026-01-26 20:56:28 +00:00
routes Initial commit 2026-01-26 20:48:24 +00:00
Service Add Hub service layer and admin navigation restructure 2026-01-27 16:12:01 +00:00
src security: validate JSON metadata fields to prevent mass assignment 2026-02-20 12:06:18 +00:00
storage Initial commit 2026-01-26 20:48:24 +00:00
tests security: validate JSON metadata fields to prevent mass assignment 2026-02-20 12:06:18 +00:00
.editorconfig Initial commit 2026-01-26 20:48:24 +00:00
.env.example Initial commit 2026-01-26 20:48:24 +00:00
.gitattributes Initial commit 2026-01-26 20:48:24 +00:00
.gitignore Initial commit 2026-01-26 20:48:24 +00:00
AGENTS.md Initial commit 2026-01-26 20:48:24 +00:00
artisan Initial commit 2026-01-26 20:48:24 +00:00
CLAUDE.md docs: update CLAUDE.md for core-admin package specifics 2026-01-28 14:03:40 +00:00
cliff.toml Initial commit 2026-01-26 20:48:24 +00:00
composer.json Add Hub service layer and admin navigation restructure 2026-01-27 16:12:01 +00:00
FINDINGS.md docs: add Phase 0 environment assessment and test baseline (#2) 2026-02-20 02:25:01 +00:00
GEMINI.md Initial commit 2026-01-26 20:48:24 +00:00
LICENSE Initial commit 2026-01-26 20:48:24 +00:00
package.json Initial commit 2026-01-26 20:48:24 +00:00
phpunit.xml Initial commit 2026-01-26 20:48:24 +00:00
postcss.config.js Initial commit 2026-01-26 20:48:24 +00:00
README.md monorepo sepration 2026-01-26 20:56:28 +00:00
tailwind.config.js Initial commit 2026-01-26 20:48:24 +00:00
TODO.md test(layout): add comprehensive tests for HLCRF layout system 2026-01-29 19:27:30 +00:00
vite.config.js Initial commit 2026-01-26 20:48:24 +00:00

Core Admin Package

Admin panel components, Livewire modals, and service management interface for the Core PHP Framework.

Installation

composer require host-uk/core-admin

Features

Admin Menu System

Declarative menu registration with automatic permission checking:

use Core\Front\Admin\Contracts\AdminMenuProvider;

class MyModuleMenu implements AdminMenuProvider
{
    public function registerMenu(AdminMenuRegistry $registry): void
    {
        $registry->addItem('products', [
            'label' => 'Products',
            'icon' => 'cube',
            'route' => 'admin.products.index',
            'permission' => 'products.view',
        ]);
    }
}

Livewire Modals

Full-page Livewire components for admin interfaces:

use Livewire\Component;
use Livewire\Attributes\Title;

#[Title('Product Manager')]
class ProductManager extends Component
{
    public function render(): View
    {
        return view('admin.products.manager')
            ->layout('hub::admin.layouts.app');
    }
}

Form Components

Reusable form components with authorization:

  • <x-forms.input> - Text inputs with validation
  • <x-forms.select> - Dropdowns
  • <x-forms.checkbox> - Checkboxes
  • <x-forms.toggle> - Toggle switches
  • <x-forms.textarea> - Text areas
  • <x-forms.button> - Buttons with loading states
<x-forms.input
    name="name"
    label="Product Name"
    wire:model="name"
    required
/>

Extensible search provider system:

use Core\Admin\Search\Contracts\SearchProvider;

class ProductSearchProvider implements SearchProvider
{
    public function search(string $query): array
    {
        return Product::where('name', 'like', "%{$query}%")
            ->take(5)
            ->get()
            ->map(fn($p) => new SearchResult(
                title: $p->name,
                url: route('admin.products.edit', $p),
                icon: 'cube'
            ))
            ->toArray();
    }
}

Service Management Interface

Unified dashboard for viewing workspace services and statistics.

Configuration

The package auto-discovers admin menu providers and search providers from your modules.

Requirements

  • PHP 8.2+
  • Laravel 11+ or 12+
  • Livewire 3.0+
  • Flux UI 2.0+

Changelog

See changelog/2026/jan/features.md for recent changes.

License

EUPL-1.2 - See LICENSE for details.