I built a framework to turn Laravel + Livewire apps into desktop & mobile apps using PHP WebAssembly, no Electron, no React Native

php dev.to

Hey everyone,

I've been working on a side project called NativeBlade and wanted to share it with the community.

The idea is simple: take your Laravel + Livewire app and run it as a native desktop or mobile application. No server needed. No Electron. No JavaScript frameworks. Just PHP and Blade.

How it works

Your entire Laravel application gets bundled and runs inside a PHP WebAssembly runtime, wrapped in a https://v2.tauri.app shell. The architecture looks like this:

  • PHP 8.3 runs in the browser via WebAssembly

  • Blade templates and Livewire components work as-is

  • SQLite database persists to IndexedDB (survives app restarts)

  • Native shell components (header, bottom nav, drawer) render outside the WebView — no flicker during navigation

  • Native OS features (dialogs, notifications, system tray) work through a bridge

The whole thing started as a weekend experiment: "what if I could just composer require something and turn my Laravel app into a desktop app?"

What it can do

  • Desktop: Windows, macOS, Linux with native menus and system tray

  • Mobile: Android & iOS with status bar, safe area, swipe back

  • External HTTP requests: Http::get() works transparently through a JS bridge — PHP signals what it needs, JavaScript makes the real fetch, PHP re-executes with the cached

response. You can even use NativeBlade::pool() to run multiple requests in parallel via Promise.all()

  • 1,512 built-in icons from https://phosphoricons.com/ — works in both shell components and Blade templates

  • Hot reload during development via a Vite plugin that watches PHP/Blade files

  • Offline-first — everything runs client-side, no internet required after install

That's it. Your Laravel app is now a desktop application.

What doesn't work

I want to be upfront about the limitations. Since PHP runs in WebAssembly, there's no real server:

  • No queues/jobs — no background worker process

  • No mail — no SMTP from WASM

  • No MySQL/Postgres — SQLite only

  • No sessions — uses a built-in state management instead

  • No cron/scheduling

  • Http::get() works but through a bridge (not native PHP networking)

It's not meant to replace server-side Laravel. It's for apps that run locally and don't need a backend, think tools, dashboards, utilities, offline apps.

Why I'm sharing this

This started as a learning project and I'd love to get feedback from the PHP community. The codebase touches a lot of interesting areas:

  • PHP WebAssembly internals

  • Tauri 2 (Rust-based alternative to Electron)

  • Livewire's lifecycle inside a non-standard runtime

  • Bridging sync PHP with async JavaScript

If any of this sounds interesting to you — whether you want to contribute, experiment, or just tell me what I'm doing wrong — I'd appreciate it.

GitHub: https://github.com/NativeBlade/NativeBlade

Happy to answer any questions!

Source: dev.to

arrow_back Back to Tutorials