Engineering
23 articles filed under Engineering.
Laravel policies, gates, and Form Requests I trust before controllers grow secret ifs
Controllers full of ownership ifs are how authorization drifts. Here is how I shape Laravel policies, gates, and Form Request ownership so admins, teams, and API clients stay honest under real product pressure.
Docker Compose healthchecks and secrets I trust before local lies to prod
A green docker compose up is not parity. Here is how I shape Compose healthchecks, secrets, overlays, and profiles for PHP and Node stacks so local and prod stop drifting in the ways that hurt.
MySQL indexes, EXPLAIN, and transactions I trust before blaming PHP
When a Laravel or PHP app feels slow, I stop staring at controllers and open EXPLAIN. Here are the index shapes, transaction habits, and migration rules I trust before I blame the framework.
React data-fetching patterns I trust before a dashboard lies
A React admin that shows stale totals after a mutation is worse than a slow spinner. Here is how I shape TanStack Query, cache keys, and mutation boundaries so dashboards stay honest under real traffic.
Laravel Horizon production patterns I trust before queues go quiet
Horizon is not a pretty dashboard — it is how I keep Laravel queues honest under real load. Here is the supervisor math, timeout discipline, failed-job hygiene, and metrics I ship before I call a queue stack production-ready.
AWS S3, CloudFront, and IAM patterns I ship with Laravel before overbuilding
Most Laravel teams jump to ECS before they fix IAM, S3, and CloudFront. Here is the AWS baseline I ship first — least-privilege roles, private buckets, signed URLs, and a CDN that does not leak origin pain.
Nginx and PHP-FPM settings I trust on a VPS before traffic hurts
A cheap VPS can serve a serious PHP app — until worker math, upstream timeouts, and buffering defaults fight you. Here is the Nginx and PHP-FPM baseline I ship before I blame the framework.
Eloquent query patterns I trust before traffic doubles
Laravel apps rarely die from one slow query — they die from N+1 storms, over-selected columns, and Resource-driven query fans. Here is how I shape Eloquent so the app still breathes when traffic doubles.
Docker multi-stage builds I trust for PHP and Node apps
Fat images hide secrets, stretch cold starts, and make local and prod drift. Here is how I design multi-stage Dockerfiles for PHP-FPM and Node so build tools stay out of runtime and healthchecks stay honest.
WordPress REST API routes I trust in production
Most plugin REST bugs are permission, schema, or side-effect bugs — not routing bugs. Here is how I design WordPress REST routes so admin UIs, storefront clients, and webhooks stay honest under real traffic.
Object cache patterns that keep WooCommerce plugins honest under load
Redis and Memcached do not make a WooCommerce plugin fast by magic. Here is how I design cache keys, groups, invalidation, and stampede protection so plugins stay correct when traffic spikes.
Idempotent WooCommerce payment webhooks: survive retries without double work
Retries, out-of-order delivery, and gateway double-posts will hit every payment plugin. Here is how I design WooCommerce webhook handlers so the same event never double-charges, double-fulfills, or corrupts order meta.
PHP 8.6: partial application, Duration, and the deprecations that prepare PHP 9
PHP 8.6 is a small surface release with a heavy deprecation map toward PHP 9 — Partial Function Application, Duration, clamp(), session default flips, and the cleanup checklist I use for WordPress and Laravel plugins.
Serving LLMs: GPUs, model servers, and the cache that makes chat fast
What actually runs behind a chat box: GPU memory, model servers, tokens, KV-cache, batching, and sticky routing — walked with a request-path diagram and mini console.
Gutenberg @wordpress/data: store patterns that keep editors honest
Most Gutenberg bugs I chase are not React bugs — they are store bugs. Here is how I design @wordpress/data stores so selectors, resolvers, and dispatches stay predictable in real editors.
PHP 8.4 object modeling: property hooks and asymmetric visibility
PHP 8.4 lets me keep Order invariants without getter/setter noise: asymmetric visibility for status, set hooks for email normalization, and virtual properties for derived labels.
WooCommerce Blocks checkout: extend Store API without breaking cart
Shortcode checkout hooks do not travel to Blocks. Here is how I extend WooCommerce cart and checkout through the Store API so fees, fields, and payments survive without breaking the cart.
Laravel queues beside WordPress: keep WooCommerce plugins out of long jobs
When a WooCommerce plugin should not own webhooks, reconciliation, or report exports, I put that work on a Laravel queue service and keep WordPress thin — REST callbacks and Action Scheduler only as a bridge.
WordPress plugin dependency injection: stop new-ing everything in plugins_loaded
Most WordPress plugins are a tangle of singletons and global functions. Here is how I introduce a small service container so features stay testable, swappable, and honest about their dependencies.
React in the WordPress admin: stop fighting PHP pages
Shipping a React screen inside wp-admin is easy. Shipping one that survives capability checks, REST auth, and real merchant workflows is a different craft.
HPOS-ready WooCommerce plugins: stop treating orders like posts
High-Performance Order Storage changed how WooCommerce stores orders. Here is the data-access discipline I use so plugins keep working when postmeta is no longer the source of truth.
Action Scheduler patterns that keep WooCommerce plugins from timing out
Checkout cannot wait for your bulk sync. Here is how I design Action Scheduler jobs in WordPress and WooCommerce plugins so work finishes without hanging the request that started it.
Production debugging for WordPress plugins: what staging never teaches you
Staging green and production on fire is a pattern, not bad luck. Here is how I actually debug WordPress and WooCommerce plugins when the failure only exists on a real store.