Skip to content
NativePHPPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

SyncUp

The companion repository for the NativePHP Masterclass. SyncUp is a mobile chat app built with Laravel and NativePHP Mobile, using fully native UI (SuperNative components and EDGE elements).

The backend it talks to lives in its own repository: NativePHP/syncup-api.

Sign up for the course: nativephp.com/course

How This Repository Is Organized

Each commit holds the work from one video in the course, so you can jump to the state of the app at the end of any video.

Commit message Video
Initial commit Starting point: a fresh NativePHP Mobile starter app
Building UI With EDGE The Login screen, built with EDGE elements
State and Interactions Component state, form binding, and the Register screen
Layouts and Navigation The tab bar layout, title bars, and moving between screens
Authentication Logging in against the backend, staying logged in with an encrypted token, and logging out

Getting Started

Requirements

  • PHP 8.4+
  • Composer
  • For iOS: macOS with Xcode and an iOS simulator
  • For Android: Android Studio with an emulator (or a physical device)

For more detail, see the NativePHP Mobile documentation.

Clone and install

git clone https://github.com/NativePHP/syncup.git
cd syncup
composer install
cp .env.example .env
php artisan key:generate

Set a unique app ID in .env using reverse-domain notation, for example:

NATIVEPHP_APP_ID=com.yourname.syncup

Then install the native shell:

php artisan native:install

Run the app

php artisan native:run ios        # or: php artisan native:run android

To hot reload while you edit, add --watch (php artisan native:run ios --watch) or run php artisan native:watch in another terminal.

You don't need to run migrations yourself for the app. NativePHP runs them on the device when the app starts.

Viewing the App at the End of a Video

  1. List the commits (oldest first) to find the one for that video:

    git log --oneline --reverse
  2. Check out that commit using its hash:

    git checkout <commit-hash>

    Git will say you're in a "detached HEAD" state. That's expected. You're viewing a snapshot, not a branch.

  3. Reinstall dependencies, because they may have changed between videos, then rebuild the app:

    composer install
    php artisan native:run ios        # or android
  4. When you're done, go back to the latest version:

    git checkout main

Coding along from a specific video

To write code on top of a particular video's state, create a branch from that commit:

git switch -c my-work <commit-hash>

Seeing what changed in a video

To see exactly what a video added or changed:

git show <commit-hash>              # full diff for that video
git show --stat <commit-hash>       # just the list of files changed

Running Tests

php artisan test

Troubleshooting

  • Changes don't show up on the device: rebuild with php artisan native:run. Native code and plugins are only compiled in at build time.
  • Build fails after switching commits: run composer install again, then php artisan native:install to refresh the native shell.
  • "installed but not registered" plugin warning: run php artisan native:plugin:register vendor/plugin-name.

License

SyncUp is open-source software licensed under the MIT license.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages