Installation
Fluppy SDK is currently distributed as an internal pnpm monorepo workspace. This guide covers local development setup.
@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
| Tool | Version | Purpose |
|---|---|---|
| Node.js | ≥ 18.0.0 | JavaScript runtime for Next.js and SDK builds |
| pnpm | ≥ 8.0.0 | Monorepo package manager (workspace protocol) |
| Rust + Cargo | stable | Soroban smart contract compilation to WASM |
| Stellar CLI | ≥ 22.x | Contract deployment and invocation |
| Freighter | Latest | Stellar 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 opt2. Clone Repository
git clone https://github.com/dzakwannajmi/Fluppy.git
cd fluppyThe repository uses a pnpm workspace monorepo. The root pnpm-workspace.yaml declares three workspace packages plus the Next.js app.
packages:
- 'app'
- 'packages/*'3. Install Dependencies
# From the repository root — installs all workspace dependencies
pnpm installThis 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.localEdit app/.env.local with the following Testnet values:
# 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 2015NEXT_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:appAll five commands should complete with no errors. Expected SDK bundle sizes after build:
| Package | ESM | CJS | DTS |
|---|---|---|---|
| @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:30007. Workspace Dependency Model
Packages reference each other via the pnpm workspace protocol:
{
"dependencies": {
"@fluppy/core": "workspace:*"
}
}{
"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
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{
"compilerOptions": {
"lib": ["ES2022", "DOM"],
"strict": true,
"moduleResolution": "bundler"
}
}