Feat/sdk docs cli middleware theme audit - #446
Conversation
Stop committing generated docs/api HTML and instead build it in CI on every push (sdk-docs job) and deploy it to GitHub Pages on main (sdk-docs-deploy job), so integrators get an always-current, browsable API reference instead of reading source. Linked from the SDK README and the /developers page.
New @stellarcred/middleware package (packages/middleware) with: - stellarCredGate for Express (@stellarcred/middleware/express) - createStellarCredMiddleware + withStellarCredGate for Next.js (@stellarcred/middleware/next), covering both middleware.ts and App Router route handlers Both adapters share one framework-agnostic core that reuses the SDK's batched hasClaims read, per-read timeouts, and fail-soft error taxonomy, and support configurable failure behavior (403 JSON vs a redirect to buildVerifyUrl). Wallet resolution is left to the caller (getWallet) since the gate performs a read-only claim check, not authentication. Wired into CI (middleware job).
…gister/status) New `stellarcred` package (packages/cli) exposing: - `check <wallet> <claim>` — on-chain claim check via @stellarcred/sdk (getClaim/hasClaim), exit code reflects verified/not-verified/error - `issuers` — lists IssuerRegistry entries via read-only simulation - `verify-url` — wraps buildVerifyUrl - `issuer status <id>` — pubkey/metadata/validity via read-only simulation - `issuer register` — admin-only, shells out to the `stellar` CLI's own configured signing identity (matching scripts/deploy.sh); this tool never reads, generates, or stores a secret key itself Reuses the SDK for every read; all config is env-var driven (STELLARCRED_* / NEXT_PUBLIC_* fallback), matching the SDK's own convention. Packaged so `npx stellarcred` works. Wired into CI (cli job: typecheck, tests, build, smoke test).
|
@DooseWayo Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
This adds a lot of genuinely useful work (a CLI package, Express/Next middleware, brand assets, theming) and closes several issues. Two blockers though. First, it commits generated typedoc HTML (the whole frontend/packages/sdk/docs/api tree of .html and asset files) into the repo. Generated docs should not be committed - the API reference should be built in CI and published (that is what #402 asks for), not checked in. Please remove the docs/api output and gitignore it, and wire the typedoc build into CI instead. Second, at +7031/-3503 across 4 issues this is very hard to review as one unit. Please split it: the CLI (#401), the middleware (#400), the theming/brand (#399), and the API-docs CI (#402) are independent and would each merge quickly on their own. Happy to review them as separate PRs. |
What does this PR do?
Closes #
Closes #399
Closes #400
Closes #401
Closes #402
Type of change
Merge requirements
cargo test(contracts),pnpm tsc --noEmit(frontend),pnpm build(frontend), circuit tests — all greenfixtures/<type>/artifacts updatedNEXT_PUBLIC_prefix on server-only env varsprehash:falsepreserved on any issuer signing path touched✅ Merge requirements
Notes for reviewers