x402ApiHub is a comprehensive API hub using x402 protocol ,coinbase as the facilitator and base Blockchain
x402ApiHub is an early-stage TypeScript project in the AI payments / x402 ecosystem. It currently has 2 GitHub stars and 0 forks.
x402ApiHub is a comprehensive API hub designed for blockchain base operations. It provides a robust backend service built with Node.js and TypeScript, offering RESTful APIs for managing courses, categories, and other blockchain-related data. The project is structured to host both backend and frontend components, ensuring a full-stack solution for decentralized applications on the Base blockchain network.
This project serves as the central hub for API interactions, enabling seamless integration between frontend applications, backend services, and blockchain operations. It is engineered for scalability, security, and maintainability, following industry best practices for modern web development.
The project follows a modular architecture separating concerns between backend and frontend components:
graph TD
A[Client Applications] --> B[Frontend Layer]
B --> C[Backend API Layer]
C --> D[(Database)]
C --> E[Blockchain Base Network]
F[Admin Interfaces] --> B
G[External APIs] --> C
subgraph "Backend Services"
C
H[Authentication Service]
I[Data Validation Service]
J[Blockchain Integration Service]
end
subgraph "Data Flow"
K[API Requests] --> C
C --> L[Response Processing]
L --> M[Client Response]
end
Clone the repository
git clone https://github.com/your-repo/x402ApiHub.git
cd x402ApiHub
Install backend dependencies
cd backend
pnpm install
Environment configuration
.env.example to .envDatabase setup
Build and run
pnpm run build
pnpm start
The backend provides the following primary API endpoints:
GET /api/courses - Retrieve all coursesPOST /api/courses - Create a new courseGET /api/categories - Retrieve all categoriesPOST /api/categories - Create a new categoryFor development with hot reloading:
cd backend
pnpm run dev
cd backend
pnpm test
x402ApiHub/
├── backend/
│ ├── src/
│ │ ├── config/
│ │ ├── models/
│ │ ├── routes/
│ │ └── scripts/
│ ├── package.json
│ ├── tsconfig.json
│ └── README.md
├── frontend/ (planned)
├── .gitignore
├── README.md
└── commit-all.ps1
The application uses environment variables for configuration. Key variables include:
DATABASE_URL: Database connection stringBLOCKCHAIN_RPC_URL: Base blockchain RPC endpointPORT: Server port (default: 3000)JWT_SECRET: JWT signing secretWe welcome contributions to x402ApiHub. Please follow these steps:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)The project includes comprehensive testing:
Run the full test suite:
cd backend
pnpm run test:coverage
Docker configuration will be added for containerized deployment.
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
backend/README.mdThe agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
A payments protocol for the internet. Built on HTTP.
A local-first AI agent with persistent memory, emotional intelligence, and a peer-to-peer skills economy.
The trust layer for agent-to-agent commerce — natural-language mandates, ERC-7710 delegated permissions, x402 payments, escrow, and dispute resolution as one open, catch-all Agent Skill / Claude Code plugin.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.