Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/desarrolladorandres2026-gif/Native-tailwind/llms.txt

Use this file to discover all available pages before exploring further.

The Debuta mobile app is built with Expo (SDK 55) and React Native 0.83. It uses Expo Router for file-based navigation, Socket.io for real-time messaging, and react-native-webrtc for peer-to-peer video and audio calls. This guide walks you through everything you need to get the app running locally — from installing Node dependencies to choosing the right run target for your workflow.

Prerequisites

Before you begin, make sure the following tools are installed on your machine:

Node.js 18+

Required for running the Metro bundler and build scripts. Check with node -v.

Expo CLI

Install globally: npm install -g expo-cli or use npx expo directly.

Android Studio / Xcode

Needed only if you want to run the app on an emulator or simulator. Expo Go works without either.

Expo Go (optional)

Install Expo Go on a physical device for quick iteration without a native build. Video calls are not available in Expo Go.

Installation

1

Clone the repository and navigate to the mobile package

cd mobile/debuta
2

Install dependencies

npm install
This installs all runtime and dev dependencies declared in package.json, including Expo SDK 55, React 19, Socket.io client 4, react-native-webrtc, and styled-components.
3

Copy the environment file

cp .env.example .env
Then open .env and fill in the values for your environment (see below).

Environment Variables

All environment variables exposed to the app must be prefixed with EXPO_PUBLIC_ so that Expo’s bundler injects them at build time.
.env
# URL base de la API backend de Debuta
# - En desarrollo local (Expo Go): http://<tu_ip_local>:3000 o http://10.0.2.2:3000 (emulador)
# - En producción: https://api.tudominio.com

EXPO_PUBLIC_API_URL=https://api.debuta.com

# ── Autenticación de Terceros ─────────────────────────────────────────────────
EXPO_PUBLIC_GOOGLE_CLIENT_ID=tu_google_client_id.apps.googleusercontent.com
EXPO_PUBLIC_FACEBOOK_APP_ID=tu_facebook_app_id

How EXPO_PUBLIC_API_URL works

The api.ts service and SocketContext both use the same resolution logic:
components/services/api.ts
function getBaseUrl(): string {
  // Uses .env value in production builds
  if (process.env.EXPO_PUBLIC_API_URL) {
    return process.env.EXPO_PUBLIC_API_URL + '/api';
  }
  // In development, reads the host IP Metro is serving from
  const host =
    Constants.expoConfig?.hostUri?.split(':')[0] ||
    (Constants.manifest as any)?.debuggerHost?.split(':')[0];

  if (host) return `http://${host}:3000/api`;
  return 'http://localhost:3000/api';
}
When you run npx expo start without setting EXPO_PUBLIC_API_URL, the app automatically reads Metro’s hostUri and constructs the correct LAN IP for you. This means physical devices on the same Wi-Fi network will connect to your backend with no manual IP configuration.
If you are using the Android emulator, your backend must be reachable on http://10.0.2.2:3000. Set EXPO_PUBLIC_API_URL=http://10.0.2.2:3000 in your .env or start your backend on that interface.

Running the App

# Start the Metro bundler
npx expo start

# Scan the QR code with the Expo Go app on iOS or Android.
# Video/audio calls are NOT available in Expo Go — use a dev build for that.

Available npm scripts

ScriptCommandDescription
startexpo startStart Metro bundler (prompts for platform)
androidexpo run:androidBuild and run on connected Android device or emulator
iosexpo run:iosBuild and run on connected iOS device or simulator
webexpo start --webStart the web target (native-only modules stubbed)
lintexpo lintRun ESLint via eslint-config-expo
testjestRun the test suite
test:watchjest --watchRun tests in watch mode (re-runs on file change)
test:coveragejest --coverageRun tests with coverage report

Why Video Calls Require a Development Build

Debuta uses react-native-webrtc for peer-to-peer audio and video calls. This library ships a native module — compiled C++ code that must be linked into the iOS or Android binary. Expo Go does not include this module, so WebRTC is stubbed out when running in Expo Go and will show an alert if a call is attempted.
To test video or audio calls you must run a native development build with npm run android or npm run ios. The npx expo start + Expo Go path will load the stub implementation, which shows a UI but produces no real audio or video.
To create a development build you only need to run the native build command once. After that, Metro hot-reloads still work as normal.
# First-time native build (connects to your running Metro server)
npm run android   # or: npm run ios
The app.json declares all required permissions for both platforms:
  • Android: RECORD_AUDIO, CAMERA, MODIFY_AUDIO_SETTINGS, BLUETOOTH, INTERNET, ACCESS_NETWORK_STATE, CHANGE_NETWORK_STATE, ACCESS_WIFI_STATE, FOREGROUND_SERVICE
  • iOS: NSCameraUsageDescription, NSMicrophoneUsageDescription (via infoPlist)

Running Tests

# Single run
npm test

# Watch mode (re-runs on file change)
npm run test:watch

# With coverage report
npm run test:coverage
Tests use Jest 29 with jest-environment-node. The test environment is configured via babel.config.js, which applies babel-preset-expo along with TypeScript and class-property transforms.

Babel and Metro Configuration

babel.config.js uses babel-preset-expo as the base preset and adds three additional Babel plugins:
babel.config.js
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ['babel-preset-expo'],
    plugins: [
      ['@babel/plugin-transform-typescript', { isTSX: true, allExtensions: true }],
      ['@babel/plugin-transform-class-properties', { loose: true }],
      ['@babel/plugin-transform-private-methods', { loose: true }],
    ],
  };
};
metro.config.js extends the default Expo Metro config with a custom resolver that replaces react-native-webrtc and react-native-incall-manager with an empty module stub when bundling for the web platform, preventing build errors from native-only imports.

Build docs developers (and LLMs) love