[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-92730":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":15,"starSnapshotCount":15,"syncStatus":32,"lastSyncTime":33,"discoverSource":34},92730,"arc-fintech-app","Alice53211\u002Farc-fintech-app","Alice53211","fintech app for multi-chain treasury management system","",null,"TypeScript",132,1055,77,0,17,50.77,"Apache License 2.0",false,"master",true,[23,24,25,26,27,28],"arc-fintech","fintech","fintech-app","fintech-system","fintech-treasury","multi-chain","2026-07-22 04:02:06","# Arc Fintech App\n\nModern multi-chain treasury management system. This sample application uses Next.js, Supabase, and Circle Developer Controlled Wallets, Circle Gateway and Circle Bridge Kit with Forwarding Service to demonstrate a multi-chain treasury management system with bridge capabilities.\n\n\u003Cimg width=\"830\" height=\"467\" alt=\"Fintech App dashboard\" src=\"public\u002Fscreenshot.png\" \u002F>\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Getting Started](#getting-started)\n- [How It Works](#how-it-works)\n- [Webhooks & Real-Time Updates](#webhooks--real-time-updates)\n- [Environment Variables](#environment-variables)\n- [User Accounts](#user-accounts)\n\n## Prerequisites\n\n- **Node.js v22+** — Install via [nvm](https:\u002F\u002Fgithub.com\u002Fnvm-sh\u002Fnvm)\n- **Supabase CLI** — Install via `npm install -g supabase` or see [Supabase CLI docs](https:\u002F\u002Fsupabase.com\u002Fdocs\u002Fguides\u002Fcli\u002Fgetting-started)\n- **Docker Desktop** (only if using the local Supabase path) — [Install Docker Desktop](https:\u002F\u002Fwww.docker.com\u002Fproducts\u002Fdocker-desktop\u002F)\n- Circle Developer Controlled Wallets **[API key](https:\u002F\u002Fconsole.circle.com\u002Fsignin)** and **[Entity Secret](https:\u002F\u002Fdevelopers.circle.com\u002Fwallets\u002Fdev-controlled\u002Fregister-entity-secret)**\n\n## How It Works\n\n- Built with [Next.js](https:\u002F\u002Fnextjs.org\u002F) App Router and [Supabase](https:\u002F\u002Fsupabase.com\u002F)\n- Uses [Circle Developer Controlled Wallets](https:\u002F\u002Fdevelopers.circle.com\u002Fwallets\u002Fdev-controlled) for managing multi-chain transactions\n- Uses [Circle Gateway](https:\u002F\u002Fdevelopers.circle.com\u002Fgateway) for a unified, cross-chain USDC balance\n- Utilizes `@circle-fin\u002Fapp-kit` (`kit.bridge` \u002F `kit.estimateBridge`) for bridging assets across supported chains\n- [Circle webhooks](https:\u002F\u002Fdevelopers.circle.com\u002Fw3s\u002Fdocs\u002Fcircle-webhooks-overview) keep transaction and Gateway state in sync (see [Webhooks & Real-Time Updates](#webhooks--real-time-updates))\n- Real-time UI updates powered by Supabase Realtime subscriptions\n- Styled with [Tailwind CSS](https:\u002F\u002Ftailwindcss.com) and components from [shadcn\u002Fui](https:\u002F\u002Fui.shadcn.com\u002F)\n\n## Webhooks & Real-Time Updates\n\nThe dashboard refreshes balances automatically when funds move: a Circle webhook updates a row in Supabase, and a Supabase Realtime subscription pushes that change to the UI.\n\nCircle must reach your endpoint over the public internet, so local development needs a tunnel (e.g. [ngrok](https:\u002F\u002Fngrok.com\u002F)). Point a tunnel at your dev server and set `WEBHOOK_ENDPOINT_URL` accordingly:\n\n```bash\nngrok http 3000\n```\n\nThe app uses two subscriptions (both routed to the same handler): a standard Developer-Controlled Wallets subscription at `\u002Fapi\u002Fcircle\u002Fwebhook` for `transactions.*` events, and a permissionless Gateway subscription at `\u002Fapi\u002Fcircle\u002Fgateway-webhook` for `gateway.deposit.finalized`. Circle requires a unique endpoint URL per subscription, which is why the Gateway subscription uses a distinct path. New wallet addresses are registered on the Gateway subscription automatically when wallets are created.\n\n## Redis Caching\n\nThe app optionally integrates with [Redis](https:\u002F\u002Fredis.io\u002F) (via [ioredis](https:\u002F\u002Fgithub.com\u002Fredis\u002Fioredis)) for three things:\n\n1. **Balance response caching** — `\u002Fapi\u002Fgateway\u002Fbalance` and `\u002Fapi\u002Fwallet\u002Fbalance` fan out to Circle App Kit, the Circle DCW API, and four chain RPCs per request. Responses are cached for 30 seconds under a key that includes a per-address version counter.\n2. **Instant cache invalidation** — when a Circle webhook reports funds moving, the handler bumps the version counter for the affected addresses and deletes their cached on-chain USDC balances, so the next dashboard refresh sees fresh numbers immediately instead of waiting out the TTL.\n3. **Fast-path webhook dedup** — duplicate Circle webhook deliveries are rejected with a Redis `SET NX` marker before touching Postgres. The Supabase `webhook_events` unique constraint remains the durable source of truth; Redis just short-circuits the common retry case.\n\nRedis is entirely optional: if `REDIS_URL` is unset or the server is unreachable, every consumer degrades gracefully to its uncached behaviour.\n\nTo run Redis locally with Docker:\n\n```bash\ndocker run -d --name arc-redis -p 6379:6379 redis:7-alpine\n```\n\nThen set in `.env.local`:\n\n```bash\nREDIS_URL=redis:\u002F\u002Flocalhost:6379\n```\n\n## Environment Variables\n\nCopy `.env.example` to `.env.local` and fill in the required values:\n\n```bash\n# Supabase\nNEXT_PUBLIC_SUPABASE_URL=your-project-url\nNEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-publishable-or-anon-key\nSUPABASE_SERVICE_ROLE_KEY=your-service-role-key\n\n# Circle\nCIRCLE_API_KEY=your-circle-api-key\nCIRCLE_ENTITY_SECRET=your-circle-entity-secret\n\n# Webhooks (see \"Webhooks & Real-Time Updates\" below)\nWEBHOOK_ENDPOINT_URL=https:\u002F\u002Fyour-ngrok-url\u002Fapi\u002Fcircle\u002Fwebhook\n# GATEWAY_WEBHOOK_ENDPOINT_URL=  # optional override; derived from the above if unset\n\n# Arc Testnet RPC (optional)\nARC_TESTNET_RPC_KEY=\n\n# Redis (optional, see \"Redis Caching\" above)\nREDIS_URL=redis:\u002F\u002Flocalhost:6379\n```\n\n| Variable | Scope | Purpose |\n| --- | --- | --- |\n| `NEXT_PUBLIC_SUPABASE_URL` | Public | Supabase project URL. |\n| `NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY` | Public | Supabase anonymous\u002Fpublishable key. |\n| `SUPABASE_SERVICE_ROLE_KEY` | Server-side | Supabase service role key for admin operations. |\n| `CIRCLE_API_KEY` | Server-side | Circle API key for wallet operations. |\n| `CIRCLE_ENTITY_SECRET` | Server-side | Circle entity secret for signing transactions. |\n| `WEBHOOK_ENDPOINT_URL` | Server-side | Public HTTPS URL Circle posts notifications to (e.g. your ngrok tunnel + `\u002Fapi\u002Fcircle\u002Fwebhook`). Used to create\u002Fsync the standard and Gateway webhook subscriptions. If unset, falls back to `${NEXT_PUBLIC_APP_URL}\u002Fapi\u002Fcircle\u002Fwebhook` and registration is skipped when neither is set. |\n| `GATEWAY_WEBHOOK_ENDPOINT_URL` | Server-side | Optional. Dedicated endpoint for the Gateway *permissionless* subscription. Circle requires a unique URL per subscription, so this must differ from `WEBHOOK_ENDPOINT_URL`. If unset, it is derived by swapping the path to `\u002Fapi\u002Fcircle\u002Fgateway-webhook`. |\n| `ARC_TESTNET_RPC_KEY` | Server-side | Optional. API key for Arc Testnet RPC reads; without it, a rate-limited public RPC is used. |\n| `REDIS_URL` | Server-side | Optional. Redis connection string for balance caching and webhook dedup. If unset, the app runs uncached. |\n\n## User Accounts\n\n### Default Account\n\nOn first visit, sign up with any email and password.\n\n## Security & Usage Model\n\nThis sample application:\n- Assumes testnet usage only\n- Handles secrets via environment variables\n- Is not intended for production use without modification\n","这是一个面向金融科技领域的多链金库管理应用，用于统一监控、操作和跨链转移稳定币（如USDC）资产。核心功能包括：基于Circle Developer Controlled Wallets实现多链钱包管理，通过Circle Gateway提供跨链统一余额视图，并利用Circle Bridge Kit支持链间资产桥接；结合Supabase Realtime与Circle Webhook实现交易状态的实时同步与UI自动更新。适用于Web3机构财务团队、DAO金库运营者及需要合规管理多链稳定币资产的金融科技场景。",2,"2026-07-10 02:30:17","CREATED_QUERY"]