Skip to content

Add Next.js App Router example #36

@satoshai-dev

Description

@satoshai-dev

Summary

Add a Next.js App Router example app alongside the existing examples/vite-react/ to demonstrate kit usage in the most common React framework setup.

Location

examples/nextjs/

Should cover

  • StacksWalletProvider placement in a root layout (app/layout.tsx) with "use client" wrapper
  • Connect/disconnect flow
  • Display connected address + BNS name
  • Wallet selection UI using useWallets
  • A contract write example (basic, untyped is fine for now — typed example can be added after Typed useWriteContract with ABI inference #35)
  • Minimal styling, focus on clarity not aesthetics

Stack

  • Next.js 15 (App Router)
  • @satoshai/kit via workspace:*
  • @stacks/transactions as peer dep
  • TypeScript

Notes

  • Keep it minimal — this is a reference, not a template
  • Should work with pnpm dev from the example directory
  • Add to pnpm-workspace.yaml under examples/* (already covered by glob)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions