projects/Humphrey Portfolio (Laravel + React)
My own portfolio and publishing platform, built on Laravel 12 and React 19 with caching, background jobs, auto-generated share cards and an MCP server.

The problem. A content site that serves portfolio pages, blog posts and project showcases should load quickly and be easy to manage, without every page view hitting the database hard.
What I built. A full-stack platform on Laravel 12, React 19 and Inertia.js with PostgreSQL and Redis. The homepage is cached and refreshed automatically when content changes, view counts are recorded in background jobs so visitors are never slowed down, and images are generated in three responsive sizes. Every project and post gets a branded social share card, rich-text authoring, and role-based admin access. An MCP server lets AI assistants manage content directly.
The result. A fast, easy-to-maintain content engine that shows how I approach caching, background work and clean admin tooling on client projects too.
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.