Use this file to discover all available pages before exploring further.
Every URL served by the WP SSR Framework has two sides: a PHP controller method that produces the view name and data, and a React page component that renders it. The connection between them is the routes.ts file, which maps view name strings to lazy-imported React components.
Each value is a function that returns a dynamic import() — Vite code-splits every page into a separate bundle, so users only download the JavaScript for the pages they actually visit.
The view name string in routes.ts must exactly match the first argument passed to $this->view() in the PHP controller.
Route type
PHP call
View name
Static page
$this->view('home', $data)
home
Static page
$this->view('devis')
devis
CPT archive
$this->view('blog', $data)
blog
CPT single
$this->postView('blog_single', $post, $data)
blog_single
CPT archive
$this->view('services', $data)
services
CPT single
$this->postView('services_single', $post, $data)
services_single
There is no automatic convention for CPT single view names — the controller author chooses the name. The pattern {postType}_single is a project-level convention, not enforced by the framework.
Use the useWPData<T>() hook from wp-sync.ts to read the data the PHP controller provided. Define a TypeScript type that matches the controller’s $data array.
ACF field values from WordPress often have inconsistent shapes (arrays of objects, image objects with url/alt, etc.). The project includes normalizer functions to clean up raw data before use:
// Transforms raw ACF service data to a clean typed shape.// Spreads all raw fields and overrides the ones that need reshaping.// Usage: const service = normalizeService(useWPData().post)export function normalizeService(raw: any): ServiceContent { return { ...raw, hero: { title: raw['hero.title'] || '', subtitle: raw['hero.subtitle'] || '', accent: raw['hero.accent'] || '', }, highlights: (raw.highlights || []).map((h: any) => h.value), useCases: (raw.useCases || []).map((u: any) => u.value), technologies: (raw.technologies || []).map((t: any) => t.value), features: raw.features || [], whyAhon: raw.whyAhon || [], process: raw.process || [], faq: raw.faq || [], }}
During development with yarn dev, Vite’s HMR updates the browser instantly whenever you save a React component. You don’t need to rebuild after each change.