Installation

Fluppy SDK is currently distributed as an internal pnpm monorepo workspace. This guide covers local development setup.

ℹ
Fluppy packages (@fluppy/core, @fluppy/browser, @fluppy/react) are internal workspace packages and are not yet published to npm. Public npm publication is planned after external security audit and multi-party trusted setup ceremony.

1. Prerequisites

ToolVersionPurpose
Node.js≥ 18.0.0JavaScript runtime for Next.js and SDK builds
pnpm≥ 8.0.0Monorepo package manager (workspace protocol)
Rust + CargostableSoroban smart contract compilation to WASM
Stellar CLI≥ 22.xContract deployment and invocation
FreighterLatestStellar wallet browser extension for signing
# Install pnpm (if not already installed)
npm install -g pnpm

# Add Rust WASM target for Soroban contract compilation
rustup target add wasm32-unknown-unknown

# Install Stellar CLI
# See: https://developers.stellar.org/docs/tools/developer-tools/stellar-cli
cargo install --locked stellar-cli --features opt

2. Clone Repository

git clone https://github.com/dzakwannajmi/Fluppy.git
cd fluppy

The repository uses a pnpm workspace monorepo. The root pnpm-workspace.yaml declares three workspace packages plus the Next.js app.

pnpm-workspace.yaml
packages:
  - 'app'
  - 'packages/*'

3. Install Dependencies

# From the repository root — installs all workspace dependencies
pnpm install

This links all workspace packages via symlinks. You will see node_modules/@fluppy/core inside packages/fluppy-browser and app as workspace symlinks.

4. Configure Environment

cp app/.env.example app/.env.local

Edit app/.env.local with the following Testnet values:

app/.env.local
# Soroban contract — deployed on Stellar Testnet
NEXT_PUBLIC_CONTRACT_ID=CAGJIQ4W5Q7ZAYJ2QLH4M4TRIZJHFSDDJZ43PYAR4QEZVP76FTBDIBAS

# Soroban RPC endpoint
NEXT_PUBLIC_RPC_URL=https://soroban-testnet.stellar.org:443

# Horizon API (for transaction explorer links)
NEXT_PUBLIC_HORIZON_URL=https://horizon-testnet.stellar.org

# Stellar network passphrase — MUST match the contract's expected chainId
NEXT_PUBLIC_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
⚠
ChainId binding: The NEXT_PUBLIC_NETWORK_PASSPHRASE value is hashed to produce the chainId public signal in every ZK proof. A mismatch between the frontend value and the contract's expected value will cause all payments to reject with ChainIdMismatch.

5. Build SDK Packages

Build all SDK packages in dependency order. The Next.js app consumes them via workspace symlinks.

# Build @fluppy/core (zero dependencies — always first)
pnpm build:core

# Build @fluppy/browser (depends on @fluppy/core)
pnpm build:browser

# Build @fluppy/react (depends on @fluppy/browser + @fluppy/core)
pnpm build:react

# Typecheck React SDK
pnpm --filter @fluppy/react typecheck

# Build the Next.js app
pnpm build:app

All five commands should complete with no errors. Expected SDK bundle sizes after build:

PackageESMCJSDTS
@fluppy/core~10 KB~11 KB~9 KB
@fluppy/browser~31 KB~32 KB~11 KB
@fluppy/react~14 KB~14 KB~14 KB

6. Run the App Locally

cd app
pnpm dev
# Open http://localhost:3000

7. Workspace Dependency Model

Packages reference each other via the pnpm workspace protocol:

packages/fluppy-browser/package.json
{
  "dependencies": {
    "@fluppy/core": "workspace:*"
  }
}
app/package.json
{
  "dependencies": {
    "@fluppy/browser": "workspace:*",
    "@fluppy/core": "workspace:*",
    "@fluppy/react": "workspace:*"
  }
}

The workspace:* protocol resolves to the local package path at install time. Running pnpm install from the root creates the necessary symlinks automatically.

8. Future npm Installation

🔮
Not available today. The following shows how installation will work after packages are published to npm. Publication is planned after external security audit and multi-party trusted setup ceremony — both required before mainnet readiness.

Future npm install (preview only)

# Future package-manager command after package publication.
# DO NOT use this command today — packages are not yet published.

pnpm add @fluppy/core @fluppy/browser @fluppy/react
tsconfig.json (future)
{
  "compilerOptions": {
    "lib": ["ES2022", "DOM"],
    "strict": true,
    "moduleResolution": "bundler"
  }
}