kusowl / nativephp-desktop-maryui-starter-kit
A Starter Kit for Laravel NativePHP Desktop with MaryUI
Package info
gitlab.com/kushowl/nativephp-desktop-maryui-starter-kit
Type:project
pkg:composer/kusowl/nativephp-desktop-maryui-starter-kit
Requires
- php: ^8.3
- laravel/framework: ^13.17
- laravel/tinker: ^3.0
- livewire/blaze: ^1.0
- livewire/livewire: ^4.4
- nativephp/desktop: ^2.2
- robsontenorio/mary: ^2.9
Requires (Dev)
- fakerphp/faker: ^1.24
- larastan/larastan: ^3.9
- laravel/boost: ^2.2
- laravel/pail: ^1.2.5
- laravel/pao: ^1.0.6
- laravel/pint: ^1.27
- laravel/sail: ^1.53
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.9.3
- pestphp/pest: ^5.1
- pestphp/pest-plugin-laravel: ^5.0
This package is not auto-updated.
Last update: 2026-08-30 15:14:42 UTC
README
A lightweight, modern starter kit for building cross-platform desktop applications using Laravel, NativePHP Desktop, Livewire, MaryUI, and Tailwind CSS.
Motive and Purpose
This starter kit bridges that hastle of setting up a Laravel application with NativePHP Desktop, with Livewire and MaryUI:
- Full-Stack PHP for Desktop: Build native desktop applications on macOS, Windows, and Linux using familiar Laravel patterns, routing, Eloquent ORM, and SQLite database storage.
- Reactive UI Without Client Frameworks: Utilize Livewire and MaryUI to build reactive, accessible, and polished user interfaces entirely with PHP and Blade templates.
- Modern Styling Out of the Box: Styled with Tailwind CSS v4 and DaisyUI v5, providing responsive layout shells, drawers, modals, tables, toasts, and dark/light themes.
- Native OS Integrations: Seamlessly leverage NativePHP APIs for window management, system notifications, menu bars, tray icons, global shortcuts, clipboard access, and auto-updating.
- Preconfigured Developer Experience: Out-of-the-box support for Vite asset bundling, Pest testing, Larastan static analysis, and Laravel Pint code formatting.
Tech Stack
| Technology | Purpose |
|---|---|
| Laravel 13 | Backend application framework |
| NativePHP Desktop (v2) | Desktop shell and native OS bridge running on Electron |
| Livewire (v4) & Blaze | Reactive full-stack Blade components |
| MaryUI (v2) | UI component library for Livewire and DaisyUI |
| Tailwind CSS (v4) & DaisyUI (v5) | Utility-first CSS and component design system |
| Vite | Fast frontend build tool and hot module replacement |
| Pest PHP (v5) | Elegant PHP testing framework |
| Larastan / PHPStan | Static analysis and type checking |
| Laravel Pint | Code style linter and formatter |
Prerequisites
- PHP: 8.3 or higher (with SQLite, PDO, cURL, OpenSSL, and MBString extensions)
- Composer: 2.x or higher
- Node.js: 20.x or higher
- NPM: 10.x or higher
Quick Start
1. Clone the Repository
git clone <repository-url> native-desktop-app
cd native-desktop-app
2. Automated Setup
Run the comprehensive setup script to install dependencies, generate environment keys, run migrations, and compile initial assets:
composer run setup
Alternatively, perform manual setup:
# Install PHP dependencies
composer install
# Setup environment
cp .env.example .env
php artisan key:generate
# Run database migrations
touch database/database.sqlite
php artisan migrate --force
# Install and build frontend assets
npm install
npm run build
Development
Running the Desktop Application
To launch the NativePHP desktop window along with Vite for hot-reloading:
composer run native:dev
This concurrently runs:
php artisan native:run --no-interactionnpm run dev
Running the Web Interface Only
If you wish to test or debug in a standard web browser:
composer run dev
Project Structure
├── app/
│ ├── Providers/
│ │ ├── AppServiceProvider.php # Core application defaults
│ │ └── NativeAppServiceProvider.php # Native window setup & php.ini configuration
│ └── Models/ # Eloquent models
├── config/
│ └── nativephp.php # NativePHP desktop settings, update providers, updater config
├── database/
│ └── database.sqlite # Embedded SQLite database
├── resources/
│ ├── css/app.css # Tailwind v4 & DaisyUI configuration
│ ├── js/app.js # Frontend scripts
│ └── views/
│ ├── layouts/app.blade.php # MaryUI desktop layout shell (nav, drawer, toast, sidebar)
│ └── pages/users/index.blade.php # Livewire MaryUI user management demo component
├── routes/
│ ├── console.php # Artisan command schedules
│ └── web.php # Livewire routes
└── tests/ # Pest feature and unit test suite
Desktop Configuration and Packaging
Configuring Native Windows
Manage your native window properties inside app/Providers/NativeAppServiceProvider.php:
namespace App\Providers;
use Native\Desktop\Contracts\ProvidesPhpIni;
use Native\Desktop\Facades\Window;
class NativeAppServiceProvider implements ProvidesPhpIni
{
public function boot(): void
{
Window::open()
->title('Desktop App')
->width(1200)
->height(800)
->minWidth(800)
->minHeight(600)
->showDevTools(app()->isLocal());
}
public function phpIni(): array
{
return [
'memory_limit' => '512M',
];
}
}
Building Production Installers
To compile and package native installers for your operating system (e.g., .dmg for macOS, .exe/.msi for Windows, .AppImage/.deb/.rpm for Linux):
php artisan native:build
Code Quality and Testing
Run test suites and code health checks using the configured Composer scripts:
# Run full verification suite (lint check, static analysis, and Pest tests)
composer run test
# Format PHP code with Laravel Pint
composer run lint
# Check PHP formatting without applying changes
composer run lint:check
# Run Larastan static analysis
composer run types:check
Attributions and Repositories
This starter kit is built upon and acknowledges the following open-source projects and libraries:
Core Frameworks and Libraries
- Laravel Framework: laravel/framework — The PHP framework for web artisans.
- NativePHP Desktop: nativephp/laravel — Native desktop application support for Laravel.
- MaryUI: robsontenorio/mary — Beautiful Blade UI components for Livewire and DaisyUI.
- Livewire: livewire/livewire — Full-stack framework for Laravel.
- Livewire Blaze: livewire/blaze — Performance and view utilities for Livewire.
- Tailwind CSS: tailwindlabs/tailwindcss — Utility-first CSS framework.
- DaisyUI: saadeghi/daisyui — Component library for Tailwind CSS.
- Electron: electron/electron — Cross-platform desktop application framework.
Electron Plugin and Vendored Libraries
- Electron Positioner: jenslind/electron-positioner — Window positioning helper for Electron. Vendored in
nativephp/electron/electron-plugin/src/libs/positioner. - Menubar: maxogden/menubar — High-level menubar wrapper for Electron. Vendored in
nativephp/electron/electron-plugin/src/libs/menubar.
Developer Tooling and Quality Assurance
- Pest PHP: pestphp/pest — An elegant PHP testing framework.
- Larastan: larastan/larastan — PHPStan extension for Laravel.
- Laravel Pint: laravel/pint — Opinionated PHP code style fixer.
- Laravel Boost: laravel/boost — Developer acceleration guidelines and tools.
- Laravel Pail: laravel/pail — Real-time log tailing for Laravel.
- Vite: vitejs/vite — Next-generation frontend tooling.
- Laravel Vite Plugin: laravel/vite-plugin — Vite integration for Laravel applications.
- Concurrently: open-cli-tools/concurrently — Run multiple commands concurrently.
License
This starter kit is open-sourced software licensed under the MIT license.