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#
git clone https://github.com/Dominion116/Floe.git
cd Floe
npm install
cp .env.example .env.local
npm run devOpen 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.
| Feature | Needs |
|---|---|
| Landing page, docs and claim demo | Nothing |
| Live prices | Nothing. A CoinGecko key only raises the rate limit. |
| Create and refund links | NEXT_PUBLIC_FLOE_PACKAGE_ID |
| Claim with Google or a wallet | The package ID, NEXT_PUBLIC_GOOGLE_CLIENT_ID, NEXT_PUBLIC_ENOKI_API_KEY and ENOKI_SECRET_KEY |
Set up real payments#
- Publish the contract to testnet and copy its package ID.
- Create a Google OAuth client with
http://localhost:3000/authas a redirect URI. - Set up Enoki with one public and one private API key.
- Fill in
.env.localusing the configuration reference, then restart the server.
Check your changes#
# Types, from the project root
npx tsc --noEmit
# Contract tests
cd move
sui move testProject layout#
| Path | Contents |
|---|---|
| move/sources | The floe::escrow contract |
| move/tests | Contract unit tests |
| src/app | Pages and API routes |
| src/components | Interface, grouped by feature |
| src/content | These docs and the legal pages |
| src/lib/chain | Network settings, reads and transaction builders |
| src/lib/crypto.ts | Link keys and link format |
| src/lib/storage.ts | The sender’s saved history |
| src/lib/rates.ts | Server-side live prices |