The backend is the primary application, handling the x402 handshake and ZK generation.
| Component | Technology | Why? |
|---|---|---|
| Runtime | Node.js (v22+) | Optimized for Mac M4; best-in-class support for Hiero and ZK tools. |
| Framework | NestJS | Modular architecture perfect for "Gatekeeper" middleware (x402) and "Prover" services. |
| Payment | x402 Protocol SDK | Native HTTP-level payments. Implements the 402 Payment Required flow. |
| Ledger | Hiero SDK (JS) | Utilizes Hiero Consensus Service (HCS) for ultra-fast transaction logging (<1s finality). |
| ZK Engine | Circom + SnarkJS | Industry standard for generating and verifying Groth16 proofs. |
| Database | PostgreSQL + Prisma | For local caching of non-sensitive metadata (ledger is the primary truth). |
A dashboard for humans to manage agents, fund wallets, and view ZK-Proof logs.
- Framework: Next.js 15 (App Router) for the web management portal.
- Mobile: React Native (Expo) for real-time alerts and manual "Big-Ticket" payment approvals.
- Styling: Tailwind CSS + Shadcn UI for a high-end, "Enterprise Web3" aesthetic.
- Wallet: HashPack Wallet Connect for Hiero-native account management.
- Hardware: Mac M4.
- Prover Acceleration: Utilizing the M4’s Neural Engine for local ZK-Proof generation during testing.