Noah is a modern, self-custodial mobile wallet for Ark, a Bitcoin Layer 2 protocol. It is built with React Native and Expo.
- ✨ Core Technologies
- 🚀 Getting Started
- ⚡️ Local Ark Regtest Environment
- 🏃 Running the Application
- 📦 Building for Production
- 📜 License
- Framework: React Native & Expo
- Runtime & Package Manager: Bun
- Language: TypeScript
- Styling: NativeWind (Tailwind CSS for React Native)
- State Management: Zustand
- Navigation: React Navigation
- Data Fetching: TanStack Query
- Local Storage: MMKV
- Native Modules: Nitro (Ark)
- Development Environment: Nix
- Server: Rust (Axum + Postgres + Redis/Dragonfly cache)
You can set up the development environment using Nix (recommended) or by manually installing the dependencies.
This project uses Nix to provide a reproducible development environment. While most dependencies are managed by Nix, you will still need to install a few tools manually.
Prerequisites:
- Install Nix: Follow the official installation guide.
- Install direnv: This tool will automatically load the Nix environment when you enter the project directory. Follow the direnv installation guide.
- Hook direnv into your shell: Make sure to follow the instructions to hook direnv into your shell (e.g., add
eval "$(direnv hook zsh)"to your.zshrc). - Install IDEs and SDKs:
- Android: Install Android Studio.
- iOS (macOS only): Install Xcode from the Mac App Store.
Setup:
-
Clone the Repository
git clone https://github.com/BlixtWallet/noah.git cd noah -
Allow direnv to load the environment This command will trigger Nix to build the development shell. It might take a while on the first run.
direnv allow
-
Install JavaScript Dependencies Once the Nix shell is active, you can install the project's dependencies.
just install
-
Install iOS Dependencies (for macOS users) This step links the native iOS libraries.
just ios-prebuild
Now the project is ready to run.
If you prefer not to use Nix, you can set up your environment manually. This project is a bare Expo project.
For a comprehensive guide on setting up your machine for bare Expo development, please refer to the Expo documentation. This includes installing Node.js, Watchman, the Java Development Kit, Android Studio, and Xcode.
Once your environment is set up, follow these steps:
-
Clone the Repository
git clone https://github.com/BlixtWallet/noah.git cd noah -
Install JavaScript Dependencies
just install
-
Install iOS Dependencies (for macOS users)
just ios-prebuild
For development and testing, you can run a complete local Ark stack using Docker Compose. The environment includes:
- bitcoind - Bitcoin Core in regtest mode
- captaind (aspd) - Ark Server Protocol Daemon
- bark - Ark CLI client
- postgres - Database for captaind
- dragonfly - Redis-compatible cache backing LNURL auth (k1) storage
- cln - Core Lightning node
- lnd - Lightning Network Daemon
- noah-server - Noah backend server
The scripts/ark-dev.sh script helps manage this environment.
Prerequisites:
- Docker: Install Docker Desktop.
- jq: Command-line JSON processor. Install via your package manager (e.g.,
brew install jqon macOS).
Quick Start - Complete Setup:
Run the automated setup script that will start all services, create wallets, mine blocks, fund the Ark server, and set up Lightning channels:
just setup-everythingThis single command will:
- Start all Docker services (bitcoind, captaind, postgres, dragonfly db, cln, lnd, bark, noah-server)
- Create and fund a Bitcoin Core wallet
- Generate 150 blocks
- Fund the Ark server with 1 BTC
- Create a bark wallet
- Funds the bark wallet with 0.1 BTC and boards into Ark with 0.01 BTC
- Fund LND with 0.1 BTC
- Open a Lightning channel between LND and CLN (1M sats, 900k pushed to CLN)
Manual Setup (Step by Step):
-
Start all services
just up
-
Create and fund wallets
# Create a Bitcoin Core wallet just create-wallet # Generate blocks to fund it just generate 150 # Fund the Ark server just fund-aspd 1 # Create a bark wallet just create-bark-wallet
-
Setup Lightning channels (optional)
just setup-lightning-channels
Managing Services:
# Stop services (keeps data)
just stop
# Stop and delete all data
just downUseful Commands:
- Interact with bark wallet:
just bark <command> - Interact with ASPD RPC:
just aspd <command> - Use bitcoin-cli:
just bcli <command> - Use lncli:
just lncli <command> - Use lightning-cli (CLN):
just cln <command> - Generate blocks:
just generate <num_blocks> - Send to address:
just send-to <address> <amount>
Service Endpoints:
- Bitcoin Core RPC:
http://localhost:18443 - Ark Server (captaind):
http://localhost:3535 - Noah Server:
http://localhost:3000 - Noah Server Health:
http://localhost:3099/health - PostgreSQL:
localhost:5432 - LND RPC:
localhost:10009(P2P:localhost:9735) - CLN RPC:
localhost:9988(P2P:localhost:9736)
For more commands and details, run just without arguments.
This project uses just commands to run the application in different environments (Mainnet, Signet, Regtest).
For a full list of available commands, run:
justExample (running on Android Regtest):
just android
# or
just android-regtestExample (running on iOS Regtest):
just ios
# or
just ios-regtestOther useful commands:
just check # Run type checking and linting
just ios-prebuild # Install iOS dependencies
just clean-all # Clean all build artifacts
just server # Run server with hot reload (bacon)
just test # Run server testsImportant note: The server now uses PostgreSQL for all environments. Point POSTGRES_URL at the database for the current network (run separate DB instances per network).
The server uses environment variables for configuration. For local development, create a .env file in the project root.
-
Create a
.envfile in the project root:cp .env.example .env
-
Edit
.envwith your values:HOST=0.0.0.0 PORT=3000 PRIVATE_PORT=3099 LNURL_DOMAIN=localhost POSTGRES_URL=postgres://postgres:postgres@localhost:5432/noah POSTGRES_MAX_CONNECTIONS=10 REDIS_URL=redis://127.0.0.1:6379 EXPO_ACCESS_TOKEN=your-expo-access-token ARK_SERVER_URL=http://localhost:3535 SERVER_NETWORK=regtest BACKUP_CRON="every 2 hours" S3_BUCKET_NAME=noah-regtest-backups MINIMUM_APP_VERSION=0.0.1 # AWS credentials for S3 AWS_ACCESS_KEY_ID=your-aws-access-key-id AWS_SECRET_ACCESS_KEY=your-aws-secret-access-key AWS_REGION=us-east-2
Required environment variables:
POSTGRES_URL- PostgreSQL connection stringEXPO_ACCESS_TOKEN- Expo push notification tokenARK_SERVER_URL- Ark server endpointS3_BUCKET_NAME- S3 bucket for backups
- If you're using Nix, simply run
baconto start a hot reloading Rust. - If you are not using Nix, then
cargo install baconfor hot reloading and then runbacon. - If you just want to run the server
cargo runorcargo run --release. - For release builds, run
cargo build --release.
You can create production-ready application binaries using just commands:
Android Production Builds:
just android-regtest-release
just android-signet-release
just android-mainnet-releaseiOS Production Builds:
just ios-regtest-release
just ios-signet-release
just ios-mainnet-releaseFor a complete list of build commands, run just to see all available recipes.
Note on Code Signing: For production builds, you will need to configure your own signing keys. Refer to the official React Native and Expo documentation for code signing on Android and iOS.
This project is licensed under the MIT License.
