A native-first mobile crypto wallet built for the Greenpill BR community
Features โข Getting Started โข Architecture โข Mini-App Development โข Contributing
Capsula is a minimalistic, vibrant, and incredibly easy-to-use crypto wallet specifically designed for the Greenpill BR (GPBR) community. Built with React Native and Expo, it provides a simplified, beginner-friendly entry point into the world of crypto for individuals interested in autonomy and regeneration.
Architected for a future of limitless, user-installed functionality through a revolutionary modular mini-app system - the central pillar of the application's design.
- Passkey-First Authentication: Single-click onboarding with biometric security
- Multi-Network Support: Ethereum Mainnet, CELO, and Gnosis Chain
- Secure Key Management: Hardware-backed secure storage with optional seed phrase export
- Send & Receive: Full transaction flows with gas estimation and QR code support
- Transaction History: Comprehensive activity tracking with real-time status updates
- Modular Architecture: Extensible system for adding new functionality
- Built-in Mini-Apps:
- Tokens Module: ERC-20 token management and custom token addition
- Example Module: SDK demonstration for developers
- Network-Based Filtering: Mini-apps automatically show/hide based on current network
- Secure Integration: All mini-app transactions require Passkey authentication
- Complete Mini-App SDK: TypeScript interfaces for wallet, network, UI, storage, and events
- Permission System: Granular control over mini-app capabilities
- Error Boundaries: Robust error handling and recovery
- Hot Reloading: Fast development iteration with Metro bundler
- Node.js 18+
- Bun package manager
- Android Studio (for Android development)
- Expo CLI:
bun add -g @expo/cli
-
Clone the repository:
git clone https://github.com/greenpillbr/capsula.git cd capsula -
Install dependencies:
bun install
-
Configure environment:
cp .env.example .env # Edit .env with your Infura API key -
Generate database schema:
bun run db:generate
# Start Metro bundler
bun run dev
# Run on Android device/emulator
bun run android
# Run on iOS device/simulator (macOS only)
bun run ios- React Native + TypeScript + Expo for cross-platform development
- Zustand for state management with MMKV persistence
- Ethers.js for blockchain interactions
- Drizzle ORM with SQLite for local-first data storage
- Expo SecureStore for cryptographic key management
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Core Wallet โ โ Mini-App SDK โ โ Built-in Apps โ
โ โ โ โ โ โ
โ โข Authenticationโโโโโบโ โข Wallet API โโโโโบโ โข Tokens โ
โ โข Network Mgmt โ โ โข Network API โ โ โข Example โ
โ โข Transactions โ โ โข Storage API โ โ โข [Future Apps] โ
โ โข Key Mgmt โ โ โข UI API โ โ โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
lib/stores/miniAppStore.ts- Mini-app state managementlib/mini-apps/sdk/- Complete SDK for mini-app developmentlib/blockchain/ethersService.ts- Enhanced Ethereum integrationlib/crypto/keyManager.ts- Secure wallet managementdb/schema.ts- Complete database schema
-
Create your module:
mkdir -p lib/mini-apps/modules/your-app
-
Implement the interface:
import type { MiniAppProps } from '@/lib/mini-apps/sdk'; export default function YourMiniApp({ sdk, onClose, isActive }: MiniAppProps) { // Access wallet const wallet = sdk.wallet.getActiveWallet(); // Read from smart contract const data = await sdk.network.readContract({ contractAddress: '0x...', abi: [...], functionName: 'getData', args: [] }); // Sign transaction with Passkey const tx = await sdk.wallet.signTransaction(params); return <YourUI />; }
-
Register in host: Add your module to
lib/mini-apps/host/MiniAppHost.tsx
- Wallet API:
getActiveWallet(),getBalance(),signTransaction() - Network API:
getActiveNetwork(),readContract(),callContract() - UI API:
showToast(),navigate(),showModal() - Storage API:
getItem(),setItem(), session storage - Events API:
onWalletChange(),onNetworkChange(), custom events
- Ethereum Mainnet (Chain ID: 1)
- CELO Mainnet (Chain ID: 42220)
- Gnosis Chain (Chain ID: 100)
- Extensible architecture for future EVM-compatible networks
- Passkey Authentication: Hardware-backed biometric security
- Secure Key Storage: Private keys encrypted in device secure storage
- Permission System: Mini-apps have controlled access to wallet functions
- Transaction Authorization: All blockchain operations require Passkey confirmation
- Development Workflow - Setup and contribution guide
- Mini-App System Architecture - Technical architecture
- Complete Specification - Full project requirements
bun run dev # Start Metro bundler
bun run android # Test on Android device./scripts/build-android.sh # Build Android APKGitHub Actions automatically builds APKs on push to main branch.
- Core wallet functionality with Passkey authentication
- Multi-network support (Ethereum, CELO, Gnosis)
- Complete mini-app system infrastructure
- Tokens module for ERC-20 token management
- Example module for developer guidance
- Android build pipeline
- Mini-app marketplace with search and categories
- Community following system for network/app recommendations
- Contacts module for address book management
- NFT module for ERC-721/ERC-1155 viewing
- Advanced DeFi integrations
We welcome contributions from the Greenpill BR community and crypto developers worldwide!
- Read the development workflow
- Study the Example module
- Follow the mini-app development guide above
- Report issues and suggest features
- Test the app and provide feedback
- Help with documentation and translations
MIT License - Feel free to use this project for your own community wallet needs.
Built with โค๏ธ for the Greenpill BR community
Your gateway to autonomy and regeneration