A React Native mobile application built with Expo that implements a cryptocurrency wallet interface with real-time price tracking, swap functionality and biometric authentication.
- Node.js (v14 or higher)
- npm or yarn
- Expo CLI
- iOS Simulator (for iOS development)
- Android Studio (for Android development)
- CocoaPods (for iOS development)
- Clone the repository:
git clone https://github.com/yourusername/CryptoWalletApp.git
cd CryptoWalletApp- Install JavaScript dependencies:
npm install
# or
yarn install- Install iOS dependencies (required for Face ID):
cd ios
pod install
cd ..- Start the development server:
npx expo start- Run on iOS (with native features):
npx expo run:ios- Run on Android:
npx expo run:androidThe app can be run in two different modes:
-
Expo Go Mode (Limited Features):
- Use
npx expo startand scan QR code with Expo Go app - Face ID/Touch ID will not work
- Good for quick development and testing basic features
- Use
-
Development Build Mode (Full Features):
- Use
npx expo run:iosornpx expo run:android - All native features (Face ID/Touch ID) will work
- Required for testing biometric authentication
- Requires pod installation for iOS
- Use
Note: For testing biometric authentication and other native features, use the Development Build Mode.
- Real-time cryptocurrency price tracking
- Interactive wallet interface with asset management
- Biometric authentication for secure swap transactions
- Pixel-perfect UI implementation
- TypeScript for type safety and better development experience
- Framework: React Native with Expo
- Language: TypeScript
- State Management: React Context API
- Navigation: React Navigation
- UI Components: Custom components with React Native's built-in components
- Styling: React Native StyleSheet
- Icons: Expo Vector Icons
- Charts: react-native-svg-charts
- Authentication: expo-local-authentication
- API: CoinGecko API for cryptocurrency data
-
Expo Vector Icons
- Used for consistent iconography across the app
- Provides a wide range of icons that match the design requirements
- Easy to customize and style
-
React Native SVG Charts
- Chosen for smooth, responsive chart rendering
- Better performance compared to other charting libraries
- Native SVG support for crisp graphics
-
Expo Linear Gradient
- Used for creating beautiful gradient backgrounds
- Matches the design mockups perfectly
- Better performance than CSS gradients
- Used for fetching real-time cryptocurrency prices
- Implementation details:
- Centralized price management through PriceContext
- Batch endpoint for efficient data fetching
- 5-minute refresh interval to stay within rate limits
- Error handling for failed requests
- TypeScript interfaces for type safety
-
Rate Limiting
- Challenge: CoinGecko's free API has rate limits
- Solution: Implemented batch requests and 5-minute refresh interval
- Result: Efficient data fetching while staying within limits
-
Real-time Updates
- Challenge: Need to keep prices current without overwhelming the API
- Solution: Centralized price management with controlled refresh
- Result: Consistent data across the app with minimal API calls
- Used
expo-local-authenticationfor Face ID/Touch ID integration - Native implementation for better performance and reliability
- Seamless integration with the swap interface
- User initiates swap action
- Biometric prompt appears
- Authentication success triggers swap completion
- User receives success feedback
- Native iOS implementation for Face ID
- Proper permission handling in Info.plist
- Secure authentication flow
- Graceful fallback handling
CryptoWalletApp/
├── assets/ # Images and static assets
├── components/ # Reusable UI components
├── context/ # React Context providers
├── data/ # Static data and types
├── navigation/ # Navigation configuration
├── screens/ # Screen components
├── types/ # TypeScript type definitions
└── App.tsx # Root component
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
