pnpm sync:apply # Sync base changes to examples
pnpm create-example # Create new example from a base starter
pnpm check-drift # See what's out of syncYou fixed a bug or updated UI in a base starter (e.g., privy-next-starter).
# 1. Make your changes in base
cd privy-next-starter
# Edit files, test locally
# 2. Sync to all examples
cd ..
pnpm sync:applyAdded new dependencies? Sync them manually:
for dir in examples/privy-next-*; do
(cd "$dir" && pnpm add new-package@version)
doneYou want to showcase a new integration (Wagmi, Solana, etc.).
# 1. Create from base
pnpm create-example myfeature # Interactive: choose base
pnpm create-example myfeature --base=next # Direct: use privy-next-starter
# 2. Customize these files (they're protected):
cd examples/privy-next-myfeature
# - src/app/page.tsx (your UI)
# - src/providers/providers.tsx (your setup)
# - package.json (your dependencies)
# - README.md (your docs)
# 3. Test it
pnpm install && pnpm buildDon't want certain base components in your example?
Edit .sync-manifest.json:
"sectionOverrides": {
"examples/privy-next-myfeature": {
"exclude": ["src/components/sections/wallet-actions.tsx"],
"reason": "Uses custom implementation"
}
}You're making changes specific to one example.
# Just edit it directly
cd examples/privy-next-farcaster
# Make your changes - no sync needed
# Protected files (won't be overwritten):
# - page.tsx, providers.tsx, README.md, package.json| Category | Files | Behavior |
|---|---|---|
| 🟢 Always | components/ui/*, configs, layout.tsx |
Auto-syncs everywhere |
| 🟡 Conditional | components/sections/* |
Syncs unless example excludes it |
| 🔴 Protected | page.tsx, providers.tsx, README.md, package.json |
Never overwritten |
Problem: You want to add something to page.tsx in all examples.
Solution: Extract to a component.
# 1. Create new component in base
code privy-next-starter/src/components/sections/analytics.tsx
# 2. Sync it
pnpm sync --folder=analytics --apply
# 3. Import in each example's page.tsx
code examples/privy-next-wagmi/src/app/page.tsx
# Add: import Analytics from "@/components/sections/analytics"
# Add: <Analytics />check-drift compares files between base starters and examples to find files that have diverged. It shows:
- 🔴 Critical - "always" sync files that differ (should match base)
- 🟡 Warning - "section" files that differ (might be intentional)
- ❌ Missing - Files in base but not in examples
pnpm sync previews what would be copied from base starters to examples (no files are changed). pnpm sync:apply performs the copies.
pnpm sync– dry run; shows planned updates, skips, and up-to-date filespnpm sync:apply– actually writes changes to examples- Scopes: add
--target=<example>and/or--folder=<path-fragment>to limit the sync
# Check what's out of sync
pnpm check-drift
pnpm check-drift --target=wagmi # One example
pnpm check-drift --folder=ui # Specific files
# Preview changes (dry run)
pnpm sync
pnpm sync --target=wagmi # One example
pnpm sync --folder=ui # Specific files
# Apply changes
pnpm sync:apply
pnpm sync --target=wagmi --apply # One example
pnpm sync --folder=ui --apply # Specific filesBuild fails after sync?
# Check if base added new dependencies
cd privy-next-starter && git diff package.json
# Add them to your example
cd ../examples/privy-next-wagmi && pnpm add missing-packageFile won't sync?
- Check if it's in
neverrules in.sync-manifest.json - Check if it's in
sectionOverridesfor that example
Need to reset an example completely?
# ⚠️ This deletes example customizations!
pnpm sync --target=wagmi --folder=page.tsx --force --apply✅ Edit shared components in base → Sync propagates to examples
✅ Edit example-specific code in examples → Won't be overwritten
✅ Always sync dependencies manually → package.json is protected
✅ Extract to components → Don't force-sync protected files
❌ Don't manually copy files → Use sync system
❌ Don't edit base-synced files in examples → Changes will be overwritten
Format: privy-[platform]-[feature]
Examples: privy-next-wagmi, privy-next-farcaster, privy-react-pwa