Prerequisites
Before you begin, ensure you have the following installed:- Node.js (v18 or later recommended)
- Yarn (v1.22.22 or later) - Package manager
- Expo CLI - For running the development server
- iOS Simulator (macOS only) or Android Emulator
- Git - For version control
Installation
Clone the repository and install dependencies:Post-Install
After installation, thepostinstall script automatically runs patch-package to apply any necessary patches to dependencies.
Development Setup
Start Development Server
Launch the Expo development server:- Press
ito open iOS simulator - Press
ato open Android emulator - Scan the QR code with the Expo Go app on your physical device
Run on iOS
Run on Android
Prebuild Native Projects
If you need to regenerate the native iOS and Android projects (after adding native dependencies or plugins):The
prebuild command runs expo prebuild --clean, which clears existing native folders before generating new ones.Code Quality Checks
Before committing any code, ensure all quality checks pass:Run All Checks
Format Code
Automatically format your code with Prettier:Environment Configuration
Secure Storage
Sovran usesexpo-secure-store for storing sensitive data like:
- BIP-39 mnemonic seed phrases
- Nostr private keys (derived via NIP-06)
- Cashu wallet seeds
Deep Linking
The app supports two URL schemes:cashu://- For Cashu protocol URLssovran://- For app-specific deep links
app.json under the scheme property.
Development Best Practices
Code Structure
Follow the established architecture:- Routes go in
app/- keep screens thin, focus on orchestration - UI primitives go in
components/ui/ - Composed product UI goes in
components/blocks/ - Reusable hooks go in
hooks/ - Cashu-specific hooks go in
hooks/coco/ - Stateless utilities go in
helper/ - State management uses Zustand stores in
stores/
Before You Code
Read the.cursor/rules/ documentation before working on specific domains:
| Domain | Documentation |
|---|---|
| Popups, toasts, sheets | .cursor/rules/popup-toast-sheet-guidelines.mdc |
| Secure storage, keys | .cursor/rules/secure-storage-key-derivation.mdc |
| Text, typography | .cursor/rules/text-typography-skeleton-guidelines.mdc |
| Theme, colors | .cursor/rules/theme-system-architecture.mdc |
| Zustand stores | .cursor/rules/zustand-store-scoping.mdc |
| Git workflow | .cursor/rules/git-github-workflow.mdc |
Security Guidelines
Next Steps
Project Structure
Understand the codebase organization
Tech Stack
Learn about the technologies used
Scripts Reference
Complete guide to all available scripts
API Reference
Explore the API documentation