Prerequisites
Before starting local development, ensure you have the following installed and configured:- Node.js 18+ and npm
- Base Sepolia wallet with test ETH for gas
- Test USDC on Base Sepolia network
- Supabase project (recommended for data persistence)
- Gemini API key for AI orchestration
- CDP API key pair (recommended for wallet provisioning/signing)
You can obtain test ETH and USDC from Base Sepolia faucets. The USDC contract address is
0x036CbD53842c5426634e7929541eC2318f3dCF7e.Installation
Install backend dependencies
Navigate to the backend directory and install dependencies:Key Backend Dependencies:
@x402/core,@x402/evm,@x402/express,@x402/fetch- x402 protocol libraries@coinbase/cdp-sdk- Coinbase Developer Platform SDK@google/generative-ai- Gemini AI integration@supabase/supabase-js- Supabase clientethers- Ethereum libraryexpress- Web frameworkpinion-os- Pinion runtime guardrails
Install frontend dependencies
Navigate to the frontend directory and install dependencies:Key Frontend Dependencies:
wagmi&viem- Ethereum React hooks and utilitiesconnectkit- Wallet connection UI@radix-ui/*- UI component primitivesreact-router-dom- Client-side routing@tanstack/react-query- Data fetching and caching
Configure environment variables
Create
.env files for both backend and frontend. See the Environment Variables page for detailed configuration.Set up Supabase database
Run the SQL setup scripts in your Supabase project. See the Supabase Setup page for detailed instructions.
Start the backend server
From the The backend will start on
backend/ directory:http://localhost:3001 by default.Verify the backend is running by visiting
http://localhost:3001/healthDevelopment Commands
Backend Commands
Frontend Commands
Project Structure
Verifying Your Setup
After completing the installation steps, verify everything is working:Access the frontend
Open your browser and navigate to
http://localhost:5173. You should see the Arcana marketplace interface.Troubleshooting
Backend unreachable
- Confirm backend is running on
PORT=3001 - Check that frontend
VITE_API_URLmatches backend URL - Verify
GET /healthendpoint responds
x402 buyer not ready
- Check CDP credentials in backend
.env - Verify RPC/network availability
- Restart backend after env changes
Chat session create/save fails
- Verify
SUPABASE_URLandSUPABASE_ANON_KEYare set - Ensure SQL setup files have been run
- Inspect backend logs for Supabase errors
Build errors
Run build commands to check for TypeScript or compilation errors:Next Steps
- Configure your Environment Variables
- Set up your Supabase Database
- Deploy Smart Contracts to Base Sepolia