Skip to content

KephothoM/AudiBit

Repository files navigation

AudiBit 🎯

AudiBit Cover

Watch Demo Pitch Deck Landing Page

AI-powered web auditing, paid per query in USDC on Arc.

AudiBit is a Chrome extension that sends specialized AI agents to audit any website you're browsing β€” checking visual design, accessibility, DOM structure, and security vulnerabilities β€” and settles each query as a real USDC nanopayment on the Arc L1 blockchain. No subscriptions. No flat fees. You pay exactly for what you use, down to fractions of a cent.


What it actually does

You open a website, click an agent, and within 20–30 seconds you get a structured report of everything wrong with that page. The moment the AI finishes, a tiny USDC payment settles on-chain from your wallet to the agent's wallet. Every audit is a real blockchain transaction you can verify on the Arc Testnet Explorer.

There are four agents, each with a different specialty and price:

Agent What it looks for Price
🎨 UI Agent Color consistency, typography, spacing, visual hierarchy 0.005 USDC
🧠 UX Agent Accessibility (WCAG), navigation flow, touch targets, screen reader support 0.008 USDC
πŸ—οΈ DOM Agent Semantic HTML, performance anti-patterns, broken structure 0.003 USDC
πŸ›‘οΈ Security Agent XSS vectors, header misconfigurations, outdated libraries 0.012 USDC

You can also talk to the page using Wand β€” a voice-first assistant that lets you point at elements and ask questions out loud. "What is this?", "click this", "zoom in here" β€” it understands both your voice and where your cursor is pointing.


The payment model

This is the part that makes AudiBit different from every other audit tool.

Before any AI work starts, the extension checks your USDC balance on Arc Testnet. If you have enough, it charges you first, then runs the audit. If you don't have enough, it tells you exactly how much you're short and cancels β€” no partial charges, no surprises.

If your USDC is on a different chain (Ethereum Sepolia, Solana Devnet), the system automatically bridges it to Arc using Circle's CCTP protocol before charging. You don't have to think about which chain your money is on.

Every payment is recorded in Firestore and cached locally in the extension. When you reopen AudiBit after closing it, your full history β€” every audit, every settlement, every on-chain transaction hash β€” is right there waiting for you.


Architecture

Chrome Extension (React + TypeScript)
    β”‚
    β”œβ”€β”€ Popup UI          β€” wallet, balance, agent cards, logs, settlements
    β”œβ”€β”€ Content Script    β€” DOM extraction, Wand overlay, audit mode
    β”œβ”€β”€ Service Worker    β€” message routing, API calls, local cache
    └── Wand Overlay      β€” voice recognition, cursor tracking, visual feedback
         β”‚
         β–Ό
Firebase Cloud Functions (TypeScript, Node 22)
    β”‚
    β”œβ”€β”€ Nanopayment Engine   β€” balance check β†’ bridge if needed β†’ charge β†’ receipt
    β”œβ”€β”€ Agentic System       β€” coordinator dispatches to specialized agents in parallel
    β”œβ”€β”€ Audit Functions      β€” UI / UX / DOM / Security agents (Gemini 2.0 Flash)
    β”œβ”€β”€ Wand Agent           β€” voice + vision + cursor multimodal processing
    β”œβ”€β”€ Bridge Functions     β€” Circle App Kit CCTP cross-chain transfers
    └── Circle Wallet Fns    β€” wallet creation, balance, transactions, payment logs
         β”‚
         β–Ό
External Services
    β”œβ”€β”€ Arc Testnet          β€” L1 blockchain, USDC as gas, sub-second finality
    β”œβ”€β”€ Circle API           β€” developer-controlled wallets, USDC transfers
    β”œβ”€β”€ Circle CCTP          β€” cross-chain USDC bridging
    β”œβ”€β”€ Gemini 2.0 Flash     β€” AI model for all agents
    └── Firestore            β€” audit history, payment logs, wallet state

Project structure

AudiBit/
β”œβ”€β”€ extension/                    # Chrome extension
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ popup/
β”‚   β”‚   β”‚   β”œβ”€β”€ Popup.tsx         # Main UI β€” dashboard, logs, settlements
β”‚   β”‚   β”‚   └── SplashScreen.tsx  # Startup animation
β”‚   β”‚   β”œβ”€β”€ content/
β”‚   β”‚   β”‚   β”œβ”€β”€ content-script.ts # DOM extraction, message handling
β”‚   β”‚   β”‚   β”œβ”€β”€ wand-overlay.ts   # Voice + cursor UI layer
β”‚   β”‚   β”‚   └── audit-wand-integration.ts  # Voice-guided auditing
β”‚   β”‚   β”œβ”€β”€ background/
β”‚   β”‚   β”‚   └── service-worker.ts # Audit orchestration, cache management
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ PaymentLog.tsx    # Settlement history component
β”‚   β”‚   β”‚   └── AgentStatusPanel.tsx  # Live audit progress
β”‚   β”‚   β”œβ”€β”€ lib/
β”‚   β”‚   β”‚   └── circle-wallet.ts  # Wallet helpers, balance, bridge calls
β”‚   β”‚   └── types/index.ts        # Shared TypeScript types
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ functions/                    # Firebase Cloud Functions
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.ts              # Entry point, exports all functions
β”‚   β”‚   β”œβ”€β”€ audit-functions.ts    # auditUI, auditUX, auditDOM, auditSecurity
β”‚   β”‚   β”œβ”€β”€ agentic-system.ts     # Multi-agent coordinator (ADK pattern)
β”‚   β”‚   β”œβ”€β”€ circle-wallet-functions.ts  # Wallet CRUD, balance, settlements
β”‚   β”‚   β”œβ”€β”€ wand-agent.ts         # Voice assistant backend
β”‚   β”‚   β”œβ”€β”€ bridge-functions.ts   # Cross-chain USDC bridging
β”‚   β”‚   β”œβ”€β”€ nanopayment-functions.ts    # Quote endpoints
β”‚   β”‚   β”œβ”€β”€ wallet-import-functions.ts  # BYOW β€” import existing wallets
β”‚   β”‚   └── lib/
β”‚   β”‚       β”œβ”€β”€ nanopayment-engine.ts   # Core payment gate
β”‚   β”‚       β”œβ”€β”€ balance-checker.ts      # Pre-flight checks + auto-bridge
β”‚   β”‚       β”œβ”€β”€ bridge-manager.ts       # Circle App Kit wrapper
β”‚   β”‚       └── metering.ts             # Compute unit pricing
β”‚   β”œβ”€β”€ package.json
β”‚   └── tsconfig.json
β”‚
β”œβ”€β”€ .firebaserc
β”œβ”€β”€ firebase.json
└── README.md

Getting started

What you need

  • Node.js 22 β€” the functions run on Node 22
  • Firebase CLI β€” npm install -g firebase-tools
  • Google Chrome β€” to load the extension
  • Circle Developer Account β€” console.circle.com β€” free to sign up, get your API key and entity secret
  • Gemini API Key β€” ai.google.dev β€” free tier works fine for testing

1. Clone and install

git clone <repo-url>
cd AudiBit

# Install function dependencies
cd functions && npm install && cd ..

# Install extension dependencies
cd extension && npm install && cd ..

2. Configure environment

Create functions/.env with your credentials:

# Gemini AI
GEMINI_API_KEY=your_gemini_api_key

# Circle API (from console.circle.com)
CIRCLE_API_KEY=TEST_API_KEY:your_key_here
CIRCLE_ENTITY_SECRET=your_64_char_entity_secret
CIRCLE_WALLET_SET_ID=your_wallet_set_id

# Platform wallet (receives agent fees)
PLATFORM_WALLET_ADDRESS=0x...your_arc_wallet_address

# Optional: separate wallets per agent
# AGENT_WALLET_UI=0x...
# AGENT_WALLET_UX=0x...
# AGENT_WALLET_DOM=0x...
# AGENT_WALLET_SECURITY=0x...

3. Build

# Build the backend
cd functions && npm run build && cd ..

# Build the extension
cd extension && npm run build && cd ..

4. Start the local backend

firebase emulators:start --only functions,firestore

The functions will be available at http://127.0.0.1:5001/your-project-id/us-central1/.

5. Load the extension in Chrome

  1. Open Chrome and go to chrome://extensions/
  2. Turn on Developer mode (top right toggle)
  3. Click Load unpacked
  4. Select the extension/dist/ folder
  5. The AudiBit icon appears in your toolbar

6. Connect a wallet

  1. Click the AudiBit icon
  2. Click Connect Arc Wallet β€” this creates a Circle developer-controlled wallet on Arc Testnet
  3. Copy your wallet address
  4. Go to faucet.circle.com, select Arc Testnet, paste your address, and request USDC
  5. Wait ~15 seconds, then click the refresh button (πŸ”„) in the popup β€” your balance should appear

You're ready to run audits.


Running an audit

  1. Navigate to any website in Chrome
  2. Click the AudiBit extension icon
  3. On the Overview tab, click one of the four agent cards
  4. A payment confirmation modal appears showing the exact cost and your current balance
  5. If you have enough USDC, click Pay & Run β€” the audit starts immediately
  6. Watch the live status panel at the bottom as the agent works
  7. When it finishes, go to the Logs tab to see the full report

Each issue in the report is expandable β€” click it to see the description and a specific recommendation for fixing it. Issues are grouped by which agent found them.


Checking your settlements

The Settlements tab shows every USDC payment that has settled on Arc. Click any row to expand it and see:

  • The Circle transaction ID
  • The on-chain transaction hash (once confirmed)
  • Exact amount in USDC and compute units
  • Timestamp
  • A direct link to the Arc Testnet Explorer to verify the transaction on-chain

