定制 nativephp/mobile-api-starter-kit 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nativephp/mobile-api-starter-kit

Composer 安装命令:

composer create-project nativephp/mobile-api-starter-kit

包简介

The official NativePHP API starter kit for Mobile.

README 文档

README

A complete mobile app starter kit built with Laravel, NativePHP, Livewire, and Tailwind CSS. Features authentication, news feed, and native mobile UI components.

📚 NativePHP Documentation

Features

  • 🔐 Complete authentication system with Sanctum API tokens
  • 📱 Native mobile UI components (top bar, side navigation)
  • 📰 RSS news feed integration with Laravel News
  • 🔒 Secure token storage using device Keychain/KeyStore
  • 🎨 Beautiful Tailwind CSS styling with dark mode support
  • ⚡ Livewire for reactive components
  • 🌊 Smooth page transitions
  • 📖 In-app browser for external links

Requirements

  • PHP 8.3+
  • Laravel 11+
  • Node.js & NPM
  • Android Studio (for Android development)
  • Xcode (for iOS development, macOS only)
  • NativePHP License

Installation

laravel new my-app --using=nativephp/mobile-api-starter-kit
cd my-app
cp .env.example .env
php artisan native:install

What's Included

  • Authentication Pages: Login, Register, Profile
  • Home Dashboard: Welcome page with user info
  • News Feed: Laravel News RSS reader with images
  • API Integration: Ready-to-use API client with Sanctum authentication
  • Native Components: Top bar, side navigation, in-app browser
  • Secure Storage: Token management with device security

Development

Setting Up Your API Server

The mobile app needs to connect to your Laravel API. For local development, you need to expose your local server so the mobile device/simulator can access it.

Option 1: Using Laravel Herd (Recommended for macOS)

# Share your local site
herd share

# Update .env with the provided URL
API_URL=https://ABC123.sharedwithexpose.com

Option 2: Using ngrok

# Start local laravel server
php artisan serve

# Start ngrok tunnel
ngrok http 8000

# Update .env with the provided URL
API_URL=https://ABC123.ngrok-free.app

Running the Mobile App

# Install assets Android
npm install && npm run build -- --mode=android

# Install assets iOS
npm install && npm run build -- --mode=ios

# Run on iOS simulator/device (macOS only)
php artisan native:run ios

# Run on Android emulator/device
php artisan native:run android

# Hot reloading
php artisan native:watch ios
php artisan native:watch android

License

Open-sourced software licensed under the MIT license.

统计信息

  • 总下载量: 51
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 9
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 9
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-02