marekmiklusek/laravel-starter-kit-react

Laravel React starter kit with code quality tools pre-configured.

Maintainers

Package info

github.com/marekmiklusek/laravel-starter-kit-react

Language:TypeScript

Type:project

pkg:composer/marekmiklusek/laravel-starter-kit-react

Statistics

Installs: 5

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.7 2026-03-09 12:02 UTC

This package is auto-updated.

Last update: 2026-03-09 12:03:04 UTC


README

Laravel's official React starter kit enhanced with development workflow tools, code quality standards, and additional developer experience improvements from laravel-starter-kit. โœจ

Built with Inertia.js v2, React 19, Tailwind CSS v4, and Laravel Wayfinder.

๐Ÿ“‹ Requirements

  • PHP >= 8.4.0
  • Composer
  • Node.js & NPM
  • MySQL (or your preferred database)

๐Ÿš€ Quick Start

Note

In config/database.php, 'engine' => 'InnoDB', is used as the default for both mysql and mariadb connections.

๐Ÿ“ฆ Installation

Create a new Laravel React project:

composer create-project marekmiklusek/laravel-starter-kit-react --prefer-dist app-name

Run the automated setup script:

composer setup

This command will:

  1. Install PHP dependencies via Composer
  2. Create .env file from .env.example (if not exists)
  3. Generate application key
  4. Run database migrations
  5. Install NPM dependencies
  6. Build frontend assets

โš™๏ธ Additional Setup

๐Ÿ”ง Environment Configuration

After running composer setup, configure your .env file with your database credentials:

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=your_database_name
DB_USERNAME=your_username
DB_PASSWORD=your_password

๐ŸŒ Browser Testing Setup (Optional)

If you plan to use Pest's browser testing capabilities, install Playwright:

npm install playwright
npx playwright install

This installs the necessary browser binaries for running browser tests.

๐Ÿ’ป Development

๐Ÿ–ฅ๏ธ Running the Development Server

Start all development services concurrently:

composer dev

This starts:

  • Laravel development server (port 8000) - Your Inertia + React application
  • Queue listener - Background job processing
  • Vite dev server - Hot Module Replacement for React/CSS/JS

Your application will be available at http://localhost:8000 ๐ŸŽ‰

SSR Mode

To run with server-side rendering:

composer dev:ssr

๐Ÿ” Code Quality

๐Ÿงน Linting & Formatting

Fix code style issues:

composer lint

This runs:

  • Rector (PHP refactoring)
  • Laravel Pint (PHP formatting)
  • ESLint & Prettier (frontend formatting)

๐Ÿงช Testing

Run the full test suite:

composer test

This includes:

  • Type coverage (100% minimum)
  • Unit and feature tests (Pest)
  • Code style validation
  • Static analysis (PHPStan)

๐ŸŒ Browser Testing

This starter kit includes Pest 4 with browser testing capabilities. Create browser tests in tests/Browser/:

it('displays the welcome page', function () {
    $page = visit('/');

    $page->assertSee('Laravel')
        ->assertNoJavascriptErrors();
});

๐Ÿ“œ Available Scripts

๐ŸŽผ Composer Scripts

  • composer setup - Initial project setup
  • composer dev - Run all development services
  • composer dev:ssr - Run with server-side rendering
  • composer lint - Fix code style issues
  • composer test - Run full test suite
  • composer test:unit - Run Pest tests only
  • composer test:types - Run PHPStan analysis
  • composer test:type-coverage - Check type coverage
  • composer test:lint - Validate code style
  • composer ci:check - Run all CI checks (lint, format, types, tests)

๐Ÿ“ฆ NPM Scripts

  • npm run dev - Start Vite dev server
  • npm run build - Build for production
  • npm run build:ssr - Build for production with SSR
  • npm run lint - Fix frontend lint issues
  • npm run lint:check - Check frontend lint issues
  • npm run format - Format frontend code with Prettier
  • npm run format:check - Check frontend formatting
  • npm run types:check - Check TypeScript types

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.