Get started

Quickstart

Run Floe on your own machine, from a fresh clone to a working claim on testnet.

On this page

What you need#

  • Node.js 18.18 or later
  • npm 9 or later. The project uses npm only, so don’t use Yarn, pnpm or Bun.
  • Sui CLI, if you want to test or publish the contract
  • A Sui wallet with testnet SUI, if you want to create links

Run the app#

Terminal
git clone https://github.com/Dominion116/Floe.git
cd Floe
npm install
cp .env.example .env.local
npm run dev

Open http://localhost:3000. The landing page, the claim demo and live prices work straight away.

What works before you add keys#

Floe turns features off when their settings are missing, instead of failing part way through a payment.

FeatureNeeds
Landing page, docs and claim demoNothing
Live pricesNothing. A CoinGecko key only raises the rate limit.
Create and refund linksNEXT_PUBLIC_FLOE_PACKAGE_ID
Claim with Google or a walletThe package ID, NEXT_PUBLIC_GOOGLE_CLIENT_ID, NEXT_PUBLIC_ENOKI_API_KEY and ENOKI_SECRET_KEY

Set up real payments#

  1. Publish the contract to testnet and copy its package ID.
  2. Create a Google OAuth client with http://localhost:3000/auth as a redirect URI.
  3. Set up Enoki with one public and one private API key.
  4. Fill in .env.local using the configuration reference, then restart the server.

Check your changes#

Terminal
# Types, from the project root
npx tsc --noEmit

# Contract tests
cd move
sui move test

Project layout#

PathContents
move/sourcesThe floe::escrow contract
move/testsContract unit tests
src/appPages and API routes
src/componentsInterface, grouped by feature
src/contentThese docs and the legal pages
src/lib/chainNetwork settings, reads and transaction builders
src/lib/crypto.tsLink keys and link format
src/lib/storage.tsThe sender’s saved history
src/lib/rates.tsServer-side live prices