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.
62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
import { api } from "@/lib/api";
|
|
import { formatDate } from "@/lib/format";
|
|
import {
|
|
PageHeader,
|
|
SubNav,
|
|
Card,
|
|
StatGrid,
|
|
StatCard,
|
|
DataTable,
|
|
EmptyState,
|
|
ErrorBanner,
|
|
} from "@/components/ui";
|
|
import { GITHUB_NAV } from "./nav";
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
export default async function GithubPage() {
|
|
const [installs, repos, teams, access] = await Promise.all([
|
|
api.github.installations(),
|
|
api.github.repositories(),
|
|
api.github.teams(),
|
|
api.github.access(),
|
|
]);
|
|
|
|
return (
|
|
<>
|
|
<PageHeader
|
|
title="GitHub Access"
|
|
description="Sell private repos and team membership — SettleKit invites buyers automatically on purchase."
|
|
/>
|
|
<SubNav items={GITHUB_NAV} />
|
|
<ErrorBanner error={installs.error} />
|
|
<StatGrid>
|
|
<StatCard label="Installations" value={String(installs.total)} />
|
|
<StatCard label="Repositories" value={String(repos.total)} />
|
|
<StatCard label="Teams" value={String(teams.total)} />
|
|
<StatCard label="Access grants" value={String(access.total)} tone="good" />
|
|
</StatGrid>
|
|
<Card title="Installations">
|
|
<DataTable
|
|
rows={installs.data}
|
|
getKey={(i) => i.id}
|
|
empty={
|
|
<EmptyState
|
|
title="GitHub App not installed"
|
|
message="Install the SettleKit GitHub App to grant buyers repo and team access."
|
|
/>
|
|
}
|
|
columns={[
|
|
{ header: "Account", cell: (i) => i.account },
|
|
{
|
|
header: "Repository selection",
|
|
cell: (i) => <span className="tag">{i.repositorySelection}</span>,
|
|
},
|
|
{ header: "Installed", cell: (i) => formatDate(i.installedAt) },
|
|
]}
|
|
/>
|
|
</Card>
|
|
</>
|
|
);
|
|
}
|