feat(api): public read API for partners, plus integration guide - #27
Merged
Merged
Conversation
Adds CORS headers to /api/* so partner dashboards can read stream data from the browser. The routes are public, GET-only and take no credentials, so a wildcard origin exposes nothing the chain doesn't. Verified locally: GET returns the headers, preflight returns 204, pages are unchanged. Adds docs/INTEGRATION_GUIDE.md covering the three ways in: using the app, calling the contracts with Stacks.js (register-dao, create-stream, track-stream, management calls, post-conditions, contract rules, error codes), and reading the API. Code examples type-check against @stacks/connect v8 and @stacks/transactions v7. Claude-Session: https://claude.ai/code/session_011DndgWvvL6sUfzTgmC67Wq
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
/api/*. Partner sites can now read stream data from the browser (integration Level 3). Read-only, GET-only, no credentials.docs/INTEGRATION_GUIDE.md. How a team uses StackStream from their own product: the app, contract calls with Stacks.js, and the read API.Verified
npm run build(webpack) passes.next start: GET with anOriginheader returns the CORS headers, OPTIONS preflight returns 204, the home page carries no CORS headers.Note
The bare domain 308-redirects to
wwwat the Vercel domain level, and that redirect carries no CORS headers, so the guide tells integrators to usehttps://www.stackstream.xyz.🤖 Generated with Claude Code
https://claude.ai/code/session_011DndgWvvL6sUfzTgmC67Wq