The AI creator platform where prompt engineers get paid by their curious audience.
Beautiful AI-generated content makes people ask one question: "How was this made?" Cuerate bridges the gap between the curious mind and the creative mind — AI creators post the prompts and workflows behind their images and videos, and their audience pays them for it.
- Live app: https://cuerate.dotarc.my
- Demo video: https://youtu.be/LqkwzZhjd7M
- Built on Arc (Circle's USDC-native chain) for the Lepton hackathon.
- Post prompts & results. Creators publish the prompt (or a multi-generation workflow for complex videos) alongside the image/video it produced, tagged with the model used (ChatGPT, Midjourney, etc.).
- Likes are micropayments. Every like from a consumer is an on-chain USDC micropayment straight to the creator — the base tier is 0.001 USDC, with a higher tier for premium content.
- Fork with on-chain attribution. Any prompt can be forked and improved. Because every post's lineage is registered on-chain, the original creator always keeps credit — this encourages originality instead of silent prompt theft.
- Decaying fork royalties. When a forked post earns, the payment is split geometrically up the fork tree — the liked post gets 50%, its parent 25%, the grandparent 12.5%, and so on up to the original creator, with the platform absorbing the dust remainder. Original (unforked) posts pay the creator 95% with a flat 5% platform fee. All enforced by a smart contract — no middlemen. This is only practical on Arc, where nanopayments make sub-cent splits economical.
- Direct tipping. Consumers who found a creator's content helpful can tip them any amount directly (no minimum).
- Leaderboards. Ranked boards for top creators (by earnings) and top supporters (by tips/likes), refreshed on a schedule.
- Agent-native
inspireAPI. Agents can discover prompts through an x402-wrapped endpoint — they pay per query in USDC from a Circle agent wallet, and the fee flows through the same fork-royalty split to the creators. - Plus: in-app Circle wallet, notifications, search/explore, onboarding, docs, and Google + email sign-in.
| Layer | Choice |
|---|---|
| Frontend | React + Vite + TypeScript, Tailwind CSS, Radix / shadcn, MUI |
| Auth & data | Firebase (Auth + Firestore) |
| Backend | Firebase Cloud Functions (v2) |
| Media storage | Supabase Storage buckets |
| Wallets | Circle Developer-Controlled Wallets — removes the friction of signing every transaction manually |
| Chain | Arc testnet — USDC as native gas |
| Royalties | CuerateRoyalty.sol (Solidity / Foundry), deployed via Circle's Smart Contract Platform |
React (Vite) ──► Firebase Cloud Functions ──► Circle Dev-Controlled Wallets ──► Arc (USDC)
│ │ │
Firestore settlement.ts CuerateRoyalty.sol
(posts, likes, onchain.ts ───── registerPost / settle ─────► fork lineage + royalty split
tips, boards) leaderboard.ts
inspire (x402 endpoint for agents)
Supabase Storage ◄── media uploads
Key backend functions (functions/src/index.ts):
ensureCircleWallet/getCircleWalletStatus/refreshCircleWalletBalance— per-user Circle wallet lifecycle.recordPaidLike— records a like and its USDC micropayment.settlePendingPayments/triggerSettlement— batch settlement of paid likes on-chain.sendTip— direct creator tipping.onPromptCreated— registers each new post's fork lineage on-chain (registerPost).inspire— the x402 agent API: returns402 Payment Requireduntil an agent pays, then matches a prompt and settles the fee across the fork lineage.rebuildLeaderboardsScheduled/triggerLeaderboardRebuild— leaderboard aggregation.circleWebhook— Circle transaction status callbacks.
The fork-royalty rule lives in three places that stay in sync: the on-chain contracts/src/CuerateRoyalty.sol settle(), the off-chain functions/src/settlement.ts, and the display calc in functions/src/onchain.ts.
npm i # install dependencies
npm run dev # start the Vite dev serverCopy .env.example to .env and fill in:
- Firebase web app config values.
- Supabase storage vars —
VITE_SUPABASE_URL,VITE_SUPABASE_ANON_KEY,VITE_SUPABASE_BUCKET(media uploads use Supabase Storage).
Cloud Functions read their own functions/.env (see functions/.env.example) for Circle API keys, the Arc chain (CIRCLE_BLOCKCHAIN=ARC-TESTNET), the deployed ROYALTY_CONTRACT_ADDRESS, INSPIRE_PRICE_USDC, and the leaderboard schedule.
src/lib/backend.ts uses Firebase when env vars are present and falls back to local stubs/mock data when they are not.
Shortcuts so you don't have to remember the full Firebase CLI:
| Script | Does |
|---|---|
npm run firebase:login |
Sign your machine into Firebase |
npm run firebase:use |
Point this repo at the cuerate-e31b5 project |
npm run firebase:deploy-rules |
Deploy Firestore + Storage rules |
npm run firebase:emulators |
Run Firebase locally for safe testing |
npm run functions:build / functions:deploy |
Build / deploy Cloud Functions |
The contracts/ directory is a Foundry project.
cd contracts
forge test # run the royalty-split test suiteDeployment goes through Circle's Smart Contract Platform. Note: SCP deploys via Circle's managed deployer EOA, so CuerateRoyalty's constructor sets owner = _platform (the registrar/treasury wallet) rather than msg.sender.
Cuerate is open source and applying to the Arc Open Source Showcase. Reusable primitives other Arc builders can hack on:
CuerateRoyalty.sol— a general on-chain fork-registry + geometric-decay royalty splitter for USDC on Arc. Not specific to prompts; any "derivative work with lineage" use case (remixes, datasets, templates) can reuse it.- An x402 pattern on Arc — the
inspirefunction is a working reference for gating an HTTP resource behind a USDC micropayment settled through a Circle agent wallet, including the402challenge andWWW-Authenticateheader. - Circle Dev-Controlled Wallet + Arc settlement plumbing —
functions/src/circle.ts,wallet.ts,onchain.ts, andsettlement.tsare a reference for wiring Circle wallets to on-chain settlement without manual signing.
MIT (see contracts/src/CuerateRoyalty.sol SPDX headers).