PHPackages                             nativeblade/nativeblade - 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. nativeblade/nativeblade

ActiveLibrary[Framework](/categories/framework)

nativeblade/nativeblade
=======================

Build desktop and mobile apps with Laravel + Livewire

v2.2.3(1w ago)136242↓33.3%8[2 issues](https://github.com/NativeBlade/NativeBlade/issues)1MITPHPPHP 8.3.\*|8.4.\*|8.5.\*CI passing

Since Apr 6Pushed 2d ago4 watchersCompare

[ Source](https://github.com/NativeBlade/NativeBlade)[ Packagist](https://packagist.org/packages/nativeblade/nativeblade)[ GitHub Sponsors](https://github.com/NativeBlade)[ Fund](https://ko-fi.com/NativeBlade)[ RSS](/packages/nativeblade-nativeblade/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (6)Versions (151)Used By (1)

 [![NativeBlade](banner_nb.png)](banner_nb.png)

 **Build desktop &amp; mobile apps with Laravel + Livewire. No Electron. No React Native. Just PHP.**

 [![Tests](https://github.com/NativeBlade/NativeBlade/actions/workflows/tests.yml/badge.svg)](https://github.com/NativeBlade/NativeBlade/actions/workflows/tests.yml) [![Discord](https://camo.githubusercontent.com/21bcf2f16cd91eb55d87e708baecb6623dbff8c363498d411af045234e74b63e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446973636f72642d4a6f696e253230436f6d6d756e6974792d3538363546323f6c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465)](https://discord.gg/Vzpach5J2h)

 [Configuration](CONFIGURATION.md) • [Components](COMPONENTS.md) • [Directives &amp; Attributes](DIRECTIVES.md) • [Architecture](ARCHITECTURE.md) • [Navigate](NAVIGATE.md) • [Plugins](PLUGINS.md) • [Push](PUSH.md) • [Analytics](ANALYTICS.md) • [Media](MEDIA.md) • [Animations](ANIMATIONS.md) • [Lifecycle](LIFECYCLE.md) • [Database](DATABASE.md) • [Cache](CACHE.md) • [Languages](MULTI-LANGUAGE.md) • [Filesystem](FILESYSTEM.md) • [Build](BUILD.md) • [Scheduler](SCHEDULER.md) • [Auto-Update](UPDATES.md) • [Publish](PUBLISH.md) • [MCP (AI agents)](MCP.md)

---

 [![NativeBlade Demo](hello.gif)](hello.gif)

---

NativeBlade lets Laravel developers build **desktop** and **mobile** apps using only **PHP and Blade**. Your entire Laravel + Livewire application runs inside a PHP WebAssembly runtime, wrapped in a [Tauri 2](https://v2.tauri.app) shell. No JavaScript frameworks. No API layers. Just the Laravel you already know.

Features
--------

[](#features)

- **Pure Laravel** — Routes, Livewire components, Blade templates, Eloquent (SQLite)
- **Tiny Bundle** — A full Laravel + Livewire app compresses to **~6 MB gzipped** (see [BUILD.md](BUILD.md#bundle-size--the-absurd-part))
- **Native Shell** — Top bar, bottom navigation, drawer, modal, tray — all outside the WebView
- **Native APIs** — Dialogs, notifications, camera, geolocation, haptics, biometric, NFC, barcode
- **Desktop** — Windows, macOS, Linux with native menus and system tray
- **Mobile** — Android &amp; iOS with status bar, safe area, orientation control
- **Push Notifications** — Server-pushed notifications via FCM (Android) and APNS (iOS) that wake the app even when closed
- **Analytics:** Firebase Analytics via the native SDK (events, screens, user properties), with auto screen tracking and consent controls
- **Animations** — 90+ [Animate.css](https://animate.style/) animations + custom NativeBlade animations via `nb-animation` attribute
- **Offline-First** — SQLite persisted to IndexedDB, works without a server
- **Hot Reload** — Vite HMR for instant feedback during development, plus `--build` mode to preview the production bundle locally
- **Icons** — 3,024 [Phosphor Icons](https://phosphoricons.com/) (regular + fill) included
- **Custom Fonts** — Offline font loading via base64 embedding
- **Page Transitions** — Fade, slide, zoom, flip, bounce, blur — powered by Animate.css
- **AI-Ready** — Built-in [MCP server](MCP.md) so Claude Code, Cursor, and Windsurf can introspect your live project (declared plugins, facade methods, framework docs) instead of guessing

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

[](#requirements)

- PHP 8.3, 8.4, or 8.5 (with GD extension)
- Laravel 11, 12, or 13
- Livewire 3
- Node.js 20+
- Rust — [install here](https://www.rust-lang.org/tools/install)

Quick Start
-----------

[](#quick-start)

```
# 1. Create a new Laravel project
composer create-project laravel/laravel my-app
cd my-app

# 2. Install NativeBlade
composer require nativeblade/nativeblade
php artisan nativeblade:install

# 3. Build the frontend
npm run build

# 4. Launch the desktop app
php artisan nativeblade:dev
```

```
✓ src-tauri/          — Tauri project
✓ layouts/            — Blade layouts with shell support
✓ vite.wasm.config.js — Vite config for WASM bundling
✓ AppServiceProvider  — NativeBlade config
✓ Demo app            — Login, Trail, Lesson, Rank, Profile

```

> The first run compiles the Rust binary, which takes a few minutes. Subsequent runs are fast.

### Add Mobile

[](#add-mobile)

```
php artisan nativeblade:add android
php artisan nativeblade:dev --platform=android --host=192.168.0.10

php artisan nativeblade:add ios
php artisan nativeblade:dev --platform=ios --host=192.168.0.10
```

> **Mobile requires `--host=`** so the device/emulator can reach the Vite dev server running on your machine. Replace `192.168.0.10` with your computer's LAN IP (find it with `ipconfig` on Windows or `ifconfig` / `ip addr` on macOS/Linux). `localhost` won't work because the phone can't reach your machine through it.

### NativeBlade Portal — test on real devices without building

[](#nativeblade-portal--test-on-real-devices-without-building)

A companion app for iOS and Android that loads any NativeBlade dev bundle by URL or QR scan. Install once, then point it at your `nativeblade:dev` server to preview your app on a real device with no Xcode / Android Studio build needed.

[![Available on the App Store](https://camo.githubusercontent.com/3ca692b673e48a18995f9955df4011b3b4581444d733d191275d85411c14e0ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f41707025323053746f72652d446f776e6c6f61642d3061383466663f6c6f676f3d6170706c65266c6f676f436f6c6f723d7768697465)](https://apps.apple.com/us/app/nativeblade/id6765935943)[![Get it on Google Play](https://camo.githubusercontent.com/6b4cae5c268d6861982a80d9640150c2b43e53e7974630b5e4f71c6cde4dbe7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f6f676c65253230506c61792d446f776e6c6f61642d3638396633383f6c6f676f3d676f6f676c65706c6179266c6f676f436f6c6f723d7768697465)](https://play.google.com/store/apps/details?id=com.nativeblade.app)

```
php artisan nativeblade:dev --platform=portal --host=192.168.0.10
```

Open the Portal app on your phone, scan the QR shown in your terminal (or paste the URL), and your Laravel + Livewire app loads in seconds. Switch between projects by changing the URL — no rebuild required.

### Preview the Production Bundle

[](#preview-the-production-bundle)

Test the exact bundle that will ship — without the Vite dev server and without running a full `nativeblade:build`:

```
php artisan nativeblade:dev --build
php artisan nativeblade:dev --platform=android --build
php artisan nativeblade:dev --platform=ios --build
```

Builds the frontend once, points Tauri at `dist-wasm/`, and launches the app. Ideal for validating the real production payload or iterating on Rust/native shell without HMR in the way. See [BUILD.md](BUILD.md#production-preview---build).

UI Components
-------------

[](#ui-components)

NativeBlade ships only the shell + runtime, not a styled component library. Pick a UI kit that fits the form factor:

Form factorRecommended kitInstall**Mobile** (iOS + Android)[`nativeblade/ui-mobile`](https://github.com/NativeBlade/ui-mobile) — Konsta-inspired Blade components with iOS and Material themes auto-detected per platform`composer require nativeblade/ui-mobile`**Desktop** (Windows, macOS, Linux)[Flux UI](https://fluxui.dev) — official Livewire UI kit by Caleb Porzio. Free core + paid Pro`composer require livewire/flux`Any Livewire-compatible Blade UI library works (Filament, mary-ui, TallStackUI, Wireui, etc.). The shell, router, and bridges are component-agnostic.

How It Works
------------

[](#how-it-works)

```
┌─────────────────────────────────────────────┐
│  Tauri Shell (native window)                │
│  ┌──────────────────────────────┐           │
│  │  Top Bar / Header            │  ← Shell  │
│  ├──────────────────────────────┤           │
│  │                              │           │
│  │   iframe (srcdoc)            │           │
│  │   ┌──────────────────────┐   │           │
│  │   │  Laravel + Livewire  │   │  ← Your  │
│  │   │  via PHP WebAssembly │   │    App    │
│  │   └──────────────────────┘   │           │
│  │                              │           │
│  ├──────────────────────────────┤           │
│  │  Bottom Navigation           │  ← Shell  │
│  └──────────────────────────────┘           │
└─────────────────────────────────────────────┘

```

1. **Boot** — PHP WebAssembly loads your Laravel app (8.3, 8.4, or 8.5)
2. **Migrate** — Pending migrations run automatically
3. **onBoot** — Your startup code runs (license check, data sync, API calls) while splash is visible
4. **Route** — Each navigation runs through Laravel's router inside WASM
5. **Render** — Blade/Livewire HTML is rendered in an iframe
6. **Intercept** — Fetch interceptor routes HTTP requests through WASM
7. **Bridge** — Native actions flow through `postMessage`
8. **Schedule** — Rust timers execute recurring tasks via Laravel Schedule
9. **Persist** — SQLite syncs to IndexedDB automatically

Database
--------

[](#database)

Migrations run automatically on boot — no `php artisan migrate` needed. Use standard Laravel migrations and Eloquent:

```
php artisan make:model Task -m
```

```
// Migration runs automatically when the app opens
Schema::create('tasks', function (Blueprint $table) {
    $table->id();
    $table->string('title');
    $table->boolean('done')->default(false);
    $table->timestamps();
});
```

```
// Eloquent works as usual
Task::create(['title' => 'Buy milk']);
$tasks = Task::where('done', false)->get();
$task->update(['done' => true]);
```

onBoot Hook
-----------

[](#onboot-hook)

Run code before the app becomes visible. Splash stays up until complete:

```
NativeBladeConfig::onBoot(function () {
    $license = Http::get('https://api.myapp.com/license/check')->json();
    NativeBlade::setState('license', $license);
});
```

HTTP Bridge, Storage, Eloquent — everything works inside `onBoot`. See [LIFECYCLE.md](LIFECYCLE.md).

Scheduler
---------

[](#scheduler)

Laravel Schedule powered by Rust native timers. Define in `routes/console.php`:

```
use Illuminate\Support\Facades\Schedule;

Schedule::call(fn () => SyncService::run())->everyFiveMinutes()->name('sync');
Schedule::call(fn () => CacheService::cleanup())->daily()->name('cleanup');
```

All Laravel frequency methods work. Overdue tasks execute on next app open. See [LIFECYCLE.md](LIFECYCLE.md).

State Management
----------------

[](#state-management)

```
use NativeBlade\Facades\NativeBlade;

NativeBlade::setState('auth.user', ['name' => 'John']);
$user = NativeBlade::getState('auth.user');
NativeBlade::forget('auth.user');
NativeBlade::flush();
```

Log
---

[](#log)

Write log entries from any PHP context (Livewire actions, schedules, routes, `mount()`) and see them in the Tauri devtools console in real time. Works even when PHP crashes mid-execution — the logs written before the crash are preserved.

```
use NativeBlade\Facades\NativeBlade;

NativeBlade::log('App started');
NativeBlade::log('Retrying', ['attempt' => 3], 'warn');
NativeBlade::log('Payment failed', ['error' => $e->getMessage()], 'error');
NativeBlade::log('Query ran', ['ms' => 12], 'debug');
```

Each level maps to a `console.*` method and a color in the `[NB:]` prefix:

LevelConsole methodPrefix color`info` (default)`console.log`blue`warn``console.warn`orange`error``console.error`red`debug``console.debug`purpleThe context array is rendered as an expandable object in the browser devtools.

Platform Detection
------------------

[](#platform-detection)

```
NativeBlade::platform();   // 'windows', 'macos', 'linux', 'android', 'ios'
NativeBlade::isDesktop();
NativeBlade::isMobile();
NativeBlade::isAndroid();
NativeBlade::isIos();
```

Navigation
----------

[](#navigation)

```
NativeBlade::navigate('/dashboard')->toResponse();
NativeBlade::navigate('/', replace: true)->toResponse();
```

```
Users
Home
```

Authentication
--------------

[](#authentication)

```
// Middleware
$user = NativeBlade::getState('auth.user');
if (!$user) {
    return NativeBlade::navigate('/login')->toResponse();
}

// Login
NativeBlade::setState('auth.user', ['name' => 'Admin', 'email' => $email]);
return NativeBlade::navigate('/', replace: true)->toResponse();

// Logout
NativeBlade::forget('auth.user');
NativeBlade::navigate('/login', replace: true)->toResponse();
```

HTTP Bridge
-----------

[](#http-bridge)

Laravel's `Http` facade works transparently — WASM can't make network requests directly, so NativeBlade bridges them through JavaScript:

```
$response = Http::get('https://api.github.com/users');

// Parallel requests
$responses = NativeBlade::pool(fn ($pool) => [
    $pool->get('https://api.com/users'),
    $pool->get('https://api.com/posts'),
]);
```

Laravel Compatibility
---------------------

[](#laravel-compatibility)

NativeBlade is a **client-side runtime**, so anything inherently server-side (sending email, processing queues, running cron daemons) is intentionally not built in — your Laravel server handles those, and the client talks to it.

Works nativelyVia bridgeVia your Laravel serverCustom plugin / shell componentRouting, Blade, Livewire`Http` facade (REST/GraphQL)Queues, jobs, dispatched tasksWebSockets / Pusher / ReverbEloquent on SQLite (local)MySQL / PostgreSQL / MariaDB (remote, via Rust)Mail (SMTP, Mailgun, SES)BLE, Bluetooth ClassicMiddleware, ValidationNative Filesystem (Storage)Redis, MemcachedThermal printer (ESC/POS)Collections, Carbon, Eloquent relationsCamera, Gallery, Video, Barcode, NFCFile Storage (S3, R2, GCS)Payment terminals (TEF)Service Container, FacadesBiometric, Push (FCM/APNS), HapticsHeavy reports / aggregationsSAT / fiscal printersLocalization, Validation rulesGeolocation, Clipboard, NotificationsAuth providers (OAuth, SSO)Anything else with `tauriInvoke`Migrations (auto on boot)Tauri/Rust commands, Upload streamingTask Scheduling (Rust timers)Custom plugins via `tauriInvoke`> **WebSockets specifically:** Livewire's `wire:poll` covers most "real-time" needs in business apps with zero infrastructure. For genuine real-time (chat with typing indicators, collaborative editing), build a shell component that lives outside the iframe, connects to your WS server, and dispatches Livewire events. See [PLUGINS.md → Composer plugin discovery](PLUGINS.md#composer-plugin-discovery).

Documentation
-------------

[](#documentation)

DocDescription[CONFIGURATION.md](CONFIGURATION.md)Desktop, Android, iOS configs, permissions, privacy manifest, transitions[ARCHITECTURE.md](ARCHITECTURE.md)Opinionated app structure — Component = Controller, services, state wrappers, push handlers, folder layout[NAVIGATE.md](NAVIGATE.md)SPA routing — `wire:nb-navigate` directive, `NativeBlade::navigate()`, transition and replace modifiers[COMPONENTS.md](COMPONENTS.md)Shell components, icons, images, skeleton, fonts, safe area, custom components[DIRECTIVES.md](DIRECTIVES.md)wire:nb-bridge, wire:nb-navigate, nb-feedback, native actions[PLUGINS.md](PLUGINS.md)Built-in Tauri 2 plugin bridges (dialogs, notifications, clipboard, geolocation, haptics, biometric, barcode, NFC, opener, OS info)[PUSH.md](PUSH.md)Server push notifications via FCM (Android) and APNS (iOS)[MEDIA.md](MEDIA.md)Native camera, gallery and video pickers with on-device resize[ANIMATIONS.md](ANIMATIONS.md)nb-animation, Animate.css, custom animations, haptic feedback[DATABASE.md](DATABASE.md)SQLite local, native MySQL/PostgreSQL/MariaDB via Rust bridge[CACHE.md](CACHE.md)Cache::\* auto-wired to SQLite, TTL/locks/remember, state vs cache decision[MULTI-LANGUAGE.md](MULTI-LANGUAGE.md)Device-language-first locale resolution, shell + Laravel translation layers, `setLanguage()` runtime switching, accessibility[LIFECYCLE.md](LIFECYCLE.md)Boot sequence, onBoot hook, clock sync, migrations[SCHEDULER.md](SCHEDULER.md)Task scheduling with Rust native timers[FILESYSTEM.md](FILESYSTEM.md)Native filesystem, Storage driver, camera integration[BUILD.md](BUILD.md)Build command, output, CLI commands, icon generation[UPDATES.md](UPDATES.md)Auto-update for desktop and mobile[PUBLISH.md](PUBLISH.md)Publishing to stores[MCP.md](MCP.md)Built-in MCP server so Claude Code / Cursor / Windsurf can introspect your live project (declared plugins, facade methods, framework docs)How NativeBlade Differs
-----------------------

[](#how-nativeblade-differs)

NativeBladeElectronReact NativeFlutter**Language**PHP + BladeJavaScriptJavaScriptDart**Backend**Built-in (Laravel)SeparateSeparateSeparate**Binary Size**~15 MB~150 MB~30 MB~20 MB**App Bundle**~6 MB gzip (full Laravel)———**Learning Curve**None (if you know Laravel)MediumHighHigh**Native UI**Shell + WebViewWebView onlyNativeCustom rendering**Offline**Yes (WASM + IndexedDB)ManualManualManualTesting
-------

[](#testing)

NativeBlade ships with a three-layer test suite that runs on every push to `main` via [GitHub Actions](https://github.com/NativeBlade/NativeBlade/actions/workflows/tests.yml).

**PHP** — PHPUnit against Laravel 11/12/13 on PHP 8.3/8.4/8.5 via Testbench:

```
composer test
composer test:coverage          # text summary (needs pcov or Xdebug)
composer test:coverage-html     # full HTML report in build/coverage/
```

**JavaScript** — `node:test` suite covering the runtime bridges (db/http/fs), action handlers and ctx helpers. No browser needed:

```
npm test
```

**Rust** — `cargo test` suite covering the Tauri command handlers (config, fileops, database row serialization, scheduler). sqlx integration tests use in-memory SQLite:

```
cd rust
cargo test --lib
```

**Run everything locally:**

```
composer test && npm test && (cd rust && cargo test --lib)
```

Sponsor &amp; Support
---------------------

[](#sponsor--support)

NativeBlade is free and 100% open source, with no paid tier and no closed core. If it saves your team time, sponsoring is how you keep it that way.

- **[Sponsor the project](SPONSORS.md)** — support tiers for individual developers and companies, plus sponsored features
- **[Business Support](SUPPORT.md)** — a private channel and a guaranteed response time for teams running NativeBlade in production

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

License
-------

[](#license)

MIT

---

 Built with Laravel, Livewire, Tauri, and PHP WebAssembly.
 [Jefferson T.S](https://www.linkedin.com/in/jefferson-silva-66bba7aa/)

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance98

Actively maintained with recent releases

Popularity32

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Every ~0 days

Total

138

Last Release

12d ago

Major Versions

v0.9.22 → v1.0.02026-04-16

v1.8.2 → v2.0.02026-05-18

PHP version history (2 changes)v0.1.0PHP 8.3.\*

v0.9.6PHP 8.3.\*|8.4.\*|8.5.\*

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45333690?v=4)[Jefferson T.S](/maintainers/jeffleyd)[@jeffleyd](https://github.com/jeffleyd)

---

Top Contributors

[![jeffleyd](https://avatars.githubusercontent.com/u/45333690?v=4)](https://github.com/jeffleyd "jeffleyd (306 commits)")

---

Tags

desktoplaravellivewiremobilenative-bladenativebladephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nativeblade-nativeblade/health.svg)

```
[![Health](https://phpackages.com/badges/nativeblade-nativeblade/health.svg)](https://phpackages.com/packages/nativeblade-nativeblade)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[statamic/cms

The Statamic CMS Core Package

4.8k3.5M901](/packages/statamic-cms)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[unopim/unopim

UnoPim Laravel PIM

10.1k2.2k](/packages/unopim-unopim)[nasirkhan/laravel-starter

A CMS like modular Laravel starter project.

1.4k2.7k](/packages/nasirkhan-laravel-starter)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21313.7k3](/packages/ecotone-laravel)

PHPackages © 2026

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