Skip to Content
Getting StartedEnvironment Setup

Environment Setup

This page covers prerequisites, environment variables, customization steps, available scripts, and build configuration for RNCopilot.

Prerequisites

Make sure the following tools are installed before working with RNCopilot:

ToolMinimum VersionNotes
Node.js18+LTS recommended. Check with node --version
npmIncluded with Node.jsCheck with npm --version
Expo CLILatestUsed via npx expo — no global install needed
iOS SimulatorXcode 15+macOS only. Install Xcode from the Mac App Store
Android EmulatorAndroid StudioRequired for Android development

You can also test on physical devices using Expo Go. No simulator or emulator is strictly required for initial development.

Environment Variables

RNCopilot uses a .env file for configuration. Copy the example file to get started:

cp .env.example .env

All environment variables are optional. The app boots and functions without any of them configured. Add them as you integrate services.

Available Variables

VariableRequiredDefaultDescription
EXPO_PUBLIC_SUPABASE_URLNoYour Supabase project URL
EXPO_PUBLIC_SUPABASE_PUBLISHED_KEYNoYour Supabase anon/public key
EXPO_PUBLIC_API_BASE_URLNohttps://api.example.comBase URL for the Axios API client
EXPO_PUBLIC_SENTRY_DSNNoSentry DSN for error tracking
EXPO_PUBLIC_APP_ENVNodevelopmentApp environment: development, staging, or production

All Expo public environment variables must be prefixed with EXPO_PUBLIC_. Variables without this prefix will not be accessible in the client bundle.

Supabase Setup

To connect Supabase:

Create a Supabase project

Go to supabase.com  and create a new project.

Copy your credentials

Find your project URL and anon key in Settings > API.

Add them to .env

EXPO_PUBLIC_SUPABASE_URL=https://your-project.supabase.co EXPO_PUBLIC_SUPABASE_PUBLISHED_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6...

Restart the dev server

Environment variable changes require a server restart:

npm start

If Supabase credentials are missing, the app gracefully degrades. Auth features will not function, but the rest of the app works normally. This makes it easy to develop UI and business logic before setting up a backend.

Customization Checklist

When adapting RNCopilot for your own project, work through these items:

ItemFile(s)What to Change
App name and identifiersapp.jsonname, slug, scheme, bundleIdentifier, package
Package metadatapackage.jsonname, version, description, repository
Environment variables.envSupabase URL, API base URL, Sentry DSN
Theme colorssrc/theme/Brand primary, accent, semantic tokens
Translationssrc/i18n/en.json, ar.jsonApp-specific strings, remove template strings
Storage keyssrc/utils/storage/Update MMKV key names for your domain
Tab screensapp/(main)/(tabs)/Add, remove, or rename tabs

RNCopilot includes an interactive migration wizard. Run npm run migrate for a guided walkthrough of all customization steps, or follow the detailed Migration Guide for manual instructions.

Available Scripts

Development

CommandDescription
npm startStart the Expo development server
npm run iosBuild and run on iOS Simulator
npm run androidBuild and run on Android Emulator

Code Quality

CommandDescription
npm run type-checkRun the TypeScript compiler (no emit)
npm run lintRun ESLint across the codebase
npm run lint:fixAuto-fix ESLint issues
npm run formatFormat all files with Prettier
npm run format:checkCheck formatting without writing changes
npm run validateRun all checks: type-check + lint + format

Run npm run validate before committing to catch all issues at once. This is the same set of checks that Husky runs in the pre-commit hook.

Testing

CommandDescription
npm testRun the Jest test suite
npm run test:coverageRun tests with a coverage report

Reset and Migration

CommandDescription
npm run migrateInteractive migration wizard
npm run reset-showcaseRemove home screen showcase content (keeps auth)
npm run reset-templateFull reset — removes all example content for a blank canvas

EAS Build

RNCopilot is compatible with Expo Application Services (EAS)  for building and submitting to app stores.

Install EAS CLI

npm install -g eas-cli

Log in to your Expo account

eas login

Configure your project

eas build:configure

This generates an eas.json file with build profiles for development, preview, and production.

Create a build

# Development build (includes dev tools) eas build --platform ios --profile development eas build --platform android --profile development # Production build eas build --platform ios --profile production eas build --platform android --profile production

Submit to stores

eas submit --platform ios eas submit --platform android

EAS Build requires an Expo account. Development builds require a paid EAS subscription for priority queues, though free-tier builds are available with longer wait times.

Next Steps

With your environment configured, explore the rest of the documentation:

Last updated on