Skip to main content
Sovran includes a comprehensive set of scripts for development, building, testing, and deployment. This guide covers all available npm/yarn scripts.

Development Scripts

Start Development Server

Launch the Expo development server:
This starts the Metro bundler and opens the Expo developer tools. From there you can:
  • Press i to open iOS simulator
  • Press a to open Android emulator
  • Scan the QR code with Expo Go on a physical device

Run on Platforms

iOS

Builds and runs the app on the iOS simulator using production settings.

Android

Builds and runs the app on the Android emulator using production settings.

Build Scripts

Prebuild

Generate native iOS and Android projects:
Runs expo prebuild --clean which:
  • Deletes existing ios/ and android/ directories
  • Regenerates native projects from app.json configuration
  • Applies all Expo config plugins
Run this after:
  • Adding new native dependencies
  • Modifying app.json plugins
  • Changing native permissions

EAS Build - iOS

Builds iOS for production using EAS Build:
  • Platform: ios
  • Profile: production
  • Non-interactive mode
  • Auto-submit to App Store
Full command: eas build --platform ios --profile production --non-interactive --auto-submit

EAS Build - Android

Builds Android for development using EAS Build:
  • Platform: android
  • Profile: development
  • Development client enabled
Full command: eas build --platform android --profile development
EAS Build Profiles are configured in eas.json:
  • development - Dev client, internal distribution
  • preview - Testing builds, internal distribution
  • production - Production builds, auto-increment version

Submission Scripts

Submit builds to app stores using EAS Submit:

iOS App Store

Configuration (eas.json):

Android Play Store

Submits the latest Android build to Google Play Console.

Code Quality Scripts

Pre-Commit Requirement: All five code quality checks must pass before committing code.

Linting

Run ESLint to check for code issues:
Configuration:
  • Extends eslint-config-expo
  • Prettier integration
  • Unused imports detection
  • TypeScript support
Fix automatically:

Type Checking

Run TypeScript compiler to check types:
Runs tsc --noEmit to validate TypeScript without emitting files. Common issues:
  • Missing type imports
  • Incorrect prop types
  • Untyped function parameters

Code Formatting

Checks if files are formatted correctly without modifying them.Pattern: ./**/*.{js,jsx,mjs,cjs,ts,tsx,json}

Find Dead Code

Runs Knip to find:
  • Unused exports
  • Unused dependencies
  • Unreachable code
  • Duplicate exports
Configuration: knip.json

Testing

Run Jest unit tests:
Test framework: Jest with jest-expo preset

UI Testing

Maestro Tests

Run end-to-end UI tests with Maestro:
Runs all Maestro test flows in .maestro/ directory. Prerequisites:
  • Install Maestro CLI: brew tap mobile-dev-inc/tap && brew install maestro
  • Build app for simulator/emulator
  • Ensure device is running

Build Utilities

Theme Generation

Build background theme metadata:
Runs scripts/build-background-themes.js to:
  • Extract colors from background images
  • Generate theme metadata
  • Create palette definitions
  • Output to scripts/background-themes-metadata.json

Screenshot Utilities

Resize and optimize app screenshots:
Runs scripts/resize-screenshots.js to:
  • Resize screenshots for App Store
  • Optimize image sizes
  • Generate required dimensions

Automation Scripts

FreedomStore Release

Create a pull request to FreedomStore:
Runs scripts/create-freedomstore-pr.sh which:
  • Clones FreedomStore repository
  • Updates Sovran metadata
  • Creates a pull request
  • Automates release process

Lifecycle Hooks

Post-Install

Automatically runs after yarn install or npm install:
Applies patches from patches/ directory:
  • coco-cashu-core+1.1.2-rc.47.patch
  • cashu-kym+0.4.1.patch
Patches are created with npx patch-package <package-name> after modifying node_modules.

Script Execution Order

For a typical development workflow:

Production Build Workflow

iOS Production Release

Android Production Release

Troubleshooting

Clear Cache

If you encounter build issues:

Build Errors

If EAS builds fail:

Type Errors

If type checking fails:

CI/CD Integration

GitHub Actions Workflow

The repository includes a CI workflow (.github/workflows/ci.yml) that runs:
Status Badge: CI

Environment Variables

EAS Build Environment

Configure per-profile environments in eas.json:

Local Development

No .env file is needed for basic development. Sensitive values are stored in:
  • expo-secure-store - Runtime secrets
  • eas.json - Build secrets (use EAS Secrets for sensitive data)

Next Steps

Getting Started

Set up your development environment

Project Structure

Understand the codebase organization

Tech Stack

Learn about the technologies used

Contributing

Contribution guidelines and workflow