How to Build a Custom Front-Controller Middleware Stack for Modern Web Applications: A Step-by-Step Technical Guide