All of this persists locally β€” close the extension, reopen it, and everything is still there. The extension caches your audit history and settlement records in chrome.storage.local so you never lose them between sessions.


Bring Your Own Wallet (BYOW)

If you already have a Circle developer-controlled wallet on Arc Testnet, you can import it instead of creating a new one:

  1. Click your wallet address at the bottom of the popup
  2. Click Import Existing Wallet
  3. Either paste the address manually or select from the list of wallets in your Circle account
  4. Click Verify, then Import

The wallet must be on Arc Testnet or Arc Mainnet and must belong to the same Circle API credentials configured in your backend.


Wand β€” voice-first browser assistant

Wand is a separate mode that turns your voice and cursor into a browser control interface. Press Ctrl+Space (or Cmd+Space on Mac) to activate it, then point at anything on screen and speak naturally:

  • "What is this?" β€” takes a screenshot, analyzes what's at your cursor, explains it
  • "Play this" β€” clicks whatever you're pointing at
  • "Search for hiking boots" β€” navigates to a shopping site with that query
  • "Zoom in here" β€” scrolls at your cursor position
  • "Who invented this?" β€” searches and answers without touching the browser

When you're in an active audit, Wand becomes audit-aware. Point at any element and say "inspect this", "check contrast", or "suggest improvements" β€” the relevant agent analyzes that specific element and speaks the result back to you.


How the payment gate works

Every agent call goes through the same gate before any AI work runs:

1. Resolve wallet from Firestore (auto-sync from Circle API if missing)
2. Check USDC balance β‰₯ agent price + 0.001 USDC gas buffer
3. If wallet is on wrong chain β†’ bridge via Circle CCTP to Arc Testnet
4. If balance still insufficient β†’ return structured rejection, cancel query
5. Execute Circle createTransaction: user wallet β†’ agent wallet
6. Poll for on-chain txHash (Arc finalizes in < 1 second)
7. Write payment_log to Firestore with txHash
8. Return receipt β†’ agent query proceeds

If step 4 triggers, you see a clear error in the popup with the exact shortfall and a link to the faucet. Nothing runs, nothing is charged.


Agent pricing

Agent USDC Compute Units
UI 0.005 5 CU
UX 0.008 8 CU
DOM 0.003 3 CU
Security 0.012 12 CU
Wand query 0.002 2 CU
Coordinator fee 0.001 1 CU

1 Compute Unit = 0.001 USDC. The coordinator fee applies when using the full agentic system (which runs multiple agents in parallel and uses an LLM to decide which ones to invoke).


Local development tips

Watching function logs:

firebase functions:log

Rebuilding after changes:

# Functions
cd functions && npm run build

# Extension (then reload in chrome://extensions)
cd extension && npm run build

Checking the Firestore emulator: Open http://localhost:4000 while the emulator is running. You can browse wallets, payment_logs, audits, and agent_sessions collections directly.

The extension doesn't need a rebuild to pick up function changes β€” the service worker calls the emulator URL at runtime. You only need to rebuild the extension when you change extension source files.


Deploying to production

# Deploy functions
cd functions
npm run build
firebase deploy --only functions

# The extension is distributed as a Chrome Web Store package
# Build it first:
cd extension
npm run build
# Then zip the dist/ folder and upload to the Chrome Web Store

Before going to mainnet:

  • Switch ARC-TESTNET to ARC-MAINNET in the wallet creation flow
  • Update CIRCLE_API_KEY to a production key (remove the TEST_API_KEY: prefix)
  • Set up Firebase security rules to restrict Firestore access
  • Configure separate agent wallet addresses per agent type
  • Enable Firestore backups

Tech stack

Layer Technology
Extension UI React 19, TypeScript, Vite, Chrome MV3
Backend Firebase Cloud Functions, Node 22, TypeScript
AI Gemini 2.0 Flash (Google Generative AI SDK)
Blockchain Arc Testnet (EVM-compatible L1, USDC as gas)
Payments Circle Developer-Controlled Wallets, Circle CCTP
Database Firestore
Voice Web Speech API, Speech Synthesis API

Known limitations (testnet)

  • Arc Testnet only β€” mainnet support requires updating the blockchain config and Circle API keys
  • Faucet rate limits β€” Circle's testnet faucet allows one request per 24 hours per address
  • Bridge time β€” cross-chain USDC bridging via CCTP takes 10–30 seconds; the extension waits automatically
  • txHash availability β€” on-chain hashes appear after Arc confirms the transaction (usually < 2 seconds); older payment records created before this update won't have a txHash and will show "pending confirmation" in the explorer link

License

Apache 2.0


Built on Arc and Circle infrastructure. USDC payments settle on-chain. Every audit is a real transaction.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages