項目作品/Humphrey 作品集 (Laravel + React)
用 Laravel 12、React 19、Inertia.js v2 建構嘅全端作品集與內容引擎,整合咗 MCP 伺服器。

用 Laravel 12、React 19 同 Inertia.js v2 建構嘅高性能全端個人作品集、網誌平台與無頭 MCP 內容系統。具備多層快取(HomepageCacheService)、非同步瀏覽量計數隊列任務、帶動態 Schema.org JSON-LD SEO 嘅 TipTap v3 富文本編輯器、用於 AI 代理交互嘅 Model Context Protocol(MCP)工具伺服器整合,以及企業級 RBAC 管理面板。
Key architectural decisions, concrete code implementations, and performance wins behind this project.
Enabling external AI agents to securely query and mutate portfolio content and site metrics without custom one-off API adapters.
Implemented an MCP Server using Laravel MCP tools, OAuth 2.0 discovery endpoints, and strict FormRequest-backed schema validators.
Aggregating complex relational datasets on every homepage visit causes high database CPU utilization and slow TTFB.
Built HomepageCacheService with fine-grained TTLs coupled to Eloquent Observers that surgically flush keys upon create/update/delete events.
Synchronously incrementing view counters on high-traffic content triggers database row write-lock contention.
Decoupled metrics tracking into an asynchronous queue job implementing ShouldQueue dispatched non-blockingly during requests.
Repurposing the legacy real estate 'projects' table for a software developer portfolio while preserving legacy data and polymorphic image bindings.
Executed atomic schema migration with dynamic table introspection, data copying into 'real_estate_projects', and batch updates on polymorphic morph types.
Media lookups across Project, Blog, and Deployment models were causing sequential scans as the images table expanded.
Created composite indexes targeting general queries, primary image lookups, and sequence display ordering.
High-resolution user-uploaded assets ballooning frontend payload sizes and harming Core Web Vitals.
Engineered an image processing pipeline using Intervention Image that auto-resizes uploads into small (300px), medium (800px), and large (1200px) tiers.
Static social previews fail to capture dynamic blog titles, project tech tags, and author branding when shared across social channels.
Implemented dynamic server-side image generation endpoints with disk-based caching responding to /og-image/{type}/{slug}.
Imperative policy validation inside controller actions creates boilerplate and increases the risk of forgotten permission checks.
Applied native PHP 8 #[Authorize] attributes to route handlers bound to centralized Laravel Policies and DB permission matrices.
// community_discussion
Have thoughts, questions, or ideas regarding this system's architecture? Leave a comment below with your GitHub account.