Ghost Compiler logo

Ghost Compiler

Laravel + Inertia JSX Integration

Laravel 13JSX First
Ghost Compiler mark

Laravel Defaults To TSX, This Starter Uses JSX

Inertia Integration Rebuilt,Clean React JSX Workflow

A production-focused Laravel 13 starter that keeps Inertia modern and delivers JSX-first pages, layouts, hooks, and generators for dashboard and SaaS teams.

Framework

Laravel 13

Inertia

v3 + SSR

Frontend

React 19 JSX

Integration Highlights

Inertia + JSX Pages

Route-driven pages in resources/js/pages/*.jsx

JSX Layout Pattern

Attach layouts with Dashboard.layout = (page) => ...

Hook Based Logic

Organize reusable logic under resources/js/hooks

SSR In Dev

Inertia v3 handles SSR automatically with composer run dev

Production SSR

Build with npm run build:ssr then start inertia:start-ssr

Generators Included

make:page, make:layout, make:component, make:hook

Installation

Official Commands

Use one of these commands to scaffold from this starter.

$composer create-project ghostcompiler/laravel-react-jsx
$laravel new demo --using=ghostcompiler/laravel-react-jsx

Composer command can also include a folder name, for example: composer create-project ghostcompiler/laravel-react-jsx demo

Requirements

PHP

8.3+

Node

20+

Laravel

13

React

19

JSX Generator Commands

$php artisan make:page Dashboard
$php artisan make:layout Admin/MainLayout
$php artisan make:component UI/Button
$php artisan make:hook useAuth
$php artisan make:lib api/client
$php artisan make:helper format/currency

SSR Quick Guide

Development

Run composer run dev for full stack development, or npm run dev for frontend only. Inertia v3 handles SSR automatically in development.

Production

Build with npm run build:ssr then run php artisan inertia:start-ssr.

JSX Inertia Flow

1. Route

Laravel route returns Inertia::render with a page name.

2. Page

Inertia loads the matching JSX page from resources/js/pages.

3. Layout

Optional layout wrapper composes dashboard or app shells.

Scripts

composer run dev

Laravel server + queue + logs + Vite

npm run dev

Vite frontend dev server

npm run build

Client bundle

npm run build:ssr

Client + SSR bundles