Version: v0.1
A personal website with x402 payment protocol integration, built with React frontend and Node.js backend.
- 🎨 Modern React frontend with TypeScript and Vite
- 💰 x402 payment protocol integration for USDC payments on Base network
- 🔒 Content unlocking after payment verification
- 🪙 Multi-wallet support (MetaMask, OKX, Binance, Coinbase, etc.) with wallet selector
- 📥 File download system with payment verification
- 🧪 Automated testing (Jest for backend, Vitest for frontend)
- 📦 Full-stack integration
Personalcz/
├── frontend/ # React frontend (TypeScript + Vite)
│ ├── components/ # React components
│ ├── __tests__/ # Frontend tests
│ └── package.json
├── __tests__/ # Backend tests
├── server.js # Express backend server
├── x402-client.js # x402 payment client library
├── package.json # Backend dependencies
└── .env # Environment variables (create this)
# Install backend dependencies
npm install
# Install frontend dependencies
cd frontend
npm install
cd ..Create a .env file in the root directory (see ENV_SETUP.md for details):
PORT=3000
NETWORK=base-mainnet
BASE_RPC_URL=https://mainnet.base.org
RECEIVER_ADDRESS=0xYourWalletAddressHereTerminal 1 - Backend:
npm run devTerminal 2 - Frontend:
npm run dev:frontendVisit http://localhost:5173 in your browser.
# Build frontend
npm run build
# Start server (serves both frontend and backend)
npm startVisit http://localhost:3000 in your browser.
npm testcd frontend
npm test- CONFIGURATION_GUIDE.md - ⭐ Complete configuration guide (files, avatar, deployment)
- WALLET_SELECTOR_GUIDE.md - 🪙 Wallet selector usage guide
- HOW_TO_RUN.md - Detailed setup and running instructions
- ENV_SETUP.md - Environment variable configuration
- TEST_FILE_DOWNLOAD.md - File download testing guide
GET /health- Health checkGET /api/unlock- Check access or return 402 payment requiredPOST /api/unlock- Verify payment and unlock contentGET /api/payment-status- Check payment statusPOST /api/payment-intent- Create payment intentGET /api/download/:materialId- Download file (requires payment verification)
- Frontend: React 19, TypeScript, Vite, Tailwind CSS
- Backend: Node.js, Express
- Payment: x402 protocol, ethers.js, USDC on Base network
- Testing: Jest (backend), Vitest (frontend)
MIT