No description
Find a file
Claude aedc9ee378
security: validate billing address structure in Order model
Add billing address validation on Order creating/updating events.
Required fields (line1, city, postcode, country) are enforced when
commerce.checkout.require_billing_address is enabled (default).
Unrecognised keys are stripped to prevent data pollution.

Fixes #12

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 16:20:14 +00:00
.forgejo/workflows fix(ci): install zip in release workflow 2026-02-27 17:43:58 +00:00
.gemini Initial commit 2026-01-26 23:18:22 +00:00
.github monorepo sepration 2026-01-27 00:24:22 +00:00
changelog/2026/jan docs(changelog): add completed P1/P2 items for January 2026 2026-01-29 19:52:32 +00:00
Concerns chore: fix pint code style and add test config 2026-02-23 03:50:05 +00:00
Console fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Contracts refactor: migrate namespace from Core\Commerce to Core\Mod\Commerce 2026-01-27 16:23:12 +00:00
Controllers fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Data fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
database/migrations monorepo sepration 2026-01-27 00:24:22 +00:00
docs security: add webhook idempotency and payment amount verification 2026-01-29 12:32:25 +00:00
Events fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Exceptions chore: fix pint code style and add test config 2026-02-23 03:50:05 +00:00
Jobs refactor: update Tenant module imports after namespace migration 2026-01-27 17:39:12 +00:00
Lang/en_GB monorepo sepration 2026-01-27 00:24:22 +00:00
Listeners fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Mail refactor: migrate namespace from Core\Commerce to Core\Mod\Commerce 2026-01-27 16:23:12 +00:00
Mcp/Tools fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Middleware chore: fix pint code style and add test config 2026-02-23 03:50:05 +00:00
Migrations fix(migration): remove FK constraints on non-existent orders/subscriptions tables 2026-02-08 18:08:20 +00:00
Models security: validate billing address structure in Order model 2026-03-24 16:20:14 +00:00
Notifications fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
routes fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
Service refactor: migrate namespace from Core\Commerce to Core\Mod\Commerce 2026-01-27 16:23:12 +00:00
Services fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
tests fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
View fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
.editorconfig Initial commit 2026-01-26 23:18:22 +00:00
.gitattributes Initial commit 2026-01-26 23:18:22 +00:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:50 +00:00
AGENTS.md Initial commit 2026-01-26 23:18:22 +00:00
Boot.php fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
CLAUDE.md docs: add CLAUDE.md project instructions 2026-03-13 13:38:02 +00:00
cliff.toml Initial commit 2026-01-26 23:18:22 +00:00
composer.json feat: rename package to lthn/php-commerce for Packagist 2026-03-09 18:00:04 +00:00
config.php fix(dx): add declare(strict_types=1) and fix PSR-12 compliance 2026-03-17 09:08:03 +00:00
GEMINI.md Initial commit 2026-01-26 23:18:22 +00:00
LICENSE Initial commit 2026-01-26 23:18:22 +00:00
phpunit.xml chore: fix pint code style and add test config 2026-02-23 03:50:05 +00:00
README.md Initial commit 2026-01-26 23:18:22 +00:00
TODO.md security(webhooks): add per-IP rate limiting for webhook endpoints (P2-075) 2026-01-29 18:11:02 +00:00

Core PHP Framework Project

CI codecov PHP Version Laravel License

A modular monolith Laravel application built with Core PHP Framework.

Features

  • Core Framework - Event-driven module system with lazy loading
  • Admin Panel - Livewire-powered admin interface with Flux UI
  • REST API - Scoped API keys, rate limiting, webhooks, OpenAPI docs
  • MCP Tools - Model Context Protocol for AI agent integration

Requirements

  • PHP 8.2+
  • Composer 2.x
  • SQLite (default) or MySQL/PostgreSQL
  • Node.js 18+ (for frontend assets)

Installation

# Clone or create from template
git clone https://github.com/host-uk/core-template.git my-project
cd my-project

# Install dependencies
composer install
npm install

# Configure environment
cp .env.example .env
php artisan key:generate

# Set up database
touch database/database.sqlite
php artisan migrate

# Start development server
php artisan serve

Visit: http://localhost:8000

Project Structure

app/
├── Console/      # Artisan commands
├── Http/         # Controllers & Middleware
├── Models/       # Eloquent models
├── Mod/          # Your custom modules
└── Providers/    # Service providers

config/
└── core.php      # Core framework configuration

routes/
├── web.php       # Public web routes
├── api.php       # REST API routes
└── console.php   # Artisan commands

Creating Modules

# Create a new module with all features
php artisan make:mod Blog --all

# Create module with specific features
php artisan make:mod Shop --web --api --admin

Modules follow the event-driven pattern:

<?php

namespace App\Mod\Blog;

use Core\Events\WebRoutesRegistering;
use Core\Events\ApiRoutesRegistering;
use Core\Events\AdminPanelBooting;

class Boot
{
    public static array $listens = [
        WebRoutesRegistering::class => 'onWebRoutes',
        ApiRoutesRegistering::class => 'onApiRoutes',
        AdminPanelBooting::class => 'onAdminPanel',
    ];

    public function onWebRoutes(WebRoutesRegistering $event): void
    {
        $event->routes(fn() => require __DIR__.'/Routes/web.php');
        $event->views('blog', __DIR__.'/Views');
    }
}

Core Packages

Package Description
host-uk/core Core framework components
host-uk/core-admin Admin panel & Livewire modals
host-uk/core-api REST API with scopes & webhooks
host-uk/core-mcp Model Context Protocol tools

Flux Pro (Optional)

This template uses the free Flux UI components. If you have a Flux Pro license:

# Configure authentication
composer config http-basic.composer.fluxui.dev your-email your-license-key

# Add the repository
composer config repositories.flux-pro composer https://composer.fluxui.dev

# Install Flux Pro
composer require livewire/flux-pro

Documentation

License

EUPL-1.2 (European Union Public Licence)