Skip to main content

Prerequisites

Before you begin, ensure you have the following installed on your system:

Node.js

Latest LTS version recommended

Package Manager

pnpm, npm, or yarn

Mobile Development

Android Studio or Xcode
Medusa Wallet uses [email protected] as the default package manager. While npm and yarn will work, pnpm is recommended for consistency with the project.

Installation

1

Clone the repository

Clone the Medusa Wallet repository to your local machine:
git clone https://github.com/Psycarlo/medusa-wallet.git
cd medusa-wallet
2

Install dependencies

Install the project dependencies using your preferred package manager:
pnpm install
The project uses Expo SDK 53 and React Native 0.79.5. All dependencies will be automatically installed.
3

Platform-specific setup

Set up your development environment for your target platform:
iOS development requires a macOS machine with Xcode installed.
  1. Install Xcode from the Mac App Store
  2. Install Xcode Command Line Tools:
    xcode-select --install
    
  3. Install iOS Simulator (included with Xcode)
  4. Install CocoaPods dependencies:
    cd ios
    pod install
    cd ..
    
4

Configure environment

Create a .env file in the root directory if needed for any custom configurations:
# Add any environment-specific variables here
Most API configurations are already set up in the codebase. Check /api directory for API endpoints.

Development Tools

Medusa Wallet includes several development tools to enhance your workflow:

React Query DevTools

The app includes React Query DevTools for debugging API requests and cache management:
import { useReactQueryDevTools } from '@dev-plugins/react-query'

const queryClient = new QueryClient()
useReactQueryDevTools(queryClient)
Read more about React Query DevTools in the Expo documentation.

Linting and Formatting

The project uses ESLint and Prettier for code quality:
pnpm format

Testing

Run the test suite to ensure everything is working correctly:
pnpm test

Troubleshooting

If you encounter port conflicts, the app uses port 8082 by default:
pnpm android --port 8082
You can change this in package.json under the android script.
If you encounter issues with dependencies:
  1. Clear the package manager cache:
    pnpm store prune
    
  2. Delete node_modules and reinstall:
    rm -rf node_modules
    pnpm install
    
If iOS builds fail:
  1. Clean the build folder in Xcode
  2. Reinstall CocoaPods:
    cd ios
    rm -rf Pods Podfile.lock
    pod install
    cd ..
    
Ensure your Android emulator is running:
# List available devices
adb devices

# If no devices, start an emulator from Android Studio
# or use the command line:
emulator -avd <avd_name>

Next Steps

Once your environment is set up, you can:

Learn the Architecture

Understand how Medusa Wallet is structured

Build and Run

Start developing and testing the app

Build docs developers (and LLMs) love