Skip to content

Refactor: Migrate to Expo Bare Workflow and Introduce src/ Architecture#104

Open
kapildadhich075 wants to merge 43 commits into
CypherCommons:masterfrom
kapildadhich075:project-migration
Open

Refactor: Migrate to Expo Bare Workflow and Introduce src/ Architecture#104
kapildadhich075 wants to merge 43 commits into
CypherCommons:masterfrom
kapildadhich075:project-migration

Conversation

@kapildadhich075

@kapildadhich075 kapildadhich075 commented May 14, 2026

Copy link
Copy Markdown

Overview

This PR modernizes the Shroud Wallet codebase by migrating the project to Expo Bare Workflow (SDK 55) and restructuring the repository around a centralized src/ directory.

The branch is fully synced with the latest upstream/master changes and includes all required merge conflict resolutions.


Expo SDK 55 Migration

  • Migrated the project to Expo Bare Workflow using expo-dev-client
  • Added EAS build support via eas.json
  • Replaced several legacy native dependencies with Expo-supported modules

Examples include:

  • expo-file-system
  • expo-notifications
  • expo-image-picker
  • expo-haptics
  • expo-clipboard

This improves native stability, simplifies future upgrades, and enables cloud builds through EAS.


Repository Restructure

All application source code has been consolidated into a dedicated src/ directory.

Moved modules include:

  • components
  • navigation
  • screens
  • modules
  • helpers
  • utils
  • tests
  • img
  • localization and typings

Additional cleanup:

  • Renamed screen/screens/
  • Moved misplaced root-level files into proper directories
  • Updated relative imports across the project

This significantly reduces root-level clutter and improves project navigation.


Native & Build System Updates

  • Updated iOS native configuration for Expo module initialization
  • Resolved linker/build issues related to Expo integration
  • Preserved compatibility with the custom rust_jsi_bridge
  • Validated native module compilation across iOS and Android

Tooling & Configuration

Updated configuration and tooling to support the new structure:

  • metro.config.js
  • tsconfig.json
  • jest.config.js
  • .detoxrc.json

Testing and utility scripts were also updated accordingly.


Local Setup Requirements

Because the project uses a custom Rust-based JSI bridge (rust_jsi_bridge), fresh clones require rebuilding the native Rust binaries before running iOS setup or native builds.

Recommended setup flow:

npm install
npm run rust:rebuild
cd ios && pod install && cd ..
npx expo start -c

This generates the required Rust native artifacts locally and ensures CocoaPods can correctly link the generated frameworks.

The compiled Rust binaries are intentionally excluded from Git:

  • ios/RustJsiBridge.xcframework/
  • android/app/src/main/jniLibs/

Important for Reviewers

Because of the repository restructure, Metro may cache outdated file paths.

After pulling the branch:

npx expo start -c

This clears Metro cache and rebuilds module resolution paths based on the new structure.


Validation Checklist

  • iOS Simulator build verified
  • Android build verified
  • Rust JSI modules compile successfully
  • Synced with latest upstream/master
  • Testing paths updated for new structure
  • Expo integration validated
  • EAS configuration and cloud build setup added

…th expo equivalents

- modules/fs.ts: use expo-file-system/legacy for cacheDirectory, EncodingType etc; use rn-qr-generator for QR detection
- components/CameraScreen.tsx: migrate from react-native-camera-kit-no-google Camera to expo-camera CameraView
- components/AddressInputScanButton.tsx: replace detectQRCodeInImage with RNQRGenerator.detect
- hooks/useCompanionListeners.ts: replace RNFS with expo-file-system/legacy, replace detectQRCodeInImage with RNQRGenerator
- tests/setup.js: update mocks to match new packages
@kapildadhich075 kapildadhich075 changed the title Migrate to Expo SDK 55 and update dependencies and configurations Refactor: Migrate to Expo Bare Workflow and Introduce src/ Architecture May 18, 2026
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "Shroud.app"
BlueprintName = "Shroud"
BuildableName = "ShroudWallet.app"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

app name is "Shroud" and not "ShroudWallet"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch! During my hit-and-trial testing to get the EAS builds working, the PRODUCT_NAME in project.pbxproj was temporarily set to ShroudWallet, which caused the compiled binary to output as ShroudWallet.app. I will update the configuration so it correctly compiles as Shroud.app!

BuildableName = "Shroud.app"
BlueprintName = "Shroud"
BuildableName = "ShroudWallet.app"
BlueprintName = "BlueWallet"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we have BlueWallet here?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When migrating to Expo, the EAS cloud build pipeline kept failing because it was defaulting to look for the legacy BlueWallet Xcode scheme (it was throwing errors saying BlueWallet.xcscheme was corrupted). To quickly unblock the builds, I temporarily reverted the internal native target (PBXNativeTarget) back to BlueWallet. Because the native target was renamed, the BlueprintName had to match it to link properly. Now that I understand the proper configuration required for Expo, I'll completely eliminate the BlueWallet target name and rename everything back to Shroud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants