Privatefolio Expo (Mobile) Setup
Privatefolio Expo (Mobile) Setup
Section titled “Privatefolio Expo (Mobile) Setup”This document explains how to run, build, and publish the Privatefolio mobile app powered by Expo.
Overview
Section titled “Overview”- The mobile app currently wraps the hosted web app in a React Native
WebViewand provides a native shell for distribution on iOS/Android. Native features can be layered in incrementally. - Source lives in
packages/expoand uses Expo SDK 53, React 19, React Native 0.79.
Project Layout
Section titled “Project Layout”packages/expo/package.json: scripts and dependenciespackages/expo/eas.json: EAS build/submit profilespackages/expo/app.json: Expo config (name, icons, Android package, splash, plugin config)packages/expo/app/index.tsx: App entry usingWebViewpointing tohttps://privatefolio.app
Prerequisites
Section titled “Prerequisites”- Node.js 20+
- Yarn 1.x (workspaces)
- Expo tooling: you can use
npx expowithout a global install - For EAS builds:
eas-cli(yarnwill install it locally) and an Expo account (eas login)
Install Dependencies
Section titled “Install Dependencies”From the repository root:
yarnRun in Development
Section titled “Run in Development”You can run from the workspace root using Yarn workspaces or by cd into the package.
Option A (from root, via workspace):
yarn workspace privatefolio-expo devOption B (inside the package):
cd packages/expoyarn dev # starts Expo with a tunnel# oryarn dev:android # open Android emulator/deviceyarn dev:ios # open iOS simulator (macOS)yarn dev:web # run via web targetNotes:
- First run will prompt you to open the app on a device/simulator or a browser.
- If Metro cache causes issues, restart with
npx expo start -c.
What the App Does (Today)
Section titled “What the App Does (Today)”packages/expo/app/index.tsx renders a WebView pointing to https://privatefolio.app with sensible defaults (loading spinner, storage enabled, mixed content compatibility for charts, etc.). This enables a fast mobile presence while preserving the web UI. The app.json sets the deeplink scheme to privatefolio for future use.
Configuration Reference
Section titled “Configuration Reference”-
package.json(scripts & deps)dev,dev:android,dev:ios,dev:web- EAS:
build:*,submit:*,publish - Key deps:
expo,expo-router,react-native-webview,@react-navigation/native
-
app.json(Expo config)- Name/slug:
Privatefolio/privatefolio - Scheme:
privatefolio(deeplinks likeprivatefolio://) - Android: package
xyz.privatefolio.mobile, edge-to-edge enabled, adaptive icon - Web: uses
metrobundler, static output for previews - Plugins:
expo-router,expo-splash-screen
- Name/slug:
-
eas.json(EAS profiles)build.production: auto-increment version, caching enabledsubmit.production.android: usesGOOGLE_SERVICE_ACCOUNT_KEY_PATHfor Play Store submission, trackproduction
Building with EAS
Section titled “Building with EAS”Login once (only needed on a new environment):
npx eas loginBuild commands (run from repo root or packages/expo):
yarn workspace privatefolio-expo bundle:androidyarn workspace privatefolio-expo bundle:iosArtifacts are created on EAS servers; the CLI will provide download/install links.
Submitting to Stores
Section titled “Submitting to Stores”Android (requires a Google Cloud service account JSON with Play Console access):
export GOOGLE_SERVICE_ACCOUNT_KEY_PATH=/absolute/path/to/google-service-account.jsonyarn workspace privatefolio-expo submit:androidiOS submission requires App Store Connect credentials and an Apple Developer account:
yarn workspace privatefolio-expo submit:iosYou can chain build+submit via:
yarn workspace privatefolio-expo publishApp Identity and Linking
Section titled “App Identity and Linking”- Android package:
xyz.privatefolio.mobile - Deeplink scheme:
privatefolio://(reserved for future native navigation/deeplinks) - If you add native navigation in the future, use
expo-linkingto handle incoming URLs and map them to screens.
Permissions
Section titled “Permissions”The WebView enables geolocation and file access. If you add native geolocation or file pickers, declare platform permissions in app.json and follow Expo documentation for permissions prompts.
Troubleshooting
Section titled “Troubleshooting”- Clear Metro cache:
npx expo start -c - Kill stray Metro processes: close all
expo startprocesses and restart - Android emulator not detected: ensure Android Studio SDK tools and AVD are installed; run
adb devices - iOS simulator boot issues: open Xcode once and accept license; run
xcrun simctl list devices
Roadmap for Native Enhancements (Optional)
Section titled “Roadmap for Native Enhancements (Optional)”- Add account storage using secure storage modules
- Implement push notifications for balance alerts
- Integrate native share sheets and file import/export
- Use
expo-routerto progressively introduce native screens
- This is a Yarn workspaces monorepo; prefer running scripts via
yarn workspace privatefolio-expo <script>from the repo root. - Do not run long-lived
startscripts in CI; use EAS for cloud builds and local devices for development.