GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rabuawad/sandia: Sandia brings payments, transfers, DeFi yield, and tokenized stocks into one simple app built around USDG on Robinhood Chain.

BranchesTags
Open more actions menu

Latest commit

 

History

68 Commits
68 Commits

Folders and files

NameName
Last commit message
Last commit date
.agents/skills
.agents/skills
 
 
.cursor
.cursor
 
 
.github/workflows
.github/workflows
 
 
.react-doctor
.react-doctor
 
 
app
app
 
 
components
components
 
 
convex
convex
 
 
core
core
 
 
docs
docs
 
 
hooks
hooks
 
 
lib
lib
 
 
public
public
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.oxfmtrc.json
.oxfmtrc.json
 
 
.oxlintrc.json
.oxlintrc.json
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
components.json
components.json
 
 
doctor.config.json
doctor.config.json
 
 
eslint.config.mjs
eslint.config.mjs
 
 
next.config.ts
next.config.ts
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
postcss.config.mjs
postcss.config.mjs
 
 
proxy.ts
proxy.ts
 
 
skills-lock.json
skills-lock.json
 
 
tsconfig.json
tsconfig.json
 
 
vercel.json
vercel.json
 
 
vitest.config.ts
vitest.config.ts
 
 

Repository files navigation

Sandia

USD-denominated payment requests settled as stablecoins on Robinhood Chain via Across Protocol.

Stack

  • Next.js App Router + React 19
  • Convex (database + backend functions)
  • Privy for Sandia accounts (email OTP and an embedded wallet) and for payer wallet connection, wagmi/viem for chain reads and sends
  • Across Swap API for quotes, approvals, bridging, and deposit tracking

Setup

After step 3 initializes Convex, configure Jev through OpenRouter. Keep this key in Convex only:

npx convex env set OPENROUTER_API_KEY <openrouter-api-key>
  1. Copy env template:
cp .env.example .env.local
  1. Install dependencies:
pnpm install
  1. Start Convex (creates a deployment and writes NEXT_PUBLIC_CONVEX_URL):
npx convex dev
  1. Set the Privy app id in .env.local:
NEXT_PUBLIC_PRIVY_APP_ID=<privy-app-id>

Create a Privy app with email OTP and wallets enabled. Allow http://localhost:3000. On Convex, set the same app id and the wallet-claim secret:

npx convex env set PRIVY_APP_ID <same-as-NEXT_PUBLIC_PRIVY_APP_ID>
npx convex env set SANDIA_NONCE_SECRET <secret>

The Privy app secret stays on Convex only. Copy it from Configuration → App settings → Basics in the Privy Dashboard. Privy shows it once; regenerating it invalidates the previous secret. Do not put it in .env.local or any NEXT_PUBLIC_ variable. The Next.js client does not read it. Client sends authenticate with the signed-in Privy session.

npx convex env set PRIVY_APP_SECRET <app-secret>

Batch sends also need the deployed Sandia Send address in .env.local:

NEXT_PUBLIC_SANDIA_SEND_ADDRESS=<sandia-send-address>

The Sandia Send contract, deployment scripts, and contract tests live in sandia-core.

A single recipient still transfers USDG directly. Two or more recipients approve that contract, then call sandia_send.

  1. In another terminal:
pnpm dev

Open http://localhost:3000.

Product flow

  1. Creator signs in with email+OTP. Privy creates an embedded wallet, and that wallet is claimed automatically so they can create requests and send.
  2. Create a request: USD amount, optional description and expiry. The recipient is that wallet. The destination token is USDG on Robinhood Chain.
  3. Share the public /pay/{id} URL.
  4. Payer connects an external wallet through Privy, selects an Across-supported source chain/token, reviews quote (input, fees, min received, ETA), approves if needed, and pays. Paying does not create a Sandia account.
  5. The request is marked completed only after a deposit receipt matches the request and Across /deposit reports filled with destination chain 4663, the request token, the snapshotted recipient, an output amount at least as large as the request, and a fill transaction. /deposit/status is not used as proof. A minute cron keeps checking if the payer closes the tab.

Notes

  • Monetary values are stored as integer base units / USD micros — no floating-point arithmetic.
  • Destination tokens are discovered live from GET /swap/tokens?chainId=4663 filtered to USDC|USDT|USDG.
  • The payer's browser also polls every 10 seconds. The server calls Across GET /deposit (or /deposits) with ACROSS_API_KEY on Convex, not a public env var.
  • Register an Across integrator id and set Convex ACROSS_INTEGRATOR_ID.
  • /otc redirects to /requests/new.
  • App accounts use the Privy embedded wallet on Robinhood Chain. The public pay page uses the same Privy wagmi provider and connects an external wallet for payment, so paying does not claim a Sandia account. WalletConnect for payers is the connector enabled in the Privy dashboard.
  • Outbound USDG sends use Privy's embedded-wallet gas sponsorship on Robinhood Chain (chain id 4663), so the sender does not need ETH. The browser calls useSendTransaction with sponsor: true; that uses the signed-in session, not the app secret. In the Privy Dashboard: enable TEE execution under Wallets → Advanced (do not disable automatic wallet migration), turn on Fee sponsorship → Sponsor gas fees (App pays; User pays does not cover Robinhood Chain), add Robinhood Chain, allow client-initiated sponsored transactions, set a spend cap, and add credits plus a payment method under Billing → Fee sponsorship. Store the app secret only as Convex PRIVY_APP_SECRET. Batch sends sponsor both the USDG approval and the Sandia Send call.
  • Stock buy and sell quote Uniswap v2 and v3 on Robinhood Chain and submit the swap to SwapRouter02. Steakhouse USDG deposits, withdrawals, and redemptions are submitted from Earn. See docs/gates.md.

About

Sandia brings payments, transfers, DeFi yield, and tokenized stocks into one simple app built around USDG on Robinhood Chain.

sandia-lovat.vercel.app

Topics

ethereumnextjsprivyusdgweb3

Resources

Readme
MIT license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.