A complete Next.js template with Tailwind CSS and Pubky integration for building decentralized applications. Key-based identity, censorship resistance, and user control.
This is a Next.js project bootstrapped with create-next-app.
- 🔐 Pubky Authentication: Secure key-based identity system
- 🌐 Decentralized: Built on Pubky Core for censorship resistance
- 🎨 Modern UI: Beautiful interface with Tailwind CSS
- 📱 Responsive: Works on all devices
- 🔧 TypeScript: Full type safety
- ⚡ Fast: Optimized Next.js performance
- 🛡️ Secure: User-controlled data and privacy
This template uses the following Pubky packages:
- @synonymdev/pubky
^0.5.4- Core Pubky SDK for decentralized identity and data management - pubky-app-specs
^0.3.5- Application specifications and schemas for Pubky apps
- Pubky Ring App - Mobile app for secure key management and authentication
- QR Code Authentication - Scan QR codes to connect your Pubky identity
- Decentralized Storage - Your data is stored on your chosen homeserver
- Key-based Identity - No passwords, just cryptographic keys
- Users authenticate using the Pubky Ring mobile app
- The app generates QR codes for secure connection
- All user data is stored on decentralized homeservers
- Users maintain full control over their identity and data
- Clone the repository
git clone https://github.com/PastaGringo/pubky-nextjs-template.git
cd pubky-nextjs-template- Install dependencies
npm install
# or
yarn install
# or
pnpm install- Set up environment variables
cp .env.example .env.localEdit .env.local and update the values according to your needs:
NEXT_PUBLIC_PUBKY_APP_ID: Your unique application IDNEXT_PUBLIC_PUBKY_APP_NAME: Your application name (displayed in the UI)NEXT_PUBLIC_TESTNET: Set to 'true' for testnet, 'false' for mainnetNEXT_PUBLIC_HTTP_RELAY: HTTP relay endpoint for Pubky communicationNEXT_PUBLIC_HTTP_NEXUS: HTTP nexus endpointNEXT_PUBLIC_PKARR_RELAYS: JSON array of PKARR relay endpointsPUBLIC_DOMAIN: Your domain (localhost:3000 for development)
Run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.



