NativePHP Part1: Setting Up the Laravel Project with NativePHP, Livewire, FluxUI, Tailwind, AlpineJS, and Larastan

In this post, we’ll set up a new Laravel 12 project using the Livewire starter kit, which includes Livewire, Tailwind CSS, and FluxUI. We’ll integrate NativePHP for desktop app functionality, and add Larastan for static analysis.

in Laravel, PHP

1. Install NativeCLI

Install NativeCLI globally so you can use it anywhere:

composer global require nativephp/cli

Ensure the ~/.composer/vendor/bin directory (or equivalent) is in your PATH so the nativecli command is recognised.

2. Create a New Project

Generate a new Laravel application with Livewire, class-based components, Pest for testing, and NPM:

nativecli new TimeTrackerApp --livewire --livewire-class-components --pest --npm

Follow the on-screen instructions to complete the setup.

3. Install Dependencies

Go to your newly created application folder and install the dependencies:

cd TimeTrackerApp
composer install
npm install

4. Run the App

To run everything concurrently (the development server, queue, logs, Vite, etc.), just use:

composer native:dev

This single command starts your app