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
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 |
- 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.
git clone https://github.com/NativePHP/syncup.git
cd syncup
composer install
cp .env.example .env
php artisan key:generateSet a unique app ID in .env using reverse-domain notation, for example:
NATIVEPHP_APP_ID=com.yourname.syncupThen install the native shell:
php artisan native:installphp artisan native:run ios # or: php artisan native:run androidTo 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.
-
List the commits (oldest first) to find the one for that video:
git log --oneline --reverse
-
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.
-
Reinstall dependencies, because they may have changed between videos, then rebuild the app:
composer install php artisan native:run ios # or android -
When you're done, go back to the latest version:
git checkout main
To write code on top of a particular video's state, create a branch from that commit:
git switch -c my-work <commit-hash>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 changedphp artisan test- 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 installagain, thenphp artisan native:installto refresh the native shell. - "installed but not registered" plugin warning: run
php artisan native:plugin:register vendor/plugin-name.
SyncUp is open-source software licensed under the MIT license.