Setup
Prerequisites
- Node.js >= 20.0.0 (enforced in
package.jsonengines) - npm >= 10.0.0
- Expo CLI (bundled with
expopackage) - EAS CLI (
npm install -g eas-cli) for builds - iOS Simulator (macOS only, Xcode required) or Android emulator (Android Studio)
- For native builds: Xcode and/or Android Studio with appropriate SDKs
Clone and Install
git clone <repo-url>
cd Housr-App
npm installThe postinstall script runs patch-package to apply any local patches.
Environment Variables
Environment variables are validated at startup using Zod in src/config/env.ts. The app will throw with a descriptive error if required variables are missing.
Required Variables
| Variable | Description |
|---|---|
EXPO_PUBLIC_API_V1_URL | Legacy API v1 base URL (e.g., https://staging.api.uk.housr.com/api/) |
EXPO_PUBLIC_API_V2_URL | API v2 base URL (e.g., https://v2.staging.api.uk.housr.com/) |
EXPO_PUBLIC_FIREBASE_DATABASE_URL | Firebase Realtime Database URL |
EXPO_PUBLIC_FIREBASE_API_KEY | Firebase API key |
Optional Variables
| Variable | Description |
|---|---|
EXPO_PUBLIC_USA_MODE | "true" or "false" — controls region (default: UK) |
EXPO_PUBLIC_ENVIRONMENT | "local", "demo", "staging", or "prod" (default: "local") |
EXPO_PUBLIC_MIXPANEL_TOKEN | Mixpanel analytics token |
EXPO_PUBLIC_MIXPANEL_SERVER_URL | Mixpanel server URL (EU vs US) |
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID | Google Sign-In web client ID |
EXPO_PUBLIC_GOOGLE_IOS_CLIENT_ID | Google Sign-In iOS client ID |
EXPO_PUBLIC_INTERCOM_APP_ID | Intercom app ID |
EXPO_PUBLIC_INTERCOM_API_KEY | Intercom iOS API key |
EXPO_PUBLIC_INTERCOM_ANDROID_API_KEY | Intercom Android API key |
EXPO_PUBLIC_SENTRY_DSN | Sentry error tracking DSN |
Accessing Environment Config
import { env, isUsaMode } from '@/config/env';
// env.EXPO_PUBLIC_API_V2_URL
// isUsaMode === true when EXPO_PUBLIC_USA_MODE is "true"Local Development
Expo Go (Limited)
npm startSome features (Google Sign-In, Firebase messaging, Apple Sign-In) are not available in Expo Go and require a development build.
Development Build
npm run ios # Build and run on iOS simulator
npm run android # Build and run on Android emulatorThese commands run expo run:ios and expo run:android, which create native builds with the dev client.
Storybook
npm run storybookRuns component storybook on port 6006 (using @storybook/react-native-web-vite).
EAS Build Profiles
For staging and production builds, use EAS. See Build & Deploy for the full list of profiles and CI/CD details.
Quick local staging build:
APP_VERSION=1.2.3 BUILD_NUMBER=1 npx eas build --profile uk-staging --platform ios --localSentry
Sentry is initialized in the root layout (src/app/_layout.tsx). In local mode, it connects to Spotlight (local Sentry UI). In production, it uses the configured DSN with a 5% trace sample rate.