Skip to main content
Before you can build and run Rainbow, you need to install several prerequisites. This guide covers the required tools for both internal developers and external contributors.
Internal developers can use the automated setup script from rainbow-me/rainbow-setup to install all dependencies and configure the project in one step.

Required Tools

1. Node.js (Version 22+)

Rainbow requires Node.js 22 or higher. We recommend using nvm (Node Version Manager) to manage Node.js versions.
1

Install nvm

Install nvm from the official repository:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
Or visit https://github.com/creationix/nvm for installation instructions.
2

Install Node.js

Navigate to the Rainbow directory and install the required Node.js version:
nvm install
This reads the .nvmrc file which specifies v22.
3

Use the correct version

On future terminal sessions, activate the correct Node.js version:
nvm use
Set up automatic nvm switching in your shell to avoid running nvm use manually.

2. Ruby (Version 3.4.8)

Rainbow uses Ruby for iOS tooling, specifically for CocoaPods and Fastlane.
macOS system Ruby is too old and will not work. You must use a version manager like rbenv or rvm.

3. Yarn (Version 4.2.2)

Rainbow uses Yarn 4 with Corepack for package management.
1

Enable Corepack

Corepack is included with Node.js 22. Enable it with:
corepack enable
2

Verify Yarn version

The project’s package.json specifies "packageManager": "[email protected]", so Corepack will automatically use the correct version.
yarn --version
# Should output: 4.2.2

API Keys and Configuration

You’ll need to set up API keys for various services. The process differs for internal developers and external contributors.

For Internal Developers

Complete these steps before running yarn install, as the postinstall script reads .env and rainbow-scripts to generate build configs.
1

Get .env file

Copy dotenv from the private rainbow-me/rainbow-env repo to .env in the project root:
# Option 1: Manual copy from rainbow-env repo
cp path/to/rainbow-env/dotenv .env

# Option 2: Use the update script (requires GITHUB_TOKEN)
yarn update-env
2

Get google-services.json

Copy android/app/google-services.json from rainbow-env to android/app/ in this project:
cp path/to/rainbow-env/google-services.json android/app/
3

Clone rainbow-scripts

Clone the rainbow-me/rainbow-scripts repo into the project root:
git clone https://github.com/rainbow-me/rainbow-scripts.git
The postinstall prebuild hooks depend on this.

For External Contributors

External contributors need to provide their own API keys.
1

Copy .env.example

Create your own .env file from the example:
cp .env.example .env
2

Fill in API keys

Edit .env and add your own API keys. You’ll need:
Some features are currently not accessible for external contributors. We are working with Data Providers to provide open source API keys.
3

Create Firebase project

Create a personal Firebase project registered under the package name me.rainbow, then:
  1. Download google-services.json from Firebase Console
  2. Place it in android/app/google-services.json
The iOS GoogleService-Info.plist is already in the repo. The postinstall script patches it with GOOGLE_SERVICE_API_KEY from your .env.

Verify Prerequisites

Before proceeding to installation, verify all prerequisites are correctly installed:
# Check Node.js version (should be 22+)
node --version

# Check Ruby version (should be 3.4.8)
ruby --version

# Check Yarn version (should be 4.2.2)
yarn --version

# Verify .env file exists
ls -la .env

# For external contributors, verify google-services.json
ls -la android/app/google-services.json

Next Steps

With all prerequisites installed, you’re ready to install Rainbow’s dependencies:

Installation

Install dependencies and run the setup script

Troubleshooting

After installing nvm, you need to restart your terminal or source your shell profile:
source ~/.bashrc  # or ~/.zshrc
Make sure you’re not using system Ruby:
which ruby
# Should output something like /Users/you/.rbenv/shims/ruby
# NOT /usr/bin/ruby
If Yarn doesn’t work, ensure Corepack is enabled:
corepack enable
yarn --version

Build docs developers (and LLMs) love