Skip to content

Commit 17287e1

Browse files
improve readme and prevent workflow from running for readme updates
1 parent fb96cd8 commit 17287e1

2 files changed

Lines changed: 103 additions & 68 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
name: CI
22
on:
33
pull_request:
4+
paths-ignore:
5+
- "README.md"
46
push:
57
branches:
68
- master
9+
paths-ignore:
10+
- "README.md"
711

812
jobs:
913
check_if_release_commit:

README.md

Lines changed: 99 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Noah is a modern, self-custodial mobile wallet for Ark, a Bitcoin Layer 2 protoc
77
## Table of Contents
88

99
- [✨ Core Technologies](#-core-technologies)
10-
- [🛠️ Prerequisites](#️-prerequisites)
1110
- [🚀 Getting Started](#-getting-started)
11+
- [Using Nix (Recommended)](#using-nix-recommended)
12+
- [Bare Expo Setup](#bare-expo-setup)
13+
- [⚡️ Local Ark Regtest Environment](#️-local-ark-regtest-environment)
1214
- [🏃 Running the Application](#-running-the-application)
1315
- [📦 Building for Production](#-building-for-production)
1416
- [📜 License](#-license)
@@ -26,128 +28,157 @@ Noah is a modern, self-custodial mobile wallet for Ark, a Bitcoin Layer 2 protoc
2628
- **Data Fetching**: TanStack Query
2729
- **Local Storage**: MMKV
2830
- **Native Modules**: Nitro (Ark)
31+
- **Development Environment**: Nix
2932

3033
---
3134

32-
## 🛠️ Prerequisites
35+
## 🚀 Getting Started
3336

34-
Before you begin, ensure you have the following tools installed on your system:
37+
You can set up the development environment using Nix (recommended) or by manually installing the dependencies.
3538

36-
- **Bun**: This project uses Bun for package management and script running. [Installation Guide](https://bun.sh/docs/installation).
37-
- **Git**: For version control.
38-
- **A code editor**: [Visual Studio Code](https://code.visualstudio.com/) is recommended.
39-
- **iOS Development**:
40-
- Xcode (from the Mac App Store)
41-
- CocoaPods (`sudo gem install cocoapods`)
42-
- **Android Development**:
43-
- Android Studio & the Android SDK
44-
- Java Development Kit (JDK)
39+
### Using Nix (Recommended)
4540

46-
---
41+
This project uses [Nix](https://nixos.org/) to provide a reproducible development environment. While most dependencies are managed by Nix, you will still need to install a few tools manually.
4742

48-
## 🚀 Getting Started
43+
**Prerequisites:**
44+
45+
1. **Install Nix**: Follow the [official installation guide](https://docs.determinate.systems/).
46+
2. **Install direnv**: This tool will automatically load the Nix environment when you enter the project directory. Follow the [direnv installation guide](https://direnv.net/docs/installation.html).
47+
3. **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`).
48+
4. **Install IDEs and SDKs**:
49+
- **Android**: Install [Android Studio](https://developer.android.com/studio).
50+
- **iOS (macOS only)**: Install [Xcode](https://developer.apple.com/xcode/) from the Mac App Store.
4951

50-
Follow these steps to get the project up and running on your local machine.
52+
**Setup:**
5153

5254
1. **Clone the Repository**
55+
5356
```bash
5457
git clone https://github.com/BlixtWallet/noah.git
5558
cd noah
5659
```
5760

58-
2. **Install JavaScript Dependencies**
59-
This will install all the necessary packages defined in `package.json`.
61+
2. **Allow direnv to load the environment**
62+
This command will trigger Nix to build the development shell. It might take a while on the first run.
63+
64+
```bash
65+
direnv allow
66+
```
67+
68+
3. **Install JavaScript Dependencies**
69+
Once the Nix shell is active, you can install the project's dependencies using Bun.
70+
6071
```bash
6172
bun install
6273
```
6374
64-
3. **Install iOS Dependencies**
65-
This step links the native iOS libraries required by the project across all build targets.
75+
4. **Install iOS Dependencies (for macOS users)**
76+
This step links the native iOS libraries.
6677
```bash
6778
cd ios
68-
pod install
79+
bundle install
80+
bundle exec pod install
6981
cd ..
7082
```
7183
72-
After these steps, the project is ready to run.
84+
Now the project is ready to run.
7385
74-
---
86+
### Bare Expo Setup
7587
76-
## 🏃 Running the Application
88+
If you prefer not to use Nix, you can set up your environment manually. This project is a bare Expo project.
7789
78-
This project is configured with different build flavors for development and testing.
90+
For a comprehensive guide on setting up your machine for bare Expo development, please refer to the **[Expo documentation](https://docs.expo.dev/get-started/set-up-your-environment/?mode=development-build&platform=android&device=simulated)**. This includes installing Node.js, Watchman, the Java Development Kit, Android Studio, and Xcode.
7991
80-
### 🤖 Android
92+
Once your environment is set up, follow these steps:
8193
82-
Run one of the following commands to build and launch a specific Android flavor.
94+
1. **Clone the Repository**
8395
84-
- **Mainnet:**
8596
```bash
86-
bun run android:mainnet
97+
git clone https://github.com/BlixtWallet/noah.git
98+
cd noah
8799
```
88-
- **Signet:**
100+
101+
2. **Install JavaScript Dependencies**
102+
89103
```bash
90-
bun run android:signet
104+
bun install
91105
```
92-
- **Regtest:**
106+
107+
3. **Install iOS Dependencies (for macOS users)**
93108
```bash
94-
bun run android:regtest
109+
cd ios
110+
pod install
111+
cd ..
95112
```
96113
97-
### 🍏 iOS
114+
---
98115
99-
The iOS build system uses Xcode Schemes to differentiate between flavors. Each script specifies the correct scheme and build configuration (`Debug` or `Release`).
116+
## ⚡️ Local Ark Regtest Environment
100117
101-
**Development (Debug) Builds:**
118+
For development and testing, you can run a local Ark stack (bitcoind, aspd, bark) using Docker. The [`scripts/ark-dev.sh`](./scripts/ark-dev.sh) script helps manage this environment.
102119
103-
- **Mainnet:**
104-
```bash
105-
bun run ios:mainnet:debug
106-
```
107-
- **Signet:**
108-
```bash
109-
bun run ios:signet:debug
110-
```
111-
- **Regtest:**
112-
```bash
113-
bun run ios:regtest:debug
114-
```
120+
**Prerequisites:**
115121
116-
**Production-like (Release) Builds:**
122+
- **Docker**: Install [Docker Desktop](https://www.docker.com/products/docker-desktop/).
123+
124+
**Setup & Usage:**
125+
126+
1. **Bootstrap the environment**
127+
This clones the `bark` repository and prepares the Docker setup.
117128
118-
- **Mainnet:**
119129
```bash
120-
bun run ios:mainnet:release
130+
./scripts/ark-dev.sh setup
121131
```
122-
- **Signet:**
132+
133+
2. **Start the services**
134+
This will start `bitcoind`, `aspd`, and `bark` in the background.
135+
123136
```bash
124-
bun run ios:signet:release
137+
./scripts/ark-dev.sh up
125138
```
126-
- **Regtest:**
139+
140+
3. **Create and fund wallets**
141+
- Create a Bitcoin Core wallet: `./scripts/ark-dev.sh create-wallet`
142+
- Generate blocks to fund it: `./scripts/ark-dev.sh generate 101`
143+
- Create a bark wallet: `./scripts/ark-dev.sh create-bark-wallet`
144+
- Fund the ASPD: `./scripts/ark-dev.sh fund-aspd 1`
145+
146+
4. **Stop the services**
127147
```bash
128-
bun run ios:regtest:release
148+
./scripts/ark-dev.sh down
129149
```
130150
151+
For more commands and details, run `./scripts/ark-dev.sh` without arguments.
152+
153+
---
154+
155+
## 🏃 Running the Application
156+
157+
This project uses various scripts to run the application in different environments (Mainnet, Signet, Regtest).
158+
159+
Please see the `scripts` section in the [`package.json`](./package.json:5) file for a full list of available commands.
160+
161+
**Example (running on Android Regtest):**
162+
163+
```bash
164+
bun run android:regtest:debug
165+
```
166+
167+
**Example (running on iOS Regtest):**
168+
169+
```bash
170+
bun run ios:regtest:debug
171+
```
172+
131173
---
132174
133175
## 📦 Building for Production
134176
135-
The following scripts are configured to create standalone production-ready application binaries (`.apk` or `.aab`) for Android.
177+
You can create production-ready application binaries using the build scripts.
136178
137-
**Note on Code Signing:** For production builds, you will need to configure your own signing keys. The Android build is currently configured to use the default debug keystore. Please refer to the [React Native documentation for signing Android apps](https://reactnative.dev/docs/signed-apk-android).
179+
Please see the `scripts` section in the [`package.json`](./package.json:5) file for commands starting with `build:`.
138180
139-
- **Build Mainnet Release:**
140-
```bash
141-
bun run build:android:mainnet:release
142-
```
143-
- **Build Signet Release:**
144-
```bash
145-
bun run build:android:signet:release
146-
```
147-
- **Build Regtest Release:**
148-
```bash
149-
bun run build:android:regtest:release
150-
```
181+
**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](https://reactnative.dev/docs/signed-apk-android) and iOS.
151182
152183
---
153184

0 commit comments

Comments
 (0)