Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Ahondev/portfolio-v2/llms.txt

Use this file to discover all available pages before exploring further.

WP SSR Framework is a WordPress must-use plugin that replaces the traditional theme layer with a React/Vite single-page application. WordPress handles content management through ACF-powered custom post types, while your React frontend renders pages client-side — with optional static HTML pre-generation for SEO crawlers. Built on top of Roots Bedrock, the framework provides a Laravel-inspired architecture: service providers, controllers, a custom routing layer, Eloquent-style post type queries, and a composer pattern for sharing data across views.

Introduction

Learn what the framework does, when to use it, and how it fits together.

Quickstart

Install Bedrock, boot the Kernel, and render your first SPA page in minutes.

Architecture

Understand the full request lifecycle from WordPress to React and back.

API Reference

Browse every PHP class, method signature, and REST endpoint.

Core Capabilities

Custom Routing

Register web and API routes with a fluent, Laravel-style syntax.

Post Types

Define ACF-powered custom post types with a chainable builder API.

Static Site Generation

Pre-render pages to static HTML for bots while keeping the SPA for humans.

SEO Management

Per-post SEO fields with a scoring dashboard built into WP admin.

SPA Bridge

How WordPress injects view names and data into the React application.

Service Providers

Register and extend framework behaviour via the provider lifecycle.

How It Works

1

WordPress handles routing

Every URL is intercepted by the custom WebRouter, which matches the request to a controller action before WordPress ever renders a theme.
2

Controllers prepare data

A WebController queries custom post types via EloquentCPT, merges composer data, and serialises everything to JSON.
3

React renders the page

The JSON payload is embedded in the HTML response as window.__wp_data__. The React/Vite SPA reads the view name and data, then hydrates the correct page component.
4

Static HTML for crawlers

The BotDetector middleware identifies search engine crawlers and serves pre-generated static HTML from the SSG cache instead — giving full SEO visibility without sacrificing SPA speed.
WP SSR Framework requires PHP 8.1+, WordPress 6.x (via Roots Bedrock), and ACF Pro for custom field management.

Build docs developers (and LLMs) love