Add chat-x402 template#803
Open
phquand2000 wants to merge 3 commits into
Open
Conversation
New template combining next-chat's AI chat UI with x402 payment protocol support. Users can authenticate via Echo credentials (automatic billing) or connect a Web3 wallet for per-request USDC payments through the x402 flow.
The .env.local file contained a real Echo App ID and should never be committed. Added .env*.local pattern to .gitignore.
- Fix architecture tree in README (remove duplicate src/ prefix) - Update stale model references (gpt-5-nano → gpt-5) - Remove nonexistent Dockerfile from deployment section - Simplify auth-modal auto-close to match sora pattern - Remove TODO comment from route handler - Update metadata description
Contributor
|
@phquand2000 is attempting to deploy a commit to the Merit Systems Team on Vercel. A member of the Team first needs to authorize it. |
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.
Closes #610
Adds a new
chat-x402template that combines the next-chat UI with wallet-based payments via the x402 protocol.Users can authenticate with Echo credentials (automatic billing) or connect a Web3 wallet and pay per request in USDC through the x402 flow.
What's included
/api/chat— returns 402 with payment requirements for wallet userscreatePaymentHeader(adapted from sora-template).env.examplewith WalletConnect and x402 config varsTemplate structure
Based on
next-chatwith additions fromsora-template:createPaymentHeader.tsadapted from sora-template (.tsx → .ts)Test plan
npx echo-start@latest --template chat-x402scaffolds correctly