PHPackages                             ghostcompiler/laravel-react-jsx-boilerplate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ghostcompiler/laravel-react-jsx-boilerplate

ActiveProject[Framework](/categories/framework)

ghostcompiler/laravel-react-jsx-boilerplate
===========================================

A blank Laravel boilerplate with React and JSX. For developers who prefer JavaScript over the default Laravel TSX starter kits.

v1.0.0(1mo ago)184.4k↓75%MITPHPPHP ^8.3CI passing

Since Jun 6Pushed 2w ago2 watchersCompare

[ Source](https://github.com/ghostcompiler/laravel-react-jsx-boilerplate)[ Packagist](https://packagist.org/packages/ghostcompiler/laravel-react-jsx-boilerplate)[ RSS](/packages/ghostcompiler-laravel-react-jsx-boilerplate/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

 [![Ghost Compiler Logo](https://camo.githubusercontent.com/7a311440d646263aeef835cc3b8d3f30b2c35f8fbf32c26ecf9a971070371ca9/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646a6776666c3174762f696d6167652f75706c6f61642f76313738303636363739312f6c6f676f5f6d716e716e342e706e67)](https://camo.githubusercontent.com/7a311440d646263aeef835cc3b8d3f30b2c35f8fbf32c26ecf9a971070371ca9/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f646a6776666c3174762f696d6167652f75706c6f61642f76313738303636363739312f6c6f676f5f6d716e716e342e706e67)

 [![Laravel](https://camo.githubusercontent.com/e37070efbaaa33ec08001d03be09f76150c26c6c8ae7cfd8de090c1881c9d48a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/e37070efbaaa33ec08001d03be09f76150c26c6c8ae7cfd8de090c1881c9d48a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332d4646324432303f7374796c653d666f722d7468652d6261646765266c6f676f3d6c61726176656c266c6f676f436f6c6f723d7768697465) [![React](https://camo.githubusercontent.com/caf47d0815d9fa09febbc04d9e6d13c1dd7c605846ef08a5650b69b8c72df86f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656163742d31392d3631444146423f7374796c653d666f722d7468652d6261646765266c6f676f3d7265616374266c6f676f436f6c6f723d303030303030)](https://camo.githubusercontent.com/caf47d0815d9fa09febbc04d9e6d13c1dd7c605846ef08a5650b69b8c72df86f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f52656163742d31392d3631444146423f7374796c653d666f722d7468652d6261646765266c6f676f3d7265616374266c6f676f436f6c6f723d303030303030) [![Inertia.js](https://camo.githubusercontent.com/8d6e3770abe28aa13c003b69951128ab781587d8bcf09096bb7c0e0f52c8b5fa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f496e65727469612e6a732d332d3935353345393f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/8d6e3770abe28aa13c003b69951128ab781587d8bcf09096bb7c0e0f52c8b5fa/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f496e65727469612e6a732d332d3935353345393f7374796c653d666f722d7468652d6261646765) [![Vite](https://camo.githubusercontent.com/02603fd8c0e832228907a04946a1a4303acd8ee039e0718d52f6cfb74335229f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f566974652d382d3634364346463f7374796c653d666f722d7468652d6261646765266c6f676f3d76697465266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/02603fd8c0e832228907a04946a1a4303acd8ee039e0718d52f6cfb74335229f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f566974652d382d3634364346463f7374796c653d666f722d7468652d6261646765266c6f676f3d76697465266c6f676f436f6c6f723d7768697465) [![Tailwind CSS](https://camo.githubusercontent.com/6d16da9234a1be385715b63cde1d75e4058ffc23bc2d9c0335c3baa52d06ec08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e642d342d3338423241433f7374796c653d666f722d7468652d6261646765266c6f676f3d7461696c77696e64637373266c6f676f436f6c6f723d7768697465)](https://camo.githubusercontent.com/6d16da9234a1be385715b63cde1d75e4058ffc23bc2d9c0335c3baa52d06ec08/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5461696c77696e642d342d3338423241433f7374796c653d666f722d7468652d6261646765266c6f676f3d7461696c77696e64637373266c6f676f436f6c6f723d7768697465) [![Ghost Compiler](https://camo.githubusercontent.com/929b6dba84633d06d1f92f362e1226d9ae8489c83d8d5294df8817b1192edf88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c7425323042792d47686f7374253230436f6d70696c65722d3046313732413f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/929b6dba84633d06d1f92f362e1226d9ae8489c83d8d5294df8817b1192edf88/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275696c7425323042792d47686f7374253230436f6d70696c65722d3046313732413f7374796c653d666f722d7468652d6261646765)

 [![](https://camo.githubusercontent.com/27dd9207c9b725e6cafc92cf6e476c4ac6ec1657c44538bd45af617086a5626b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f67686f7374636f6d70696c65722f6c61726176656c2d72656163742d6a73782d626f696c6572706c6174653f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562)](https://camo.githubusercontent.com/27dd9207c9b725e6cafc92cf6e476c4ac6ec1657c44538bd45af617086a5626b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f67686f7374636f6d70696c65722f6c61726176656c2d72656163742d6a73782d626f696c6572706c6174653f7374796c653d666f722d7468652d6261646765266c6f676f3d676974687562) [![](https://camo.githubusercontent.com/ff762a5c1b10df5e5c0b6e8da99f3bb837f6c567537329d12b5ca4320de7ee8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f7374636f6d70696c65722f6c61726176656c2d72656163742d6a73782d626f696c6572706c6174653f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)](https://camo.githubusercontent.com/ff762a5c1b10df5e5c0b6e8da99f3bb837f6c567537329d12b5ca4320de7ee8f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f7374636f6d70696c65722f6c61726176656c2d72656163742d6a73782d626f696c6572706c6174653f7374796c653d666f722d7468652d6261646765266c6f676f3d7061636b6167697374)

Laravel React JSX Boilerplate
=============================

[](#laravel-react-jsx-boilerplate)

A blank, production-ready **boilerplate** for building modern Laravel apps with **React and JSX** — not TypeScript.

Laravel’s official starter kits ship with React + TSX. This boilerplate gives you the same modern stack (Inertia, Vite, Tailwind, Wayfinder) in plain **JavaScript/JSX**, so you can move fast without TypeScript tooling if that is not your preference.

---

What is in this project
-----------------------

[](#what-is-in-this-project)

### Backend

[](#backend)

PieceDetails**Laravel 13**Latest framework with streamlined routing, middleware, and config**Inertia Laravel**Server-driven SPA responses — no separate API layer required for page loads**Wayfinder**Type-safe route and action helpers generated from your Laravel routes**SQLite by default**Ready for local dev; swap to MySQL/PostgreSQL in `.env`**Queue &amp; jobs tables**Migrations included for background work when you need it**PHPUnit**Feature and unit test scaffolding### Frontend

[](#frontend)

PieceDetails**React 19 + JSX**Components in `.jsx` — no `.tsx` required**Inertia React**Page navigation without full client-side routing setup**Vite 8**Fast HMR in dev, optimized builds for production**Tailwind CSS 4**Utility-first styling via the Vite plugin**React Compiler**Enabled through Babel for optimized React rendering**Instrument Sans**Loaded via Laravel Vite font plugin (Bunny Fonts)### App features (included out of the box)

[](#app-features-included-out-of-the-box)

- **Welcome page** — Laravel-style landing page at `/`, built as an Inertia React page
- **Dark / light / system theme** — `use-appearance` hook + cookie-backed preference, no flash on load
- **Shared Inertia props** — App name, auth user, and layout state wired in `HandleInertiaRequests`
- **Single root Blade view** — `resources/views/app.blade.php` mounts the React app
- **Wayfinder-generated helpers** — Route/action modules under `resources/js/routes` and `resources/js/actions`

### Developer experience

[](#developer-experience)

- **`composer dev`** — Runs PHP server, queue worker, log tail (Pail), and Vite together
- **`composer setup`** — One-shot install: Composer, `.env`, key, migrations, npm, build
- **Linting &amp; formatting** — Laravel Pint (PHP), ESLint + Prettier (JS/JSX)
- **GitHub Actions** — CI tests (PHP 8.3–8.5) and quality checks on push/PR

---

Project structure
-----------------

[](#project-structure)

```
app/
  Http/Middleware/
    HandleAppearance.php      # Theme cookie → Blade
    HandleInertiaRequests.php # Shared Inertia props
resources/
  js/
    app.jsx                   # Inertia bootstrapping
    pages/welcome.jsx         # Example page
    hooks/use-appearance.js   # Theme toggle logic
    routes/                   # Wayfinder-generated routes
    actions/                  # Wayfinder-generated actions
  css/app.css                 # Tailwind entry
  views/app.blade.php         # Root HTML shell
routes/web.php                # Route::inertia('/', 'welcome')
tests/                        # PHPUnit feature & unit tests
.github/workflows/            # tests.yml + lint.yml

```

---

Requirements
------------

[](#requirements)

- PHP **8.3+**
- Composer **2.x**
- Node.js **22+** (recommended)

---

Getting started
---------------

[](#getting-started)

### Create a new project

[](#create-a-new-project)

**Option A — Laravel installer**

```
laravel new my-app --using=ghostcompiler/laravel-react-jsx-boilerplate
cd my-app
composer install && npm install
composer run dev
```

**Option B — Composer**

```
composer create-project ghostcompiler/laravel-react-jsx-boilerplate my-app
cd my-app
composer install && npm install
composer run dev
```

**Option C — Clone the repository**

```
git clone https://github.com/ghostcompiler/laravel-react-jsx-boilerplate.git
cd laravel-react-jsx-boilerplate
composer install && npm install
composer run dev
```

### Start development

[](#start-development)

```
composer run dev
```

Visit .

### Manual setup (alternative)

[](#manual-setup-alternative)

If you skipped `composer setup`, run:

```
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
npm install
npm run build
```

For local development with HMR:

```
npm run dev
```

In a second terminal:

```
php artisan serve
```

---

Scripts
-------

[](#scripts)

### Composer

[](#composer)

CommandDescription`composer setup`Full project bootstrap`composer dev`Server + queue + logs + Vite`composer test`Pint check + PHPUnit`composer lint`Fix PHP style with Pint`composer lint:check`Check PHP style (CI mode)### npm

[](#npm)

CommandDescription`npm run dev`Vite dev server with HMR`npm run build`Production asset build`npm run lint`ESLint on `resources/js``npm run lint:fix`ESLint with auto-fix`npm run format`Prettier check`npm run format:fix`Prettier write---

Adding a new page
-----------------

[](#adding-a-new-page)

1. Create a React page, e.g. `resources/js/pages/dashboard.jsx`
2. Register a route in `routes/web.php`:

```
Route::inertia('/dashboard', 'dashboard')->name('dashboard');
```

3. Use Wayfinder helpers (regenerated on build) for type-safe links from JSX

---

What you can build from this
----------------------------

[](#what-you-can-build-from-this)

This is intentionally **minimal** — a blank boilerplate, not a full auth dashboard or starter kit. That makes it a strong base for:

Use caseHow this boilerplate helps**SaaS dashboards**Add auth (Fortify/Breeze), layouts, and Inertia pages on top of the existing middleware stack**Internal tools**Laravel for data, permissions, and queues; React for interactive UI without a separate SPA repo**CRUD admin panels**Models, migrations, controllers, and Inertia forms — Wayfinder keeps routes in sync**Marketing sites + app**Blade or Inertia landing pages, shared Tailwind theme, dark mode already wired**API-backed products**Start Inertia-first; add API routes later if mobile or third-party clients are needed**Learning Laravel + React**Official Laravel docs apply; frontend examples use JSX instead of TSXTypical next steps:

- Add **authentication** (Laravel Fortify or Breeze adapted for JSX)
- Create a **layout component** and shared navigation
- Add **form components** with Inertia `useForm`
- Connect **Eloquent models** and policies for your domain
- Enable **queues** for emails, imports, or webhooks (tables already migrated)

---

CI / quality
------------

[](#ci--quality)

GitHub Actions run on pushes and pull requests to `main`, `master`, `develop`, and `workos`:

- **tests.yml** — PHPUnit across PHP 8.3, 8.4, and 8.5
- **lint.yml** — Pint, Prettier, and ESLint

Run the same checks locally:

```
composer lint:check
npm run format
npm run lint
./vendor/bin/phpunit
```

Or simulate CI with [act](https://github.com/nektos/act):

```
act -j ci -W .github/workflows/tests.yml
act -j quality -W .github/workflows/lint.yml
```

---

Repository
----------

[](#repository)

---

License
-------

[](#license)

MIT License

---

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance94

Actively maintained with recent releases

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdfc8e246731b39477bdf1668097bd52dfa52a1a9588235cbdd75d2dc7c6b927?d=identicon)[ghostcompiler](/maintainers/ghostcompiler)

---

Top Contributors

[![ghost-maintainer](https://avatars.githubusercontent.com/u/269910969?v=4)](https://github.com/ghost-maintainer "ghost-maintainer (7 commits)")[![ghostcompiler](https://avatars.githubusercontent.com/u/269910969?v=4)](https://github.com/ghostcompiler "ghostcompiler (6 commits)")

---

Tags

laravellaravel-reactlaravel-react-boiler-platelaravel-react-ssrframeworklaravel

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ghostcompiler-laravel-react-jsx-boilerplate/health.svg)

```
[![Health](https://phpackages.com/badges/ghostcompiler-laravel-react-jsx-boilerplate/health.svg)](https://phpackages.com/packages/ghostcompiler-laravel-react-jsx-boilerplate)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[nunomaduro/laravel-starter-kit-inertia-react

The skeleton application for the Laravel framework.

2071.1k](/packages/nunomaduro-laravel-starter-kit-inertia-react)[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3991.8k](/packages/codewithdennis-larament)[ercogx/laravel-filament-starter-kit

This is a Filament v5 Starter Kit for Laravel 13, designed to accelerate the development of Filament-powered applications.

461.8k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
