marekmiklusek/laravel-starter-kit

A type-safe Laravel starter kit for developers who value code quality.

Installs: 5

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Language:Blade

Type:project

pkg:composer/marekmiklusek/laravel-starter-kit

v1.0.0 2025-11-06 16:43 UTC

This package is auto-updated.

Last update: 2025-11-06 17:14:43 UTC


README

A super cool Laravel 12 starter kit coming from @nunomaduro, with some modifications. โœจ

โœจ Features

  • Laravel 12 ๐Ÿ”ฅ - Latest Laravel framework with streamlined structure
  • PHP 8.4 โšก - Modern PHP features and performance
  • Tailwind CSS 4 ๐ŸŽจ - Latest Tailwind with Vite integration
  • Pest 4 ๐Ÿงช - Advanced testing with browser testing support
  • Code Quality Tools ๐Ÿ› ๏ธ - PHPStan, Laravel Pint, Rector, Prettier
  • Development Workflow ๐Ÿ”„ - Concurrent dev server, queue, logs, and Vite

๐Ÿ“‹ Requirements

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

๐Ÿš€ Quick Start

๐Ÿ“ฆ Installation

Create a new Laravel project:

composer create-project marekmiklusek/laravel-starter-kit --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. Create .env.production file from .env.example (if not exists)
  4. Generate application key
  5. Run database migrations
  6. Install NPM dependencies
  7. 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.

๐Ÿš€ Production Environment

The setup script automatically creates a .env.production file. Configure it with production-specific settings:

# Edit .env.production with your production settings

Configure production environment variables:

  • Set APP_ENV=production
  • Set APP_DEBUG=false
  • Configure production database credentials
  • Set secure APP_KEY (generated during setup)
  • Configure mail, cache, queue, and session drivers
  • Set proper logging channels

๐Ÿ’ป Development

๐Ÿ–ฅ๏ธ Running the Development Server

Start all development services concurrently:

composer dev

This starts:

  • Laravel development server (port 8000)
  • Queue listener
  • Log viewer (Pail)
  • Vite dev server (Hot Module Replacement)

๐Ÿ” Code Quality

๐Ÿงน Linting & Formatting

Fix code style issues:

composer lint

This runs:

  • Rector (PHP refactoring)
  • Laravel Pint (PHP formatting)
  • 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 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 update:requirements - Update all dependencies

๐Ÿ“ฆ NPM Scripts

  • npm run dev - Start Vite dev server
  • npm run build - Build for production
  • npm run lint - Format frontend code
  • npm run test:lint - Check frontend code style

๐Ÿ“„ License

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