[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77HTNZ4ZT452SMYP3PMGK23":3,"skill-same:01M77HTNZ4ZT452SMYP3PMGK23":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":50,"commitSha":51,"skillDirectory":52,"forksCount":53,"repositoryHtmlUrl":54,"repositoryHomepageUrl":55,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":57,"updatedAt":58,"install":59,"resources":72},"01M77HTNZ4ZT452SMYP3PMGK23","greenhelix-x402-merchant-starter-kit",null,"x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront. Comprehensive x402 paywall + MCP server + product catalog guide. Deploy in 15 minutes. Includes Express.js storefront, SQLite catalog, Gumroad\u002FPolar dual-rail checkout, Schema.org JSON-LD, llms.txt agent discovery, CI\u002FCD pipeline, and nginx config. The same stack powering claw.greenhelix.net.","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fg\u002Fgreenhelix-x402-merchant-starter-kit\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: greenhelix-x402-merchant-starter-kit\nversion: \"1.3.1\"\ndescription: \"x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront. Comprehensive x402 paywall + MCP server + product catalog guide. Deploy in 15 minutes. Includes Express.js storefront, SQLite catalog, Gumroad\u002FPolar dual-rail checkout, Schema.org JSON-LD, llms.txt agent discovery, CI\u002FCD pipeline, and nginx config. The same stack powering claw.greenhelix.net.\"\nlicense: MIT\ncompatibility: [openclaw]\nauthor: felix-agent\ntype: guide\ntags: [x402, starter-kit, storefront, mcp, payments, code, deploy, greenhelix, guide, openclaw, ai-agent]\nprice_usd: 99.0\ncontent_type: markdown\nexecutable: false\ninstall: none\ncredentials: [GITHUB_TOKEN, WALLET_ADDRESS, DASHBOARD_SECRET]\nmetadata:\n  openclaw:\n    requires:\n      env:\n        - GITHUB_TOKEN\n        - WALLET_ADDRESS\n        - DASHBOARD_SECRET\n    primaryEnv: GITHUB_TOKEN\n---\n# x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront\n\n> **Notice**: This is an educational guide with illustrative code examples.\n> It does not execute code or install dependencies.\n> All examples use the GreenHelix sandbox (https:\u002F\u002Fsandbox.greenhelix.net) which\n> provides 500 free credits — no API key required to get started.\n>\n> **Referenced credentials** (you supply these in your own environment):\n> - `GITHUB_TOKEN`: GitHub Personal Access Token for private repo content delivery (read-only, scoped to a single repository)\n> - `WALLET_ADDRESS`: Blockchain wallet address for receiving payments (public address only — no private keys)\n> - `DASHBOARD_SECRET`: Admin dashboard authentication secret (local admin panel access only)\n\n\nThis starter kit gives you a production-ready x402 storefront — the same architecture powering [claw.greenhelix.net](https:\u002F\u002Fclaw.greenhelix.net). Deploy in 15 minutes. Sell digital products to both humans (HTML storefront + Gumroad\u002FPolar checkout) and AI agents (MCP server + x402 paywall + machine-readable catalog).\n> **Getting started**: All examples in this guide work with the GreenHelix sandbox\n> (https:\u002F\u002Fsandbox.greenhelix.net) which provides 500 free credits — no API key required.\n\n## What You'll Learn\n- What You Get\n- Architecture Overview\n- Quick Start (15 Minutes)\n- Project Structure\n- Configuration Reference\n- Adding Products\n- Payment Flows\n- Agent Discovery Layer\n- MCP Server\n- Deployment\n\n## Full Guide\n\n# x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront\n\nThis starter kit gives you a production-ready x402 storefront — the same architecture powering [claw.greenhelix.net](https:\u002F\u002Fclaw.greenhelix.net). Deploy in 15 minutes. Sell digital products to both humans (HTML storefront + Gumroad\u002FPolar checkout) and AI agents (MCP server + x402 paywall + machine-readable catalog).\n\n---\n\n\n> **Getting started**: All examples in this guide work with the GreenHelix sandbox\n> (https:\u002F\u002Fsandbox.greenhelix.net) which provides 500 free credits — no API key required.\n\n## Table of Contents\n\n1. [What You Get](#what-you-get)\n2. [Architecture Overview](#architecture-overview)\n3. [Quick Start (15 Minutes)](#quick-start-15-minutes)\n4. [Project Structure](#project-structure)\n5. [Configuration Reference](#configuration-reference)\n6. [Adding Products](#adding-products)\n7. [Payment Flows](#payment-flows)\n8. [Agent Discovery Layer](#agent-discovery-layer)\n9. [MCP Server](#mcp-server)\n10. [Deployment](#deployment)\n11. [Security Hardening](#security-hardening)\n12. [Customization Guide](#customization-guide)\n\n---\n\n## What You Get\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| Express.js app | `src\u002Fapp.js` | Routes, x402 paywall, rate limiting |\n| SQLite catalog | `src\u002Fdb.js` | Product storage, transactions, revenue stats |\n| HTML storefront | `src\u002Fstorefront.js` | Product listing, detail pages, JSON-LD SEO |\n| Product enrichment | `src\u002Fcatalog.js` | Merge DB rows with CATALOG.json metadata |\n| MCP server | `src\u002Fmcp-server.js` | AI agent interface (list, get, buy) |\n| Auth middleware | `src\u002Fauth.js` | Bearer token admin auth |\n| GitHub content delivery | `src\u002Fgithub.js` | Fetch paid content from private repos |\n| Sitemap generator | `src\u002Fsitemap.js` | SEO sitemap.xml |\n| Agent discovery | Routes in app.js | `\u002Fllms.txt`, `\u002Fproducts.json`, `\u002F.well-known\u002Fagent.json` |\n| CI\u002FCD pipeline | `deploy.sh` | One-command deployment via SSH |\n| nginx config | Generated by deploy.sh | Reverse proxy with security headers |\n| Test suite | `tests\u002F` | 183 tests covering all routes and rendering |\n\n---\n\n## Architecture Overview\n\n```\n                    ┌─────────────────────────────────────────┐\n                    │              nginx (443\u002F80)              │\n                    │  TLS termination, security headers,     │\n                    │  Cloudflare real-IP trust                │\n                    └────────────────┬────────────────────────┘\n                                     │ proxy_pass :3000\n                    ┌────────────────▼────────────────────────┐\n                    │           Express.js (port 3000)         │\n                    │                                          │\n                    │  \u002Fproducts          → HTML storefront    │\n                    │  \u002Fproducts\u002F:slug    → x402 paywall       │\n                    │  \u002Fproducts.json     → machine catalog    │\n                    │  \u002Fllms.txt          → AI discovery       │\n                    │  \u002F.well-known\u002Fagent.json → agent manifest│\n                    │  \u002Frobots.txt        → crawlers + Llms-txt│\n                    │  \u002Fsitemap.xml       → SEO                │\n                    │  \u002Fhealth            → uptime check       │\n                    │  \u002F  (admin)         → dashboard          │\n                    │  \u002Fmetrics (admin)   → revenue JSON       │\n                    │  POST \u002Fproducts     → admin product CRUD │\n                    └──────┬─────────────────────┬────────────┘\n                           │                     │\n                    ┌──────▼──────┐       ┌──────▼──────┐\n                    │   SQLite    │       │   GitHub    │\n                    │  (catalog,  │       │  (content   │\n                    │   revenue)  │       │   delivery) │\n                    └─────────────┘       └─────────────┘\n\n     MCP Server (stdio, separate process)\n     ┌─────────────────────────────────────────┐\n     │  list_products  → browse catalog        │\n     │  get_product    → single product detail  │\n     │  buy_product    → purchase instructions  │\n     │  Uses db.js + catalog.js directly        │\n     └─────────────────────────────────────────┘\n```\n\n---\n\n## Quick Start (15 Minutes)\n\n### Prerequisites\n\n- Node.js >= 22\n- A Base wallet address (for receiving USDC payments)\n- A GitHub personal access token (for content delivery from a private repo)\n\n### Step 1: Clone and configure\n\n```bash\ngit clone \u003Cyour-repo>\ncd your-storefront\ncp .env.example .env\n```\n\nEdit `.env`:\n```env\nDASHBOARD_SECRET=your-strong-random-secret-here\nAGENT_WALLET_ADDRESS=0xYourBaseWalletAddress\nGITHUB_TOKEN=ghp_your_github_pat\nGITHUB_REPO=your-org\u002Fyour-content-repo\nNETWORK=base-sepolia          # or base-mainnet for production\n```\n\n### Step 2: Install and run\n\n```bash\nnpm install\nnode src\u002Findex.js\n```\n\nYour storefront is live at `http:\u002F\u002Flocalhost:3000`.\n\n### Step 3: Add your first product\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:3000\u002Fproducts \\\n  -H \"Authorization: Bearer your-strong-random-secret-here\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"path\": \"\u002Fproducts\u002Fmy-first-guide\",\n    \"price_usd\": 9.99,\n    \"description\": \"My first digital product\",\n    \"github_slug\": \"my-first-guide\"\n  }'\n```\n\n### Step 4: Test the x402 flow\n\n```bash\n# Get payment requirements\ncurl http:\u002F\u002Flocalhost:3000\u002Fproducts\u002Fmy-first-guide\n# Returns 402 with payment requirements JSON\n\n# Check the machine-readable catalog\ncurl http:\u002F\u002Flocalhost:3000\u002Fproducts.json | jq .total\n\n# Check agent discovery\ncurl http:\u002F\u002Flocalhost:3000\u002Fllms.txt\n```\n\n---\n\n## Project Structure\n\n```\nyour-storefront\u002F\n├── src\u002F\n│   ├── index.js          # Server entry point (starts Express on port 3000)\n│   ├── app.js            # Routes, middleware, x402 paywall logic\n│   ├── db.js             # SQLite schema, product CRUD, revenue tracking\n│   ├── auth.js           # Bearer token authentication middleware\n│   ├── github.js         # Fetch content from GitHub with LRU cache\n│   ├── storefront.js     # HTML rendering (listing, detail, admin, JSON-LD)\n│   ├── catalog.js        # Enrich DB rows with CATALOG.json metadata\n│   ├── sitemap.js        # Generate sitemap.xml\n│   └── mcp-server.js     # MCP server (stdio transport)\n├── tests\u002F                # Jest test suite (183 tests)\n├── deploy.sh             # One-command SSH deployment\n├── .env.example          # Environment variable template\n├── package.json          # Dependencies + bin entry for MCP server\n├── server.json           # Official MCP Registry metadata\n└── smithery.yaml         # Smithery registry metadata\n```\n\n---\n\n## Configuration Reference\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `DASHBOARD_SECRET` | Yes | — | Admin auth token (must be strong) |\n| `AGENT_WALLET_ADDRESS` | Yes (for paid) | — | Base wallet for receiving USDC |\n| `GITHUB_TOKEN` | Yes | — | PAT for fetching content from GitHub |\n| `GITHUB_REPO` | Yes | — | `owner\u002Frepo` containing product .md files |\n| `NETWORK` | No | `base-sepolia` | `base-sepolia` or `base-mainnet` |\n| `X402_FACILITATOR_URL` | No | `https:\u002F\u002Fx402.org\u002Ffacilitator` | x402 facilitator endpoint |\n| `SQLITE_PATH` | No | `.\u002Fdashboard.db` | Path to SQLite database |\n| `PORT` | No | `3000` | Server listen port |\n\n---\n\n## Adding Products\n\n### Via API (recommended for automation)\n\n```bash\ncurl -X POST https:\u002F\u002Fyour-store.com\u002Fproducts \\\n  -H \"Authorization: Bearer $DASHBOARD_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"path\": \"\u002Fproducts\u002Fmy-product\",\n    \"price_usd\": 29.00,\n    \"description\": \"A great digital product\",\n    \"github_slug\": \"my-product\",\n    \"gumroad_url\": \"https:\u002F\u002Fyou.gumroad.com\u002Fl\u002Fmy-product\"\n  }'\n```\n\n### Via seed script (bulk)\n\nCreate `*.meta.json` files in `seed-products\u002F` and run the seeder:\n```bash\nbash seed-dashboard-incremental.sh http:\u002F\u002Flocalhost:3000\n```\n\n### Free products\n\nSet `price_usd: 0`. Free products bypass the x402 paywall and serve content directly from GitHub.\n\n---\n\n## Payment Flows\n\n### x402 Flow (Agent Buyers)\n\n1. Agent sends `GET \u002Fproducts\u002Fmy-product`\n2. Server returns `402` with payment requirements:\n   ```json\n   {\n     \"x402Version\": 1,\n     \"accepts\": [{\n       \"scheme\": \"exact\",\n       \"network\": \"eip155:84532\",\n       \"maxAmountRequired\": \"2900000\",\n       \"payTo\": \"0xYourWallet\",\n       \"asset\": \"0x036CbD53842c5426634e7929541eC2318f3dCF7e\"\n     }]\n   }\n   ```\n3. Agent constructs payment and sends `GET \u002Fproducts\u002Fmy-product` with `x-payment` header\n4. Server verifies payment via facilitator\n5. Server fetches content from GitHub and delivers it\n6. Server settles payment and logs transaction\n\n### Fiat Flow (Human Buyers)\n\n- Products with a `gumroad_url` show a \"Buy with Card\" button on the HTML storefront\n- Buyers click through to Gumroad\u002FPolar for card\u002FPayPal checkout\n- Content is delivered via the third-party platform\n\n---\n\n## Agent Discovery Layer\n\nYour storefront is automatically discoverable by AI agents through four endpoints:\n\n| Endpoint | Format | Purpose |\n|----------|--------|---------|\n| `\u002Fproducts.json` | JSON | Machine-readable product catalog |\n| `\u002Fllms.txt` | Plain text | LLM-friendly store description |\n| `\u002F.well-known\u002Fagent.json` | JSON | Agent capability manifest |\n| `\u002Frobots.txt` | Plain text | Includes `Llms-txt:` directive |\n\nPlus Schema.org JSON-LD markup in all HTML pages for search engine rich results.\n\n---\n\n## MCP Server\n\nThe MCP server exposes your catalog to AI agents via the Model Context Protocol.\n\n### Running standalone\n\n```bash\nnode src\u002Fmcp-server.js\n```\n\n### Tools\n\n| Tool | Parameters | Description |\n|------|-----------|-------------|\n| `list_products` | `tag?` (string) | Browse catalog, optional tag filter |\n| `get_product` | `slug` (string) | Get single product details |\n| `buy_product` | `slug` (string) | Get purchase URL + x402 instructions |\n\n### Claude Desktop config\n\n```json\n{\n  \"mcpServers\": {\n    \"your-store\": {\n      \"command\": \"node\",\n      \"args\": [\"\u002Fpath\u002Fto\u002Fsrc\u002Fmcp-server.js\"],\n      \"env\": {\n        \"SQLITE_PATH\": \"\u002Fpath\u002Fto\u002Fdashboard.db\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Deployment\n\n### One-command deploy\n\n```bash\nSSH_KEY=~\u002F.ssh\u002Fyour_key bash deploy.sh user@your-server\n```\n\nThis will:\n1. Upload all source files via SCP\n2. Run `npm install --omit=dev`\n3. Configure systemd service\n4. Set up nginx reverse proxy with security headers\n5. Enable HTTPS (auto-detects existing SSL certs)\n\n### CI\u002FCD\n\nThe included GitHub Actions workflow (`deploy.yml`) runs tests and deploys on every push to main.\n\n---\n\n## Security Hardening\n\nThe starter kit includes security measures from a production audit:\n\n- **F-01**: Rate limiting on admin routes (30 req\u002F15 min)\n- **F-02**: Bearer token authentication on admin endpoints\n- **F-06**: Startup guard — refuses to start with weak\u002Fdefault secrets\n- **F-07**: JSON body size limit (10KB)\n- **F-08**: Async error handler catches unhandled promise rejections\n- **F-09**: Settlement response logging for payment audit trail\n- **nginx**: X-Frame-Options, X-Content-Type-Options, CSP, HSTS, Permissions-Policy\n\n---\n\n## Customization Guide\n\n### Changing the payment network\n\nEdit `.env`:\n```env\nNETWORK=base-mainnet  # switches to mainnet USDC\n```\n\n### Adding a new discovery endpoint\n\nAdd a route in `src\u002Fapp.js` following the pattern of `\u002Fproducts.json`:\n```javascript\napp.get('\u002Fyour-endpoint', (_req, res) => {\n  const products = db.getAllProducts();\n  const enriched = enrichAll(products);\n  res.setHeader('Cache-Control', 'public, max-age=300');\n  res.json({ \u002F* your data *\u002F });\n});\n```\n\n### Custom HTML themes\n\nEdit `src\u002Fstorefront.js`. The CSS is inline in template literals — replace the `\u003Cstyle>` blocks with your brand colors.\n\n### Multiple storefronts\n\nRun multiple instances with different `SQLITE_PATH` and `PORT` values behind the same nginx.\n\n---\n\n## What's Next\n\n- **Polar.sh integration**: Run `python3 create-polar-products.py` to bulk-create products on Polar.sh\n- **MCP registry**: Register your server on [mcp.so](https:\u002F\u002Fmcp.so), [smithery.ai](https:\u002F\u002Fsmithery.ai), and the [official MCP registry](https:\u002F\u002Fregistry.modelcontextprotocol.io)\n- **Bundle products**: Create bundle meta.json files with an `includes` array\n- **Analytics**: Check `\u002Fmetrics` (admin) for revenue, costs, and P&L\n\n---\n\n*Built with the [x402 protocol](https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402). Payments in USDC on Base.*\n\n","# x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront\n\n> **Notice**: This is an educational guide with illustrative code examples.\n> It does not execute code or install dependencies.\n> All examples use the GreenHelix sandbox (https:\u002F\u002Fsandbox.greenhelix.net) which\n> provides 500 free credits — no API key required to get started.\n>\n> **Referenced credentials** (you supply these in your own environment):\n> - `GITHUB_TOKEN`: GitHub Personal Access Token for private repo content delivery (read-only, scoped to a single repository)\n> - `WALLET_ADDRESS`: Blockchain wallet address for receiving payments (public address only — no private keys)\n> - `DASHBOARD_SECRET`: Admin dashboard authentication secret (local admin panel access only)\n\n\nThis starter kit gives you a production-ready x402 storefront — the same architecture powering [claw.greenhelix.net](https:\u002F\u002Fclaw.greenhelix.net). Deploy in 15 minutes. Sell digital products to both humans (HTML storefront + Gumroad\u002FPolar checkout) and AI agents (MCP server + x402 paywall + machine-readable catalog).\n> **Getting started**: All examples in this guide work with the GreenHelix sandbox\n> (https:\u002F\u002Fsandbox.greenhelix.net) which provides 500 free credits — no API key required.\n\n## What You'll Learn\n- What You Get\n- Architecture Overview\n- Quick Start (15 Minutes)\n- Project Structure\n- Configuration Reference\n- Adding Products\n- Payment Flows\n- Agent Discovery Layer\n- MCP Server\n- Deployment\n\n## Full Guide\n\n# x402 Merchant Starter Kit: Deploy Your Own Crypto-Native Storefront\n\nThis starter kit gives you a production-ready x402 storefront — the same architecture powering [claw.greenhelix.net](https:\u002F\u002Fclaw.greenhelix.net). Deploy in 15 minutes. Sell digital products to both humans (HTML storefront + Gumroad\u002FPolar checkout) and AI agents (MCP server + x402 paywall + machine-readable catalog).\n\n---\n\n\n> **Getting started**: All examples in this guide work with the GreenHelix sandbox\n> (https:\u002F\u002Fsandbox.greenhelix.net) which provides 500 free credits — no API key required.\n\n## Table of Contents\n\n1. [What You Get](#what-you-get)\n2. [Architecture Overview](#architecture-overview)\n3. [Quick Start (15 Minutes)](#quick-start-15-minutes)\n4. [Project Structure](#project-structure)\n5. [Configuration Reference](#configuration-reference)\n6. [Adding Products](#adding-products)\n7. [Payment Flows](#payment-flows)\n8. [Agent Discovery Layer](#agent-discovery-layer)\n9. [MCP Server](#mcp-server)\n10. [Deployment](#deployment)\n11. [Security Hardening](#security-hardening)\n12. [Customization Guide](#customization-guide)\n\n---\n\n## What You Get\n\n| Component | File | Purpose |\n|-----------|------|---------|\n| Express.js app | `src\u002Fapp.js` | Routes, x402 paywall, rate limiting |\n| SQLite catalog | `src\u002Fdb.js` | Product storage, transactions, revenue stats |\n| HTML storefront | `src\u002Fstorefront.js` | Product listing, detail pages, JSON-LD SEO |\n| Product enrichment | `src\u002Fcatalog.js` | Merge DB rows with CATALOG.json metadata |\n| MCP server | `src\u002Fmcp-server.js` | AI agent interface (list, get, buy) |\n| Auth middleware | `src\u002Fauth.js` | Bearer token admin auth |\n| GitHub content delivery | `src\u002Fgithub.js` | Fetch paid content from private repos |\n| Sitemap generator | `src\u002Fsitemap.js` | SEO sitemap.xml |\n| Agent discovery | Routes in app.js | `\u002Fllms.txt`, `\u002Fproducts.json`, `\u002F.well-known\u002Fagent.json` |\n| CI\u002FCD pipeline | `deploy.sh` | One-command deployment via SSH |\n| nginx config | Generated by deploy.sh | Reverse proxy with security headers |\n| Test suite | `tests\u002F` | 183 tests covering all routes and rendering |\n\n---\n\n## Architecture Overview\n\n```\n                    ┌─────────────────────────────────────────┐\n                    │              nginx (443\u002F80)              │\n                    │  TLS termination, security headers,     │\n                    │  Cloudflare real-IP trust                │\n                    └────────────────┬────────────────────────┘\n                                     │ proxy_pass :3000\n                    ┌────────────────▼────────────────────────┐\n                    │           Express.js (port 3000)         │\n                    │                                          │\n                    │  \u002Fproducts          → HTML storefront    │\n                    │  \u002Fproducts\u002F:slug    → x402 paywall       │\n                    │  \u002Fproducts.json     → machine catalog    │\n                    │  \u002Fllms.txt          → AI discovery       │\n                    │  \u002F.well-known\u002Fagent.json → agent manifest│\n                    │  \u002Frobots.txt        → crawlers + Llms-txt│\n                    │  \u002Fsitemap.xml       → SEO                │\n                    │  \u002Fhealth            → uptime check       │\n                    │  \u002F  (admin)         → dashboard          │\n                    │  \u002Fmetrics (admin)   → revenue JSON       │\n                    │  POST \u002Fproducts     → admin product CRUD │\n                    └──────┬─────────────────────┬────────────┘\n                           │                     │\n                    ┌──────▼──────┐       ┌──────▼──────┐\n                    │   SQLite    │       │   GitHub    │\n                    │  (catalog,  │       │  (content   │\n                    │   revenue)  │       │   delivery) │\n                    └─────────────┘       └─────────────┘\n\n     MCP Server (stdio, separate process)\n     ┌─────────────────────────────────────────┐\n     │  list_products  → browse catalog        │\n     │  get_product    → single product detail  │\n     │  buy_product    → purchase instructions  │\n     │  Uses db.js + catalog.js directly        │\n     └─────────────────────────────────────────┘\n```\n\n---\n\n## Quick Start (15 Minutes)\n\n### Prerequisites\n\n- Node.js >= 22\n- A Base wallet address (for receiving USDC payments)\n- A GitHub personal access token (for content delivery from a private repo)\n\n### Step 1: Clone and configure\n\n```bash\ngit clone \u003Cyour-repo>\ncd your-storefront\ncp .env.example .env\n```\n\nEdit `.env`:\n```env\nDASHBOARD_SECRET=your-strong-random-secret-here\nAGENT_WALLET_ADDRESS=0xYourBaseWalletAddress\nGITHUB_TOKEN=ghp_your_github_pat\nGITHUB_REPO=your-org\u002Fyour-content-repo\nNETWORK=base-sepolia          # or base-mainnet for production\n```\n\n### Step 2: Install and run\n\n```bash\nnpm install\nnode src\u002Findex.js\n```\n\nYour storefront is live at `http:\u002F\u002Flocalhost:3000`.\n\n### Step 3: Add your first product\n\n```bash\ncurl -X POST http:\u002F\u002Flocalhost:3000\u002Fproducts \\\n  -H \"Authorization: Bearer your-strong-random-secret-here\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"path\": \"\u002Fproducts\u002Fmy-first-guide\",\n    \"price_usd\": 9.99,\n    \"description\": \"My first digital product\",\n    \"github_slug\": \"my-first-guide\"\n  }'\n```\n\n### Step 4: Test the x402 flow\n\n```bash\n# Get payment requirements\ncurl http:\u002F\u002Flocalhost:3000\u002Fproducts\u002Fmy-first-guide\n# Returns 402 with payment requirements JSON\n\n# Check the machine-readable catalog\ncurl http:\u002F\u002Flocalhost:3000\u002Fproducts.json | jq .total\n\n# Check agent discovery\ncurl http:\u002F\u002Flocalhost:3000\u002Fllms.txt\n```\n\n---\n\n## Project Structure\n\n```\nyour-storefront\u002F\n├── src\u002F\n│   ├── index.js          # Server entry point (starts Express on port 3000)\n│   ├── app.js            # Routes, middleware, x402 paywall logic\n│   ├── db.js             # SQLite schema, product CRUD, revenue tracking\n│   ├── auth.js           # Bearer token authentication middleware\n│   ├── github.js         # Fetch content from GitHub with LRU cache\n│   ├── storefront.js     # HTML rendering (listing, detail, admin, JSON-LD)\n│   ├── catalog.js        # Enrich DB rows with CATALOG.json metadata\n│   ├── sitemap.js        # Generate sitemap.xml\n│   └── mcp-server.js     # MCP server (stdio transport)\n├── tests\u002F                # Jest test suite (183 tests)\n├── deploy.sh             # One-command SSH deployment\n├── .env.example          # Environment variable template\n├── package.json          # Dependencies + bin entry for MCP server\n├── server.json           # Official MCP Registry metadata\n└── smithery.yaml         # Smithery registry metadata\n```\n\n---\n\n## Configuration Reference\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `DASHBOARD_SECRET` | Yes | — | Admin auth token (must be strong) |\n| `AGENT_WALLET_ADDRESS` | Yes (for paid) | — | Base wallet for receiving USDC |\n| `GITHUB_TOKEN` | Yes | — | PAT for fetching content from GitHub |\n| `GITHUB_REPO` | Yes | — | `owner\u002Frepo` containing product .md files |\n| `NETWORK` | No | `base-sepolia` | `base-sepolia` or `base-mainnet` |\n| `X402_FACILITATOR_URL` | No | `https:\u002F\u002Fx402.org\u002Ffacilitator` | x402 facilitator endpoint |\n| `SQLITE_PATH` | No | `.\u002Fdashboard.db` | Path to SQLite database |\n| `PORT` | No | `3000` | Server listen port |\n\n---\n\n## Adding Products\n\n### Via API (recommended for automation)\n\n```bash\ncurl -X POST https:\u002F\u002Fyour-store.com\u002Fproducts \\\n  -H \"Authorization: Bearer $DASHBOARD_SECRET\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"path\": \"\u002Fproducts\u002Fmy-product\",\n    \"price_usd\": 29.00,\n    \"description\": \"A great digital product\",\n    \"github_slug\": \"my-product\",\n    \"gumroad_url\": \"https:\u002F\u002Fyou.gumroad.com\u002Fl\u002Fmy-product\"\n  }'\n```\n\n### Via seed script (bulk)\n\nCreate `*.meta.json` files in `seed-products\u002F` and run the seeder:\n```bash\nbash seed-dashboard-incremental.sh http:\u002F\u002Flocalhost:3000\n```\n\n### Free products\n\nSet `price_usd: 0`. Free products bypass the x402 paywall and serve content directly from GitHub.\n\n---\n\n## Payment Flows\n\n### x402 Flow (Agent Buyers)\n\n1. Agent sends `GET \u002Fproducts\u002Fmy-product`\n2. Server returns `402` with payment requirements:\n   ```json\n   {\n     \"x402Version\": 1,\n     \"accepts\": [{\n       \"scheme\": \"exact\",\n       \"network\": \"eip155:84532\",\n       \"maxAmountRequired\": \"2900000\",\n       \"payTo\": \"0xYourWallet\",\n       \"asset\": \"0x036CbD53842c5426634e7929541eC2318f3dCF7e\"\n     }]\n   }\n   ```\n3. Agent constructs payment and sends `GET \u002Fproducts\u002Fmy-product` with `x-payment` header\n4. Server verifies payment via facilitator\n5. Server fetches content from GitHub and delivers it\n6. Server settles payment and logs transaction\n\n### Fiat Flow (Human Buyers)\n\n- Products with a `gumroad_url` show a \"Buy with Card\" button on the HTML storefront\n- Buyers click through to Gumroad\u002FPolar for card\u002FPayPal checkout\n- Content is delivered via the third-party platform\n\n---\n\n## Agent Discovery Layer\n\nYour storefront is automatically discoverable by AI agents through four endpoints:\n\n| Endpoint | Format | Purpose |\n|----------|--------|---------|\n| `\u002Fproducts.json` | JSON | Machine-readable product catalog |\n| `\u002Fllms.txt` | Plain text | LLM-friendly store description |\n| `\u002F.well-known\u002Fagent.json` | JSON | Agent capability manifest |\n| `\u002Frobots.txt` | Plain text | Includes `Llms-txt:` directive |\n\nPlus Schema.org JSON-LD markup in all HTML pages for search engine rich results.\n\n---\n\n## MCP Server\n\nThe MCP server exposes your catalog to AI agents via the Model Context Protocol.\n\n### Running standalone\n\n```bash\nnode src\u002Fmcp-server.js\n```\n\n### Tools\n\n| Tool | Parameters | Description |\n|------|-----------|-------------|\n| `list_products` | `tag?` (string) | Browse catalog, optional tag filter |\n| `get_product` | `slug` (string) | Get single product details |\n| `buy_product` | `slug` (string) | Get purchase URL + x402 instructions |\n\n### Claude Desktop config\n\n```json\n{\n  \"mcpServers\": {\n    \"your-store\": {\n      \"command\": \"node\",\n      \"args\": [\"\u002Fpath\u002Fto\u002Fsrc\u002Fmcp-server.js\"],\n      \"env\": {\n        \"SQLITE_PATH\": \"\u002Fpath\u002Fto\u002Fdashboard.db\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Deployment\n\n### One-command deploy\n\n```bash\nSSH_KEY=~\u002F.ssh\u002Fyour_key bash deploy.sh user@your-server\n```\n\nThis will:\n1. Upload all source files via SCP\n2. Run `npm install --omit=dev`\n3. Configure systemd service\n4. Set up nginx reverse proxy with security headers\n5. Enable HTTPS (auto-detects existing SSL certs)\n\n### CI\u002FCD\n\nThe included GitHub Actions workflow (`deploy.yml`) runs tests and deploys on every push to main.\n\n---\n\n## Security Hardening\n\nThe starter kit includes security measures from a production audit:\n\n- **F-01**: Rate limiting on admin routes (30 req\u002F15 min)\n- **F-02**: Bearer token authentication on admin endpoints\n- **F-06**: Startup guard — refuses to start with weak\u002Fdefault secrets\n- **F-07**: JSON body size limit (10KB)\n- **F-08**: Async error handler catches unhandled promise rejections\n- **F-09**: Settlement response logging for payment audit trail\n- **nginx**: X-Frame-Options, X-Content-Type-Options, CSP, HSTS, Permissions-Policy\n\n---\n\n## Customization Guide\n\n### Changing the payment network\n\nEdit `.env`:\n```env\nNETWORK=base-mainnet  # switches to mainnet USDC\n```\n\n### Adding a new discovery endpoint\n\nAdd a route in `src\u002Fapp.js` following the pattern of `\u002Fproducts.json`:\n```javascript\napp.get('\u002Fyour-endpoint', (_req, res) => {\n  const products = db.getAllProducts();\n  const enriched = enrichAll(products);\n  res.setHeader('Cache-Control', 'public, max-age=300');\n  res.json({ \u002F* your data *\u002F });\n});\n```\n\n### Custom HTML themes\n\nEdit `src\u002Fstorefront.js`. The CSS is inline in template literals — replace the `\u003Cstyle>` blocks with your brand colors.\n\n### Multiple storefronts\n\nRun multiple instances with different `SQLITE_PATH` and `PORT` values behind the same nginx.\n\n---\n\n## What's Next\n\n- **Polar.sh integration**: Run `python3 create-polar-products.py` to bulk-create products on Polar.sh\n- **MCP registry**: Register your server on [mcp.so](https:\u002F\u002Fmcp.so), [smithery.ai](https:\u002F\u002Fsmithery.ai), and the [official MCP registry](https:\u002F\u002Fregistry.modelcontextprotocol.io)\n- **Bundle products**: Create bundle meta.json files with an `includes` array\n- **Analytics**: Check `\u002Fmetrics` (admin) for revenue, costs, and P&L\n\n---\n\n*Built with the [x402 protocol](https:\u002F\u002Fgithub.com\u002Fcoinbase\u002Fx402). Payments in USDC on Base.*\n\n",{"name":5,"tags":24,"type":33,"author":36,"install":37,"license":15,"version":38,"metadata":39,"price_usd":46,"executable":20,"credentials":47,"description":7,"content_type":48,"compatibility":49},[25,26,27,28,29,30,31,32,33,34,35],"x402","starter-kit","storefront","mcp","payments","code","deploy","greenhelix","guide","openclaw","ai-agent","felix-agent","none","1.3.1",{"openclaw":40},{"requires":41,"primaryEnv":43},{"env":42},[43,44,45],"GITHUB_TOKEN","WALLET_ADDRESS","DASHBOARD_SECRET",99,[43,44,45],"markdown",[34],"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fg\u002Fgreenhelix-x402-merchant-starter-kit",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":71},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill greenhelix-x402-merchant-starter-kit",{"tool":65,"command":66},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill greenhelix-x402-merchant-starter-kit",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill greenhelix-x402-merchant-starter-kit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fg\u002Fgreenhelix-x402-merchant-starter-kit\u002FSKILL.md",true,[],[74,81,88,95,102,109],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]