Edge Bridge Architecture

PHP-to-Node.js SEO Proxy Engine

A lightweight PHP edge proxy and Server-Side Rendering (SSR) engine designed to bridge decoupled Node.js API backends with standard PHP shared hosting environments.

Zero Hosting Overhead

Run the frontend edge layer on ultra-low-cost PHP shared hosting while hosting Node.js microservices on specialized platforms like Render or AWS.

Server-Side Assembly (SSR)

Crawlers receive pre-rendered, fully structured HTML on initial page loads without relying on third-party headless pre-rendering tools.

Dynamic Payload Pass-Through

Transparently forwards GET parameters, POST form payloads, and JSON request bodies directly through a high-performance cURL transport layer.

Wildcard Route Resolution

Includes flexible pattern matching for dynamic entity endpoints (e.g., mapping /product/$ to dynamic slugs or backend query IDs).

System Topology

The engine intercepts all inbound traffic on the shared host, separating crawler SSR requests from dynamic client API traffic:

+-------------------------+
|  Browser / SEO Crawler  |
+------------+------------+
             |
             v
+-------------------------------------+
|        PHP Shared Host (Edge)       |
|  - Router & Endpoint Interceptor    |
|  - cURL Transport Layer             |
|  - HTML Template Assembly (SSR)     |
+------------------+------------------+
                   |
                   v  cURL / JSON
+-------------------------------------+
|        Node.js Backend (Render)     |
|  - Business Logic & Database Layer  |
+-------------------------------------+
Component File Target Operational Responsibility
Front Controller index.php Entry point. Captures incoming request URI, HTTP verbs, and initiates routing dispatch.
Router & Dispatcher Router.php Matches pattern routes against configuration rules. Determines whether to serve SSR HTML or stream dynamic API proxy payloads.
cURL Transport Api.php Manages backend connectivity, header forwarding, HTTP payload parsing, and cURL execution to the decoupled Node service.
Global Configuration config.php Houses target Node API host URLs, dynamic regex route definitions, and default fallback settings.

Package Layout

The entire engine codebase is structured for minimal footprint and zero external composer dependencies: