Skip to content

Feat/sdk docs cli middleware theme audit - #446

Open
DooseWayo wants to merge 5 commits into
ToluLabs:mainfrom
DooseWayo:feat/sdk-docs-cli-middleware-theme-audit
Open

Feat/sdk docs cli middleware theme audit#446
DooseWayo wants to merge 5 commits into
ToluLabs:mainfrom
DooseWayo:feat/sdk-docs-cli-middleware-theme-audit

Conversation

@DooseWayo

Copy link
Copy Markdown

What does this PR do?

Closes #
Closes #399
Closes #400
Closes #401
Closes #402

Type of change

  • Bug fix
  • New feature / credential type
  • Refactor / cleanup
  • Docs
  • CI / tooling

Merge requirements

  • CI is greencargo test (contracts), pnpm tsc --noEmit (frontend), pnpm build (frontend), circuit tests — all green
  • Greptile confidence ≥ 4/5 — all review comments addressed, no unresolved threads
  • Circuit changes: fixtures/<type>/ artifacts updated
  • No NEXT_PUBLIC_ prefix on server-only env vars
  • No identity fields stored or logged after KYC provider call
  • prehash:false preserved on any issuer signing path touched
  • Issuer private key never referenced from client-bundled code

✅ Merge requirements

  • All CI checks pass (contracts / frontend / circuits as applicable)
  • Every Greptile review comment is addressed — no unresolved review threads
  • Greptile confidence score is 4/5 or higher

Notes for reviewers

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).
@drips-wave

drips-wave Bot commented Aug 30, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@Psalmuel01

Copy link
Copy Markdown
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants