项目作品/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.