apps: - api: Hono REST server, all §26 endpoints, 14 tests - worker: delivery runner + payment-confirm + access-sync + renewal + webhook-retry jobs wired to real package clients - dashboard: Next.js merchant dashboard, full §16/§27 sections + §28 product builder - checkout: Next.js hosted USDC checkout with real delivery materialization - marketplace: Next.js public marketplace + agent metadata.json route - admin: Next.js risk/ops console wired to @settlekit/risk + database - docs: Next.js docs site (9 static routes) - examples: 5 runnable end-to-end examples fix(x402): support pinned config.nonce so a stateless verifier can confirm the challenge nonce round-trips (default stays random; package tests intact). Full workspace: 590 tests passing (122 files), tsc green for all packages + api/worker/examples, all 5 Next apps typecheck clean, docs next build green.
1.7 KiB
1.7 KiB
SettleKit Merchant Dashboard
A Next.js 14 (App Router) dashboard for managing SettleKit commerce: products, access delivery, billing, and integrations (GitHub, Discord, SaaS, agent services, escrow).
Architecture
app/— App Router pages. Server components fetch data via the API client; client components ("use client") handle interactive forms.lib/api.ts— typed HTTP client for the SettleKit API. ReadsNEXT_PUBLIC_API_URL(defaulthttp://localhost:8787). All reads degrade to empty arrays / nulls so pages render graceful empty states when the API is unavailable.lib/format.ts— money (USDC 6-decimals, fiat 2-decimals), date, and number formatting.lib/types.ts— typed response shapes mirroring the@settlekit/*domain.lib/nav.ts— sidebar navigation (plan §16 sections).components/— shared UI primitives, theSidebar, theProductBuilder(plan §28 three-step flow), and the generic create form.
Sections
Dashboard, Analytics, Products (+ Product Builder), Bundles, Payments, Customers, Subscriptions, Entitlements, License Keys, API Keys, Files, Delivery (runs/logs), GitHub (install/repositories/teams/access), Discord (servers/roles/access), SaaS (plans/features/seats/entitlements), Agent Services, Escrow, Webhooks, Payouts, Settings.
Develop
pnpm install
NEXT_PUBLIC_API_URL=http://localhost:8787 pnpm --filter @settlekit/dashboard dev
# http://localhost:3001
Environment
| Variable | Default | Purpose |
|---|---|---|
NEXT_PUBLIC_API_URL |
http://localhost:8787 |
Base URL of the SettleKit API |