Email login → embedded wallet → tokenized AAPL in three clicks.
Heads up. The Flo sandbox API is in private beta for design partners. With no
FLO_SANDBOX_KEYset, this demo runs in mock mode and returns canned mint responses. To call the live sandbox, apply for design-partner access.
A Next.js demo that pairs Privy (email-and-social-login embedded wallets) with Flo (tokenized US equity infrastructure). User signs in with email, Privy provisions an EVM wallet for them, and a single button mints fAAPL into that wallet on Base.
This is the integration most consumer fintechs in MENA, LatAm, and SEA actually need: their users don't have wallets, don't want to install MetaMask, and definitely don't want to write down a seed phrase.
- User clicks Continue with email. Privy sends a one-time code.
- Privy mints them a non-custodial EVM wallet behind the scenes. No browser extension. No seed phrase shown by default.
- User clicks Tokenize 10 AAPL. The server action calls Flo's
/v1/mintagainst the user's Privy-issued wallet address. - fAAPL lands in the user's wallet on Base.
- Sign up at dashboard.privy.io and create an app.
- Copy the App ID into
.env.localasNEXT_PUBLIC_PRIVY_APP_ID. - In the Privy dashboard, go to Configuration → Allowed origins and add
http://localhost:3000. Without this, embedded wallet creation will fail with a CORS error. - Enable email and Google login methods (under Login methods).
git clone https://github.com/flo-finance/flo-tokenize-with-privy
cd flo-tokenize-with-privy
cp .env.example .env.local
# Set NEXT_PUBLIC_PRIVY_APP_ID from the Privy dashboard
# (FLO_SANDBOX_KEY is optional, demo runs in mock mode without it)
npm install
npm run devOpen http://localhost:3000, sign in with any email, hit Tokenize.
Flo handles the broker-dealer leg (Interactive Brokers and Alpaca Securities, behind a routing layer), custody under SEC Rule 15c3-3, the SPV that issues the structured note, and the on-chain mint on Base. Privy handles wallet provisioning and key management. The integrator holds neither the wallet nor the underlying.
The user-facing leg is instant. The broker-to-exchange leg settles T+1 against DTCC and the Flo SPV absorbs that lag at the issuer level, so the user-facing experience doesn't see it.
Live mode requires KYB review with Flo (about two business days) and Privy production credentials. Swap the sandbox key, point at api.flo.finance, and ship.
- Flo docs and Privy docs
- Design partner program, $5K–$10K integration credit
- Other demos for FastAPI, RainbowKit, raw Next.js
MIT.