[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-112466":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":15,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":15,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":10,"pushedAt":42,"updatedAt":43,"readmeContent":44,"aiSummary":45,"trendingCount":15,"starSnapshotCount":15,"syncStatus":46,"lastSyncTime":47,"discoverSource":48},112466,"node2mint","yanstd888\u002Fnode2mint","yanstd888","Self-hosted AI marketplace, token billing engine & OpenAI-compatible Go API gateway with atomic PostgreSQL ledger, escrow commerce, and Stripe\u002FDOKU\u002FQRIS payments.","",null,"TypeScript",64,5,3,0,11,43.43,"MIT License",false,"main",[22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],"affiliate-system","ai-gateway","ai-marketplace","api-gateway","digital-marketplaces","doku","escrow","fullstack","golang","llm-gateway","marketplace","nextjs15","openai-api","openai-compatible","postgresql","qris","redis","self-hosted","stripe","token-billing","2026-11-13 15:30:56","2026-11-21 16:32:28","\u003Cdiv align=\"center\">\n\n  \u003C!-- DYNAMIC TYPING HEADER -->\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fyanstd888\u002Fnode2mint\">\n    \u003Cimg src=\"https:\u002F\u002Freadme-typing-svg.demolab.com?font=JetBrains+Mono&weight=700&size=20&duration=3000&pause=1000&color=10B981&center=true&vCenter=true&width=800&lines=Node2Mint+%E2%80%94+AI+Sell+Modern+%26+API+Token+Engine;Self-Hosted+AI+Marketplace+%C2%B7+OpenAI-Compatible+Go+Gateway;Atomic+PostgreSQL+Ledger+%C2%B7+Escrow+Commerce+%C2%B7+Multi-Channel+Payments\" alt=\"Node2Mint — AI Sell Modern\" \u002F>\n  \u003C\u002Fa>\n\n  \u003Ch1>🪙 Node2Mint — AI Sell Modern\u003C\u002Fh1>\n\n  \u003Cp align=\"center\">\n    \u003Cimg src=\".\u002Fdocs\u002Fimages\u002Flanding-hero.png\" alt=\"Node2Mint - Self-Hosted Digital Marketplace, Token Billing Engine & OpenAI API Gateway\" width=\"100%\" \u002F>\n  \u003C\u002Fp>\n\n  \u003Cp align=\"center\">\n    \u003Cstrong>Self-hosted AI marketplace, token billing engine, and OpenAI-compatible API gateway with atomic ledger balances, provider failover, and affiliate distribution.\u003C\u002Fstrong>\n  \u003C\u002Fp>\n\n  \u003Cp align=\"center\">\n    A production-ready full-stack platform built with \u003Cstrong>Next.js 15, Go 1.22, PostgreSQL 16, Redis 7, and Caddy 2\u003C\u002Fstrong> for selling digital products, token packs, and routing AI model access.\n  \u003C\u002Fp>\n\n  \u003C!-- TECH STACK & LICENSE BADGES -->\n  \u003Cp align=\"center\">\n    \u003Ca href=\"LICENSE\">\u003Cimg alt=\"License MIT\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-2563EB?style=for-the-badge\">\u003C\u002Fa>\n    \u003Cimg alt=\"Go 1.22+\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGo-1.22%2B-00ADD8?style=for-the-badge&logo=go&logoColor=white\">\n    \u003Cimg alt=\"Next.js 15\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FNext.js-15-0D1117?style=for-the-badge&logo=next.js&logoColor=white\">\n    \u003Cimg alt=\"PostgreSQL 16\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPostgreSQL-16-336791?style=for-the-badge&logo=postgresql&logoColor=white\">\n    \u003Cimg alt=\"Redis 7\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FRedis-7-DC382D?style=for-the-badge&logo=redis&logoColor=white\">\n    \u003Cimg alt=\"Docker Compose\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocker-Compose-2496ED?style=for-the-badge&logo=docker&logoColor=white\">\n  \u003C\u002Fp>\n\n  \u003C!-- ECOSYSTEM & PAYMENT BADGES -->\n  \u003Cp align=\"center\">\n    \u003Cimg alt=\"OpenAI Compatible\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FAPI-OpenAI_v1_Compatible-10B981?style=flat-square&logo=openai&logoColor=white\">\n    \u003Cimg alt=\"Payments\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPayments-Stripe_%C2%B7_DOKU_%C2%B7_QRIS_%C2%B7_USDT-8B5CF6?style=flat-square\">\n    \u003Ca href=\"https:\u002F\u002Faiclub.ai.id\u002F\">\u003Cimg alt=\"AICLUB Ecosystem\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FEcosystem-AICLUB.AI.ID-FFD23F?style=flat-square&labelColor=111111\">\u003C\u002Fa>\n    \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Fyanstd888\">\u003Cimg alt=\"Sponsor Yanstd\" src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FSponsor-GitHub_Sponsors-EA4AAA?style=flat-square&logo=githubsponsors&logoColor=white\">\u003C\u002Fa>\n  \u003C\u002Fp>\n\n  \u003C!-- QUICK NAVIGATION -->\n  \u003Cp align=\"center\">\n    \u003Ca href=\"#-why-node2mint\">Why Node2Mint\u003C\u002Fa> ·\n    \u003Ca href=\"#-features--core-modules\">Features\u003C\u002Fa> ·\n    \u003Ca href=\"#-system-architecture\">Architecture\u003C\u002Fa> ·\n    \u003Ca href=\"#-quick-start\">Quick Start\u003C\u002Fa> ·\n    \u003Ca href=\"#-api-reference\">API Reference\u003C\u002Fa> ·\n    \u003Ca href=\"#-configuration\">Configuration\u003C\u002Fa> ·\n    \u003Ca href=\"#-deployment\">Deployment\u003C\u002Fa> ·\n    \u003Ca href=\"#-safety-and-security\">Security\u003C\u002Fa> ·\n    \u003Ca href=\"#-bahasa-indonesia\">Bahasa Indonesia\u003C\u002Fa>\n  \u003C\u002Fp>\n\n\u003C\u002Fdiv>\n\n---\n\n## ⚡ Why Node2Mint?\n\nRunning an AI model reselling service or token marketplace requires strict ledger safety. Distributed billing systems frequently suffer from race conditions, double-spending, and upstream provider outages. **Node2Mint** solves these engineering challenges by combining a high-concurrency **Go 1.22 API gateway** with an **atomic PostgreSQL 16 transaction model**:\n\n* 🔒 **Atomic Money & Token Balances:** All balance debits and credits use row-level database locking (`SELECT FOR UPDATE`) within strict transaction boundaries—eliminating negative-balance race conditions.\n* 🔄 **Automated Provider Failover:** Outbound AI chat completions automatically route through active upstream providers (OpenAI, Anthropic, custom endpoints) with health checks and circuit breaker fallback.\n* 🔑 **Hashed Credentials (Zero Plaintext):** User API keys are stored exclusively as `SHA-256` hashes. Full keys are displayed only once upon creation and never stored in plaintext.\n* 💳 **Multi-Channel Global & Local Payments:** Native support for card\u002Fe-wallet gateways (**Stripe, DOKU**), manual **QRIS \u002F Bank Transfers** with admin verification workflows, and optional **TRC-20 USDT** crypto settlement.\n* 🚀 **Built-In Growth & Affiliate Engine:** Native referral system (bonus token grants for inviters and invitees) and automated affiliate wallet commissions on completed marketplace orders.\n* 🖥️ **50+ Production Web Templates Included:** Complete responsive UI across customer marketplace, seller dashboard, interactive AI playground\u002Fchat, and administrative consoles.\n\n### How Node2Mint Compares (LLM Gateway & Marketplace Matrix)\n\n| Capability | **Node2Mint** | LiteLLM \u002F One-API | OpenRouter (Cloud) |\n| :--- | :---: | :---: | :---: |\n| **OpenAI-Compatible Gateway (`\u002Fv1\u002Fchat\u002Fcompletions`)** | ✅ Yes | ✅ Yes | ✅ Yes |\n| **Upstream Health Checks & Circuit Breaker Failover** | ✅ Yes | ✅ Yes | ✅ Yes |\n| **Row-Locked Atomic Ledger (`SELECT FOR UPDATE`)** | ✅ **Yes** | ⚠️ Varies | ✅ Yes |\n| **Multi-Vendor Digital Marketplace & Escrow Wallet** | ✅ **Yes (Built-in)** | ❌ No | ❌ No |\n| **Affiliate Commission & Referral Quota Engine** | ✅ **Yes (Built-in)** | ❌ No | ❌ No |\n| **Stripe, DOKU, QRIS & TRC-20 USDT Payments** | ✅ **Yes (Native)** | ❌ External Plugin | ❌ Stripe\u002FCrypto Only |\n| **100% Self-Hosted & Full Source Ownership** | ✅ **MIT License** | ✅ Open Source | ❌ Proprietary SaaS |\n\n---\n\n## 🧩 Features & Core Modules\n\n\u003Ctable width=\"100%\">\n  \u003Ctr>\n    \u003Ctd width=\"50%\" valign=\"top\">\n      \u003Ch3>🔀 API Gateway & Token Billing\u003C\u002Fh3>\n      \u003Cul>\n        \u003Cli>\u003Cstrong>OpenAI-Compatible \u003Ccode>\u002Fv1\u002Fchat\u002Fcompletions\u003C\u002Fcode>:\u003C\u002Fstrong> Serves upstream models to client apps, SDKs, Cursor, and Cline using standardized schema headers.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Dynamic Token Metering:\u003C\u002Fstrong> Deducts user balances based on exact model input\u002Foutput rates, including cached prompt discount calculations.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Fixed-Window Rate Limiting:\u003C\u002Fstrong> Per-IP and per-account request throttling enforced via \u003Cstrong>Redis 7\u003C\u002Fstrong>.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Telegram Notification Gateway:\u003C\u002Fstrong> Real-time alerts via Telegram Bot API for order placements, dispute escalations, and group membership verification.\u003C\u002Fli>\n      \u003C\u002Ful>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"50%\" valign=\"top\">\n      \u003Ch3>🛒 Marketplace & Escrow Commerce\u003C\u002Fh3>\n      \u003Cul>\n        \u003Cli>\u003Cstrong>Storefront & Product Catalog:\u003C\u002Fstrong> Sell digital prompts, fine-tuned models, datasets, software tools, and subscription access packs.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Escrow Settlement:\u003C\u002Fstrong> Buyer funds are safely held in platform escrow until manual or automated confirmation releases payout to the seller's store wallet.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Order Cancellation & Refunds:\u003C\u002Fstrong> Safe rollback paths with immutable, atomic transaction log entries for every money movement.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Seller Store Management:\u003C\u002Fstrong> Product publishing, GMV\u002Fsales analytics, dispute handling, and withdrawal requests.\u003C\u002Fli>\n      \u003C\u002Ful>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n  \u003Ctr>\n    \u003Ctd width=\"50%\" valign=\"top\">\n      \u003Ch3>🤝 Affiliate & Referral Program\u003C\u002Fh3>\n      \u003Cul>\n        \u003Cli>\u003Cstrong>Referral Rewards:\u003C\u002Fstrong> Automatic token quota grants for new signups and referral code owners.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Affiliate Commission:\u003C\u002Fstrong> Configurable percentage payouts deposited directly into affiliator wallets upon order settlement.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Anti-Fraud Controls:\u003C\u002Fstrong> IP hashing, Cloudflare Turnstile, and duplicate signup checks protect referral distributions.\u003C\u002Fli>\n      \u003C\u002Ful>\n    \u003C\u002Ftd>\n    \u003Ctd width=\"50%\" valign=\"top\">\n      \u003Ch3>🎨 Frontend & UI\u002FUX (Next.js 15)\u003C\u002Fh3>\n      \u003Cul>\n        \u003Cli>\u003Cstrong>Dual-Mode Shell:\u003C\u002Fstrong> Customer portal with sleek dark-mode aesthetics paired with a high-contrast amber administrative shell.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Multilingual (i18n):\u003C\u002Fstrong> Built-in \u003Cstrong>English (`en`)\u003C\u002Fstrong> and \u003Cstrong>Bahasa Indonesia (`id`)\u003C\u002Fstrong> localization dictionaries.\u003C\u002Fli>\n        \u003Cli>\u003Cstrong>Client-Side Image Optimization:\u003C\u002Fstrong> Browser canvas WebP image compression (\u003Ccode>&lt;256 KB\u003C\u002Fcode>) prior to server upload.\u003C\u002Fli>\n      \u003C\u002Ful>\n    \u003C\u002Ftd>\n  \u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## 🏗️ System Architecture\n\n```text\n                Client (Web \u002F Mobile \u002F CLI \u002F OpenAI SDK)\n                           │\n                           ▼\n                  Caddy 2 Reverse Proxy\n                 (HTTPS \u002F TLS Termination)\n                ┌──────────┴──────────┐\n                ▼                     ▼\n       Next.js 15 Frontend       Go API Gateway\n       (Port 3000 \u002F SSR)        (Port 8080 \u002F REST)\n                                      │\n            ┌─────────────────────────┼─────────────────────────┐\n            ▼                         ▼                         ▼\n      PostgreSQL 16                Redis 7               Upstream AI APIs\n   (Ledger \u002F Orders \u002F Auth)     (Rate Limiting)       (OpenAI \u002F Anthropic \u002F Custom)\n```\n\n### Directory Structure\n\n```text\nnode2mint\u002F\n├── gateway\u002F                  # Go backend gateway (Chi router, pgxpool, redis)\n│   ├── cmd\u002Fgateway\u002F          # Application entrypoint\n│   ├── internal\u002F\n│   │   ├── auth\u002F             # JWT Bearer tokens, password hashing\n│   │   ├── billing\u002F          # Atomic charges, balance validation\n│   │   ├── handler\u002F          # HTTP controllers (admin, market, tokens, chat)\n│   │   ├── provider\u002F         # Upstream AI model client & failover\n│   │   ├── rate\u002F             # Redis-backed fixed-window rate limiter\n│   │   └── store\u002F            # PostgreSQL queries and migrations\n│   ├── sql\u002F                  # Schema definitions and base seed\n│   └── .env.example          # Backend environment template\n├── web\u002F                      # Next.js 15 frontend (Tailwind CSS, shadcn\u002Fui)\n│   ├── app\u002F                  # App router (marketplace, dashboard, admin, auth)\n│   ├── components\u002F           # Reusable UI components & layout shells\n│   ├── lib\u002F                  # API clients, auth context, i18n dictionaries\n│   └── .env.example          # Frontend environment template\n├── deploy\u002F                   # Production deployment configurations\n│   ├── docker-compose.prod.yml\n│   ├── Caddyfile\n│   └── site-allowlist.env.example\n├── docs\u002F                     # Design system and architecture documentation\n├── docker-compose.yml        # Development stack orchestration\n└── smoke-test.sh             # End-to-end billing and order regression check\n```\n\n---\n\n## 🚀 Quick Start\n\n### 1. Prerequisites\n* **Docker Engine** & **Docker Compose v2+**\n* **Go 1.22+** (for local backend development)\n* **Node.js 18+** (for local frontend development)\n\n### 2. Clone the Repository\n```bash\ngit clone [https:\u002F\u002Fgithub.com\u002Fyanstd888\u002Fnode2mint.git](https:\u002F\u002Fgithub.com\u002Fyanstd888\u002Fnode2mint.git)\ncd node2mint\n```\n\n### 3. Configure Environments\n```bash\ncp gateway\u002F.env.example gateway\u002F.env\ncp web\u002F.env.example web\u002F.env.local\ncp -r gateway\u002F.secrets.example gateway\u002F.secrets\n```\n> 💡 *The example templates contain pre-configured dev credentials. For production, generate unique 32+ character secrets (`JWT_SECRET`, `SECRET_KEY`).*\n\n### 4. Run Development Stack\n\nStart backend services (PostgreSQL 16, Redis 7, Go Gateway, Uptime Kuma):\n```bash\ndocker compose up -d --build\n```\n\nVerify all containers are healthy:\n```bash\ndocker compose ps\ncurl http:\u002F\u002Flocalhost:8080\u002Fhealthz   # Returns \"ok\"\n```\n\nStart Next.js 15 frontend (in a separate terminal):\n```bash\ncd web\nnpm install\nnpm run dev\n```\n\nAccess the local services:\n* 🌐 **Web Marketplace & App:** `http:\u002F\u002Flocalhost:3000`\n* ⚡ **API Gateway:** `http:\u002F\u002Flocalhost:8080`\n* 📊 **Uptime Kuma Health Dashboard:** `http:\u002F\u002Flocalhost:3001`\n\n#### Default Seed Accounts (Local Development Only)\nThe local compose setup automatically mounts `gateway\u002Fsql\u002F99-local-dev-seed.sql` with two test accounts:\n\n| Role | Email | Password | Pre-seeded Balance |\n| :--- | :--- | :--- | :--- |\n| **Admin** | `admin@test.local` | `Test1234!` | `50,000 IDR` |\n| **Seller** | `seller@test.local` | `Test1234!` | `10,000 IDR` (Demo Store with 13 products) |\n\n*(Seed accounts are strictly excluded in production deployments).*\n\n### 5. Automated End-to-End Verification\nRun the money and order validation regression smoke test:\n```bash\nbash smoke-test.sh\n```\n\n---\n\n## 🔌 API Reference\n\nThe Go gateway exposes REST endpoints alongside OpenAI-compatible completions:\n\n| Method | Endpoint | Auth | Description |\n| :--- | :--- | :--- | :--- |\n| `POST` | `\u002Fv1\u002Fchat\u002Fcompletions` | Bearer API Key | OpenAI-compatible chat completions with failover |\n| `POST` | `\u002Fapi\u002Fauth\u002Fregister` | Public \u002F Turnstile | User registration with signup token grants |\n| `POST` | `\u002Fapi\u002Fauth\u002Flogin` | Public \u002F Turnstile | User authentication returning JWT token |\n| `GET` | `\u002Fapi\u002Fdashboard` | JWT | User profile, quotas, and wallet balance |\n| `GET` | `\u002Fapi\u002Fkeys` | JWT | List active API keys (prefix only) |\n| `POST` | `\u002Fapi\u002Fkeys` | JWT | Generate new API key (raw secret shown once) |\n| `DELETE` | `\u002Fapi\u002Fkeys\u002F{id}` | JWT | Revoke existing API key |\n| `GET` | `\u002Fapi\u002Fmarket\u002Fproducts` | Public | List published digital goods and access packs |\n| `POST` | `\u002Fapi\u002Fmarket\u002Forders` | JWT | Place marketplace order with atomic balance escrow |\n| `POST` | `\u002Fapi\u002Fmarket\u002Forders\u002F{id}\u002Fconfirm` | JWT | Buyer release of escrow to seller store wallet |\n| `GET` | `\u002Fapi\u002Fpackages` | Public | Available token top-up and signup packages |\n| `POST` | `\u002Fapi\u002Fpayment\u002Fcheckout` | JWT | Create payment invoice (Stripe, DOKU, QRIS) |\n| `GET` | `\u002Fapi\u002Fadmin\u002Fsummary` | Admin | High-level platform GMV and user analytics |\n| `POST` | `\u002Fapi\u002Fadmin\u002Fwithdrawal\u002F{id}\u002Fdecide` | Admin | Approve or reject seller withdrawal with audit log |\n\n---\n\n## ⚙️ Configuration\n\nNeutral configuration templates are provided in `.env.example` files. **Never commit `.env` or `.env.local` files to version control.**\n\n### Gateway (`gateway\u002F.env`)\n| Variable | Description | Default |\n| :--- | :--- | :--- |\n| `DATABASE_URL` | PostgreSQL connection string | `postgresql:\u002F\u002Faiuser:***@localhost:5432\u002Faisell` |\n| `REDIS_ADDR` | Redis host and port | `localhost:6379` |\n| `JWT_SECRET` | 32+ character random string for auth tokens | `CHANGE_ME_RANDOM_SECRET` |\n| `SECRET_KEY` | 32+ character random string for data encryption | `CHANGE_ME_ENCRYPTION_KEY` |\n| `PORT` | HTTP listener port | `8080` |\n| `RATE_LIMIT_DISABLE` | Disable rate limiter (local dev only) | `false` |\n| `STRIPE_SECRET_KEY` | Optional Stripe API secret key | *(empty)* |\n| `DOKU_SANDBOX` | Toggle DOKU payment simulator | `true` |\n| `TELEGRAM_BOT_TOKEN` | Optional bot token for group membership gate | *(empty)* |\n\n### Frontend (`web\u002F.env.local`)\n| Variable | Description | Default |\n| :--- | :--- | :--- |\n| `NEXT_PUBLIC_API_URL` | Gateway API URL | `http:\u002F\u002Flocalhost:8080` |\n| `NEXT_PUBLIC_DEFAULT_LOCALE` | Default language (`id` or `en`) | `id` |\n| `NEXT_PUBLIC_SITE_NAME` | Branding title | `Node2Mint` |\n\n---\n\n## 🚢 Deployment\n\n### Docker Compose (Production)\nFor production environments, mount secrets via Docker secrets or protected environment files:\n\n```bash\ncd deploy\ncp site-allowlist.env.example site-allowlist.env\ndocker compose --env-file site-allowlist.env -f docker-compose.prod.yml up -d\n```\n\n### Cloudflare Tunnel Setup\nTo expose Node2Mint securely without opening public inbound firewall ports:\n```bash\ncloudflared tunnel run --protocol http2 --token YOUR_CLOUDFLARE_TUNNEL_TOKEN\n```\n\n---\n\n## 🛡️ Safety and Security\n\n* **Zero Plaintext Secrets in Repository:** No production keys, database passwords, or operational secrets are stored in Git.\n* **Hashed API Keys:** Gateway API keys are hashed with `SHA-256` before insertion. Only the prefix (e.g., `n2m_live_...`) is queryable by users.\n* **Race Condition Prevention:** Balances, order stock, and withdrawal flows run in isolated transactions with `SELECT ... FOR UPDATE` row locks.\n* **Bot & Abuse Mitigation:** Optional Cloudflare Turnstile verification guards public registration and authentication endpoints.\n* **Structured Audit Logs:** Every administrative balance adjustment, top-up approval, escrow release, and withdrawal records an immutable audit log row with actor ID, IP address, and timestamp.\n\n### Pre-Commit & CI Verification\nRun local checks before staging any pull request:\n\n```bash\n# Go gateway verification\ncd gateway\ngo vet .\u002F...\ngo test .\u002F...\n\n# Frontend type checking and build\ncd ..\u002Fweb\nnpx tsc --noEmit --pretty false\nnpm run build\n\n# Git cleanliness check\ngit diff --check\n```\n\n---\n\n## 🇮🇩 Bahasa Indonesia — Ringkasan Node2Mint\n\n**Node2Mint** adalah platform *full-stack open-source* (**Next.js 15 + Go 1.22 + PostgreSQL 16 + Redis 7**) yang menggabungkan **Marketplace Produk Digital AI**, **Token Billing Engine**, dan **OpenAI-Compatible API Gateway**.\n\nDirancang khusus untuk menjawab kebutuhan ekosistem bisnis digital modern (baik global maupun Indonesia):\n* **Keamanan Saldo Anti-Minus (Atomic Ledger):** Menggunakan *row-level locking* (`SELECT FOR UPDATE`) di PostgreSQL untuk mencegah *race condition* atau *double-spending* saat ribuan request API berjalan bersamaan.\n* **Dukungan Pembayaran Lokal & Global:** Mendukung integrasi **DOKU, QRIS, Transfer Bank Manual**, **Stripe**, hingga **USDT (TRC-20)** serta sistem rekber (*Escrow*) otomatis untuk melindungi pembeli dan penjual di marketplace.\n* **Kompatibel Penuh dengan Ekosistem OpenAI:** Endpoint `\u002Fv1\u002Fchat\u002Fcompletions` dilengkapi *automatic provider failover* dan *circuit breaker*, siap dihubungkan ke aplikasi AI, bot, maupun IDE seperti Cursor dan Cline.\n\n---\n\n## 📚 Documentation & Ecosystem\n\n| Document \u002F Resource | Purpose |\n| :--- | :--- |\n| [**LICENSE**](LICENSE) | MIT Open Source License terms |\n| [**CONTRIBUTING.md**](CONTRIBUTING.md) | Branching guidelines, coding standards, and PR workflows |\n| [**SECURITY.md**](SECURITY.md) | Vulnerability disclosure policy and reporting contacts |\n| [**CODE_OF_CONDUCT.md**](CODE_OF_CONDUCT.md) | Contributor Covenant v2.1 community standards |\n| [**Design System**](docs\u002FDESIGN-SYSTEM.md) | Frontend component specs, color palette, and layout rules |\n| [**AICLUB Indonesia (`aiclub.ai.id`)**](https:\u002F\u002Faiclub.ai.id\u002F) | Official AI tools directory, free `.ai.id` subdomains, and community hub |\n| [**Toko AICLUB (`toko.aiclub.ai.id`)**](https:\u002F\u002Ftoko.aiclub.ai.id) | Live digital product & application marketplace |\n\n## Related open source\n\n- [9RouterX](https:\u002F\u002Fgithub.com\u002Fyanstd888\u002F9routerx) — self-hosted single-binary AI router & LLM gateway by the same team.\n\n---\n\n## 🤝 Contributing & License\n\nContributions, bug reports, and pull requests are welcome! Please ensure changes include a minimal reproducible check or automated unit test where applicable. Read [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\nThis project is licensed under the [MIT License](LICENSE) — Built and maintained by [**Yanstd (@yanstd888)**](https:\u002F\u002Fgithub.com\u002Fyanstd888).\n","Node2Mint 是一个可私有部署的 AI 数字商品交易平台，集成了 OpenAI 兼容 API 网关、基于 PostgreSQL 原子账本的 Token 计费引擎与多方托管（Escrow）交易系统。核心功能包括：模型调用路由与计费、多通道支付（Stripe\u002FDOKU\u002FQRIS\u002FUSDT）、供应商故障自动切换、推广分佣体系及实时余额结算。技术上采用 Go 实现高性能网关层，Next.js 15 构建前端，PostgreSQL 16 保障账务强一致性，Redis 支撑会话与缓存。适用于 SaaS 平台、AI 模型服务商、教育机构或开发者社区等需自主掌控 AI 接入、计费与分发闭环的场景。",2,"2026-11-24 04:43:33","CREATED_QUERY"]