Web3
dApp (Privy)
A Web3 dApp starter using Privy for wallet authentication and user management. Includes wagmi for Ethereum interactions, a tRPC API layer for wallet-user sync, and a Drizzle schema designed for wallet-based accounts.
Composition
Apps:
web— Next.js (→ docs) + shadcn/ui (→ module), Next Themes (→ module), TanStack Query (→ module), tRPC (→ module)
Project addons:
- Database: → PostgreSQL
- ORM: → Drizzle
Architecture
Blueprint-specific files:
scripts/
└── seed.ts # Database seed script
src/
├── app/
│ ├── page.tsx # Landing page with connect button
│ └── protected/
│ ├── layout.tsx # Protected layout with cookie check
│ └── page.tsx # Wallet info dashboard
├── components/
│ ├── app-providers.tsx # Privy + wagmi providers
│ └── header.tsx # Header with wallet info
├── lib/
│ ├── db/
│ │ ├── schema.ts # Wallet-specific DB schema
│ │ └── types.ts # DB types
│ └── wagmi.ts # Wagmi config
├── proxy.ts # Middleware with PUBLIC_ROUTES
└── trpc/
├── init.ts # tRPC context with verifyAuthToken
└── routers/
├── _app.ts # Root router
└── user.ts # User router with sync mutationWhat's included
- Privy authentication with embedded wallet support and cookie-based session persistence
- Wagmi integration configured through Privy's wagmi connector for chain interactions
- Protected routes using a
protectedroute group with server-side cookie verification - Wallet-user sync via a tRPC
user.syncmutation that upserts wallet addresses on login - Custom DB schema with wallet address fields instead of traditional email/password columns
- tRPC context using Privy's
verifyAuthTokenfor server-side token validation
Extra dependencies
| Package | Purpose |
|---|---|
@privy-io/react-auth | Privy React SDK for wallet authentication UI |
@privy-io/wagmi | Privy wagmi connector for chain interactions |
@privy-io/server-auth | Server-side token verification |
wagmi | React hooks for Ethereum |
viem | TypeScript Ethereum library |
Environment variables
| Variable | Description |
|---|---|
NEXT_PUBLIC_PRIVY_APP_ID | Privy application ID (from Privy dashboard) |
NEXT_PUBLIC_PRIVY_CLIENT_ID | Privy client ID |
PRIVY_APP_SECRET | Server-side Privy secret for token verification |
CLI usage
bunx create-faster my-dapp \
--blueprint dapp-privy \
--linter biome \
--git \
--pm bunDashboard
A production-ready internal dashboard starter with authentication, a collapsible sidebar, stats overview, and a settings page. Built on Next.js with shadcn/ui components, Better Auth for login, and Recharts for data visualization.
dApp (RainbowKit)
A Web3 dApp starter using RainbowKit for wallet connection and Sign-In with Ethereum (SIWE) for authentication. Combines Better Auth's SIWE plugin with wagmi for a full wallet-based auth flow backed by a persistent database session.

