Skip to content

feat: add Next.js 16 App Router example (#36)#55

Merged
satoshai-dev merged 3 commits intomainfrom
feat/nextjs-example
Mar 5, 2026
Merged

feat: add Next.js 16 App Router example (#36)#55
satoshai-dev merged 3 commits intomainfrom
feat/nextjs-example

Conversation

@satoshai-dev
Copy link
Copy Markdown
Owner

Summary

Adds a Next.js 16 App Router example at examples/nextjs/ demonstrating:

  • StacksWalletProvider in a "use client" wrapper component (providers.tsx)
  • Server layout importing client providers (layout.tsx)
  • Connect/disconnect with wallet selection via useWallets
  • BNS name resolution
  • STX transfers via useTransferSTX
  • Contract calls via useWriteContract

Minimal styling, focused on clarity as a reference implementation.

Closes #36

Test plan

  • pnpm build succeeds (Next.js 16.1.6 with Turbopack)
  • All 144 kit tests pass
  • Lint and typecheck pass

🤖 Generated with Claude Code

satoshai-dev and others added 3 commits March 5, 2026 16:25
Demonstrates @satoshai/kit with Next.js 16 App Router:
- StacksWalletProvider in a "use client" wrapper (providers.tsx)
- Server layout importing client providers
- Connect/disconnect, wallet selection, BNS, transfer STX, write contract

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add mounted guard for wallet list (extensions only detected client-side)
- Add all demos: TransferSTX, SignStructuredMessage, SignTransaction, WriteContract
- Remove deprecated anchorMode from makeUnsignedSTXTokenTransfer
- Match vite-react example feature coverage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add SignMessageDemo component with text input
- Use createContractConfig + typed ABI for WriteContractDemo (matching vite-react)
- Pass address prop to WriteContractDemo for typed args

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@satoshai-dev satoshai-dev merged commit 8449f2e into main Mar 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Next.js App Router example

1 participant