Sitelet https://github.com/ithacaxyz/porto-react-native/commit/1f53b6314e282d514aba2cc4a3264cc1fd660655
Skip to content
This repository was archived by the owner on Oct 27, 2025. It is now read-only.

Commit 1f53b63

Browse files
authored
feat: use Porto React Native API (#7)
1 parent 52bbb9a commit 1f53b63

33 files changed

Lines changed: 4730 additions & 7169 deletions

‎.env.example‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
EXPO_UNSTABLE_LIVE_BINDINGS=true
22
IOS_APP_ID=""
33
IOS_TEST_DEVICE_UUID=""
4-
EXPO_PUBLIC_SERVER_DOMAIN="xporto.up.railway.app"
4+
# your /server deployment domain
5+
EXPO_PUBLIC_SERVER_DOMAIN=""
6+
7+
EXPO_DEBUG=true
8+
9+
# Be sure to change this to be unique to your project.
10+
EXPO_PUBLIC_TUNNEL_SUBDOMAIN=""
11+
12+
# node --eval "console.log(require('node:crypto').randomBytes(32).toString('hex'))"
13+
SIWE_SECRET=""
14+
15+
# if you're running porto locally you can use your porto tunnel url here
16+
EXPO_PUBLIC_PORTO_BASE_URL="https://id.porto.sh"
17+
18+
EXPO_PUBLIC_SCHEME="porto-rn"
19+
EXPO_PUBLIC_PORTO_HOST=""

‎.github/README.md‎

Lines changed: 1 addition & 245 deletions
Original file line numberDiff line numberDiff line change
@@ -1,247 +1,3 @@
11
# [Porto](https://porto.sh) x React Native
22

3-
A Porto React Native template.
4-
5-
## Quick Start
6-
7-
### Prerequisites
8-
9-
- [Node.js](https://nodejs.org) (LTS)<sup>1</sup>
10-
- [Yarn Classic](https://classic.yarnpkg.com) (v1.22+)<sup>1</sup>
11-
- [Expo](https://docs.expo.dev/get-started/installation)
12-
- [EAS CLI](https://docs.expo.dev/build/introduction)
13-
- iOS Requirements (skip if you're not building for iOS):
14-
- Xcode 26.0<sup>2</sup>
15-
- iOS Simulator 26.0<sup>2</sup>
16-
- Ruby 3.4.6<sup>1</sup>
17-
- Cocoapods 1.16.2<sup>1</sup>
18-
- [fastlane](https://github.com/fastlane/fastlane): `brew install fastlane`
19-
- Android Requirements (skip if you're not building for Android):
20-
- Java 21.0.7<sup>3</sup>
21-
- Gradle 9.0.0<sup>3</sup>
22-
- Android Studio<sup>4</sup>
23-
- Optional but highly recommended:
24-
- [Expo Orbit](https://docs.expo.dev/build/orbit)
25-
26-
<sup>1</sup> [mise](https://mise.jdx.dev)
27-
28-
- Once you have `ruby` installed with `mise`, use it to install `cocoapods`.
29-
30-
<sup>2</sup> [xcodes](https://github.com/XcodesOrg/xcodesApp)
31-
32-
<sup>3</sup> [sdkman](https://sdkman.io): run `sdk env install` in repo root to auto install Java and Gradle
33-
34-
<sup>4</sup> [JetBrains Toolbox](https://www.jetbrains.com/toolbox-app).
35-
Once you have Android Studio installed:
36-
37-
- install a newer SDK Platform Tools - I use 36.1 ([demo](https://share.cleanshot.com/KJ6rYZjw))
38-
- install a newer virtual device with Google Play Services enabled - I use Pixel 9 Pro Fold ([demo](https://share.cleanshot.com/LhdhbMlS))
39-
40-
____
41-
42-
### Clone Repository & Install Dependencies
43-
44-
```bash
45-
gh repo clone ithacaxyz/porto-react-native
46-
cd porto-react-native
47-
yarn install
48-
```
49-
50-
## Configuration
51-
52-
When forking this project, update the following fields in `app.config.ts`:
53-
54-
### Required Changes
55-
56-
```typescript
57-
export default (context: ConfigContext): ExpoConfig => ({
58-
// Update these fields:
59-
slug: 'your-app-slug', // Line 8
60-
name: 'Your App Name', // Line 9
61-
scheme: 'your-app-scheme', // Line 10
62-
63-
ios: {
64-
appleTeamId: 'YOUR_TEAM_ID', // Line 16
65-
bundleIdentifier: 'com.yourcompany.yourapp', // Line 17
66-
associatedDomains: ['webcredentials:your-domain.com'], // Line 18
67-
},
68-
android: {
69-
package: 'com.yourcompany.yourapp', // Line 21
70-
},
71-
extra: {
72-
eas: {
73-
projectId: 'your-expo-project-id', // Line 32
74-
},
75-
},
76-
})
77-
```
78-
79-
### Getting Your Values
80-
81-
1. **Apple Team ID**: Found in [Apple Developer Account](https://developer.apple.com/account) → Membership
82-
2. **Bundle Identifier**: Use reverse domain notation (e.g., `com.yourcompany.yourapp`)
83-
3. **EAS Project ID**: Create project at [expo.dev](https://expo.dev) and copy the project ID
84-
4. **Associated Domain**: Your server domain where you'll host the app verification files
85-
86-
## Server Directory (`./server`)
87-
88-
The `./server` directory contains a [Bun](https://bun.sh) server that serves **App Verification Files** required for:
89-
90-
### Purpose
91-
92-
- **Passkey/WebAuthn**: Enables passkey authentication across web and mobile
93-
- **Android App Links**: Verifies your app can handle Android deep links
94-
- **iOS Universal Links**: Verifies your app can handle deep links from your domain
95-
96-
### Files Served
97-
98-
- `/.well-known/apple-app-site-association` - iOS app verification
99-
- `/.well-known/assetlinks.json` - Android app verification
100-
101-
### Deploying the Server
102-
103-
I'm deploying to railway but you can deploy anywhere [./server/index.ts](../server/index.ts) can run.
104-
105-
```bash
106-
just deploy-server
107-
```
108-
109-
## Apple Associated Domains Setup
110-
111-
To enable Universal Links and passkey authentication:
112-
113-
### 1. Update App Configuration
114-
115-
In `app.config.ts`, set your domain:
116-
117-
```typescript
118-
ios: {
119-
associatedDomains: ['webcredentials:yourdomain.com'],
120-
}
121-
```
122-
123-
### 2. Configure Apple App Site Association
124-
125-
Update `server/apple-app-site-association`:
126-
127-
```json
128-
{
129-
"webcredentials": {
130-
"apps": [
131-
"YOUR_TEAM_ID.your.bundle.identifier"
132-
]
133-
}
134-
}
135-
```
136-
137-
### 3. Configure Android Asset Links
138-
139-
Use `eas credentials` and follow [this guide](https://docs.expo.dev/linking/android-app-links/#create-assetlinksjson-file) and update `server/assetlinks.json`.
140-
141-
### 5. Deploy and Verify
142-
143-
1. Deploy your server with the updated files
144-
2. Verify files are accessible:
145-
- `https://yourdomain.com/.well-known/apple-app-site-association`
146-
- `https://yourdomain.com/.well-known/assetlinks.json`
147-
3. Test deep links and passkey functionality
148-
149-
## Development
150-
151-
### (0) - Clear Old Artifacts
152-
153-
```sh
154-
rm -fr '$TMPDIR/haste-map-*'
155-
rm -fr '$TMPDIR/metro-cache'
156-
157-
rm -rf ios
158-
rm -rf android
159-
```
160-
161-
### (1) - Prebuild
162-
163-
Generate native `ios`/`android` directory, apply plugins and `build-properties`
164-
165-
```bash
166-
EXPO_NO_GIT_STATUS=1 yarn expo prebuild --platform='android' --clean
167-
```
168-
169-
### (2) - Build with EAS CLI
170-
171-
```bash
172-
ANDROID_HOME="$HOME/Library/Android/sdk" EAS_BUILD_DISABLE_BUNDLE_JAVASCRIPT_STEP=1 eas build \
173-
--platform='android' \
174-
--non-interactive \
175-
--local
176-
```
177-
178-
### (3) - Install App on Emulator/Simulator/Device
179-
180-
- Android:
181-
Your `.apk` file will have a dfferent number. Locate it in the repository root.
182-
183-
```sh
184-
adb install -r build-1234567890.apk
185-
```
186-
187-
- iOS:
188-
189-
```sh
190-
xcrun simctl install booted build-1234567890.ipa
191-
```
192-
193-
### (4) - Run Emulator/Android/iPhone
194-
195-
```sh
196-
yarn expo start --clear --tunnel --dev-client
197-
```
198-
199-
### (5) - If using Android
200-
201-
- Sign in to Google account on the emulator.
202-
203-
### (6) - If using iOS
204-
205-
- Make sure [Developer Mode](https://developer.apple.com/documentation/xcode/enabling-developer-mode-on-a-device) is enabled on the device.
206-
207-
### (7) - Press:
208-
209-
- `a` to run on Android. If your physical device is connected, it will automatically select it,
210-
- `shift + a` to view Android options,
211-
- `i` for iOS. Note that passkeys are not supported on iOS Simulator so you need to use an actual device,
212-
- `w` for Web.
213-
s.
214-
215-
When you install / update dependencies, run the following to check dependencies are deduplicated:
216-
217-
```bash
218-
yarn expo install --fix && npx expo-doctor --verbose --yarn
219-
```
220-
221-
If Expo doesn't resolve deduplication, run: `node_modules/.bin/bun scripts/dedupe.ts`
222-
223-
### Available Commands (via [just](https://github.com/casey/just))
224-
225-
> [!IMPORTANT]
226-
>
227-
> You have to build at least once before you can run the app.
228-
> You have to build any time you make changes to `app.config.ts` or to plugins or when you install new dependencies.
229-
230-
- `just build-ios` - Build iOS
231-
- `just build-android` - Build Android
232-
233-
- `just fmt` - Format code with Biome
234-
- `just dev` - Run the app and launch web, android or ios
235-
- `just doctor` - Fix dependencies and run expo doctor
236-
- `just deploy-server` - Deploy server to Railway
237-
- `just android-device` - Mirror Android device screen
238-
- `just android-cert` - Generate Android debug certificate
239-
240-
## Useful Links
241-
242-
- [Expo Documentation](https://docs.expo.dev/)
243-
- [Porto Documentation](https://porto.sh)
244-
- [Apple Associated Domains](https://developer.apple.com/documentation/xcode/supporting-associated-domains)
245-
- [Apple Universal Links](https://developer.apple.com/ios/universal-links/)
246-
- [Android App Links](https://developer.android.com/training/app-links)
247-
- [WebAuthn/Passkeys Guide](https://webauthn.guide/)
3+
See [Porto React Native docs](https://porto.sh/sdk/api/mode#modereactnative) for more information.

‎.github/workflows/check.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
bun-version: 'latest'
3030

3131
- name: 'Install Dependencies'
32-
run: yarn install --frozen-lockfile
32+
run: bun install --frozen-lockfile
3333

3434
- name: 'Expo Doctor'
3535
run: |
36-
yarn expo install --fix
37-
bun x expo-doctor --verbose --yarn
36+
bun x expo-doctor@latest --verbose --bun
37+
bun expo install --fix --bun
3838
3939
- name: 'Lint & Format'
4040
run: |

‎.gitignore‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ android/
5757
*.csr
5858
*.crl
5959
*.pem
60-
.vscode
6160
*.aab
6261

63-
*.ipa
62+
*.ipa
63+
64+
*.gz
65+
*.app/
66+
_dist

‎.sdkmanrc‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎.vscode/extensions.json‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recommendations": [
3+
"biomejs.biome",
4+
"expo.vscode-expo-tools"
5+
],
6+
"unwantedRecommendations": [
7+
"esbenp.prettier-vscode",
8+
"dbaeumer.vscode-eslint"
9+
]
10+
}

‎.vscode/settings.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"editor.formatOnSave": true,
3+
"editor.defaultFormatter": "biomejs.biome",
4+
"expo.appManifest.fileReferences": true,
5+
"expo.appManifest.pluginValidation": true,
6+
"editor.codeActionsOnSave": {
7+
"source.fixAll.biome": "always"
8+
},
9+
"[json]": {
10+
"editor.defaultFormatter": "biomejs.biome"
11+
},
12+
"[jsonc]": {
13+
"editor.defaultFormatter": "biomejs.biome"
14+
},
15+
"[typescript]": {
16+
"editor.defaultFormatter": "biomejs.biome"
17+
},
18+
"[javascript]": {
19+
"editor.defaultFormatter": "biomejs.biome"
20+
},
21+
"[html]": {
22+
"editor.defaultFormatter": "biomejs.biome"
23+
},
24+
"[css]": {
25+
"editor.defaultFormatter": "biomejs.biome"
26+
},
27+
"[typescriptreact]": {
28+
"editor.defaultFormatter": "biomejs.biome"
29+
},
30+
"[javascriptreact]": {
31+
"editor.defaultFormatter": "biomejs.biome"
32+
},
33+
"search.exclude": {
34+
"bun.lock": true,
35+
".easignore": true,
36+
".gitignore": true
37+
}
38+
}

0 commit comments

Comments
 (0)