Starterkit for NativePHP projects using inertia, typescript, sass, vue 3, and NativePHP Mobile
weswecan/nativephp-starter-kit is a Laravel package for starterkit for nativephp projects using inertia, typescript, sass, vue 3, and nativephp mobile.
It currently has 0 GitHub stars and 6 downloads on Packagist.
Install it with composer require weswecan/nativephp-starter-kit.
Discover more Laravel packages by weswecan
or browse all Laravel packages to compare alternatives.
Last updated
A Laravel 12 starter kit configured for building native iOS and Android applications using NativePHP Mobile, with Vue 3 + Inertia, TypeScript, Ziggy route helpers, axios, and SCSS via Vite.
laravel-vite-plugin + nativephpMobile pluginvite-plugin-vue-devtools@routes in Blade, ZiggyVue in Vue)bootstrap.tsresources/js/app.ts: Inertia + Vue app bootstrap, imports ../scss/index.scss, registers ZiggyVueresources/js/bootstrap.ts: axios on window, sets X-Requested-Withresources/js/Pages/*.vue: Inertia pages (TypeScript SFCs)resources/js/Layouts/BasicLayout.vue: Base layout with <Head />resources/scss/index.scss: global styles (uses _variables.scss)resources/views/app.blade.php: Inertia root, includes @routes + @vitevite.config.js: Laravel + Vue + Vue DevTools + NativePHP Mobile pluginstsconfig.json: strict TS, path aliases (@/*, ziggy-js)config/nativephp.php: NativePHP Mobile configurationnative: Custom wrapper script for NativePHP commands (use ./native instead of php artisan native)script setup lang="ts" at the top, then template. No <style> blocks in SFCs.resources/scss/ and import from app.ts.@/ for resources/js (configured in tsconfig.json).route() in Vue (via ZiggyVue) and in Blade via @routes.VITE_APP_NAME for suffix.composer install
cp .env.example .env
php artisan key:generate
yarn install
Before running your app, configure NativePHP in .env:
NATIVEPHP_APP_ID=com.yourcompany.yourapp
NATIVEPHP_APP_VERSION=DEBUG
NATIVEPHP_APP_VERSION_CODE=1
NATIVEPHP_DEVELOPMENT_TEAM=YOUR_TEAM_ID # iOS only, optional
Then install NativePHP dependencies:
php artisan native:install
Or use the custom wrapper:
./native install
Start development server (runs Laravel server, queue worker, Pail logs, and Vite):
composer run dev
Or run separately:
# Terminal 1: Laravel server
php artisan serve
# Terminal 2: Vite dev server
yarn dev
Build for iOS:
yarn build:ios
# or
yarn run:ios # Builds and runs in one command
Build for Android:
yarn build:android
# or
yarn run:android # Builds and runs in one command
Run on device/emulator (builds first):
php artisan native:run ios
php artisan native:run android
# or use the wrapper
./native run ios
./native run android
Hot reloading (watches for changes and auto-reloads):
yarn watch
# or specify platform
yarn watch:ios
yarn watch:android
# or use artisan directly
php artisan native:watch
php artisan native:watch ios
php artisan native:watch android
Run with watch (build, deploy, then watch):
yarn run:watch:ios
yarn run:watch:android
# or use artisan directly
php artisan native:run --watch ios
php artisan native:run --watch android
Open in Xcode/Android Studio:
php artisan native:open ios
php artisan native:open android
View logs:
php artisan native:tail
Web build:
yarn build
Mobile builds (run before native:run):
yarn build:ios # Build assets for iOS
yarn build:android # Build assets for Android
composer test
# or
php artisan test
Vue SFC-aware type-check:
yarn dlx vue-tsc --noEmit
Plain TypeScript (non-SFC):
yarn tsc --noEmit
@routesZiggyVue):route('index')
route('posts.show', { post: 1 })
This starter kit includes NativePHP Mobile v3.0 configured with:
System::isIos() and System::isAndroid() in PHPnative:bottom-nav, native:top-bar, etc.)See the NativePHP Mobile documentation for full API reference.
NATIVEPHP_APP_VERSION=DEBUG during development to ensure Laravel always refreshesnative:watch) for faster iteration - no need to rebuild after every changeyarn build:ios or yarn build:android before native:runwindow.axios with X-Requested-With set.assetsInclude: ['**/*.glsl'] is enabled in Vite if you import GLSL assets.native wrapper script allows shorter commands: ./native run ios instead of php artisan native:run iosdev script uses Yarn internally (not npm)