Environment Setup

Welcome to the DecoyPhrase developer ecosystem. This guide ensures you have the correct tools and configurations to contribute to the Web, Mobile, and Core projects.

1. Prerequisites

Before cloning the repositories, ensure your local machine meets the following requirements. We enforce strict versioning to prevent "it works on my machine" issues.

Global Tools

  • Node.js: v20.0.0 or higher (Required for Web & Core). Verify: node -v

  • Package Manager: npm (bundled) or pnpm (recommended for speed).

  • Git: For version control.

  • VS Code (Recommended): Install the Flutter and Prettier extensions.

Mobile-Specific

  • Flutter SDK: 3.10.4 or higher. Verify: flutter doctor

  • Dart SDK: Compatible with your Flutter version.

  • Xcode (macOS only): For iOS simulation.

  • Android Studio: For Android emulation (Min SDK 21).


2. Repository Cloning

We recommend organizing your workspace into a single directory to manage the three interconnected projects easily.

1

Prepare workspace

2

The Frontend (Web Client)

3

The Mobile App (Flutter)

4

The Core (Docs & Utilities)


3. Project Configuration & Installation

Each project requires specific environment variables to function correctly. Do not commit .env files to version control.

A. Web & Core Setup (Node.js)

Both decoyphrase-web and decoyphrase use the Next.js ecosystem.

1

Install Dependencies

2

Environment Variables (.env)

You must create a .env.local file in the root of both directories.

For decoyphrase-web (relies on Upstash Redis):

Edit .env.local to include:

3

Core (.env) — Arweave integration

For decoyphrase (Core):

Edit .env.local to include:

4

Start Development Servers

  • Web: http://localhost:3000

  • Core: http://localhost:3001 (Ensure ports do not conflict)

B. Mobile Setup (Flutter)

The mobile app is designed to be offline-first, so it requires minimal environment configuration but strict dependency management.

1

Install Dependencies

2

Asset Generation

If icons or wordlists appear missing, regenerate the assets:

3

Run the App

Select your target device (Simulator or Physical Device) and run:


4. Troubleshooting

Issue
Solution

Node Version Warning

Ensure you are on Node v20+. Use nvm use 20 if you use NVM.

CocoaPods Error (iOS)

Run sudo gem install cocoapods then cd ios && pod install.

Missing Assets

Verify pubspec.yaml assets section and run flutter pub get.

Arweave Connection Fail

Check that your NEXT_PUBLIC_MASTER_WALLET_JWK in .env.local is a valid JSON string.