Skip to content

A comprehensive LazorKit SDK integration example for Web & Mobile—PassPay demonstrates how to build passkey-powered Solana wallets with gasless transactions across both Next.js (Web) and React Native/Expo (Mobile) platforms. Users create wallets using biometric authentication.

Notifications You must be signed in to change notification settings

xavierScript/passpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 

Repository files navigation

🔐 PassPay

Starter Template & SDK Integration Guide for LazorKit (Web + Mobile)

PassPay is a production-ready starter template that shows developers how to integrate LazorKit SDK for passkey-powered Solana wallets with gasless transactions. This repo provides complete working examples for both Next.js (Web) and React Native/Expo (Mobile), designed to be forked and customized for your own projects.

🎯 Goal: Accelerate LazorKit adoption by providing clear, reusable integration patterns across both platforms. Instead of reading docs alone, developers can clone this repo, study working code, and ship faster.


🌐 Live Demo

📚 Blog Post


📸 Screenshots

Web Application

Connect Screen Dashboard

Transfer Screen Staking Screen

Memo Screen Subscription Screen

Mobile Application

Connect Screen Balance Screen Transfer Screen

Staking Screen Memo Screen


✨ Why This Starter Template?

Developer Challenge How This Template Helps
"How do I integrate LazorKit in Next.js?" Full Next.js 15 example with App Router, hooks, and best practices
"What about mobile apps?" Complete Expo implementation showing mobile-specific SDK integration
"I need working code, not just docs" 11 step-by-step tutorials with copy-paste ready code and explanations
"How do I structure a production app?" Feature-based architecture with reusable hooks and services
"Show me real Solana protocol integration" SOL staking example demonstrates complex multi-instruction transactions

🚀 What's Included

Two Complete SDK Integration Examples

Fork-Ready Templates: Each platform is a standalone starter template you can clone and customize

Platform Framework SDK Package Documentation
PassPay Web Next.js 15 + React 19 @lazorkit/wallet v2.0.1 6 Tutorials
PassPay Mobile React Native + Expo @lazorkit/wallet-mobile-adapter 5 Tutorials

LazorKit SDK Integration Patterns Demonstrated

Feature Web Mobile Description
🔐 Passkey Wallet Create wallets with biometrics—no seed phrases
💸 Gasless Transfers Send SOL without paying gas fees
📝 On-Chain Memos Write permanent messages on Solana
🥩 SOL Staking Stake to validators with passkey auth
💳 Subscriptions Netflix-style recurring SOL payments
🔄 Session Persistence Stay logged in across sessions

🔗 Protocol Integration: The SOL Staking feature demonstrates interaction with Solana's native StakeProgram — a production protocol used for securing the network and earning rewards. This shows real-world integration with existing Solana infrastructure.


📚 Tutorials (11 Total)

Each platform has comprehensive, step-by-step tutorials with:

  • Code listings with explanations
  • Architecture diagrams
  • Copy-paste ready examples
  • Testing guidance

Web Tutorials

# Tutorial Description
1 Passkey Wallet Connect wallets with WebAuthn biometrics
2 Gasless Transactions Paymaster-sponsored transfers
3 SOL Staking Multi-instruction staking
4 On-Chain Memos Permanent blockchain messages
5 Subscription Payments Recurring payment flows
6 Session Management Persist sessions with localStorage

Mobile Tutorials

# Tutorial Description
1 Passkey Wallet Connect wallets with FaceID/TouchID
2 Gasless Transactions Paymaster-sponsored transfers
3 SOL Staking Multi-instruction staking
4 On-Chain Memos Permanent blockchain messages
5 Session Management Persist sessions with AsyncStorage

👨‍💻 How to Use This Template

Option 1: Study the Examples

  1. Browse the tutorials to understand integration patterns
  2. Check the architecture docs for code organization
  3. Read inline comments in key files like useTransaction.ts

Option 2: Fork & Customize

  1. Clone this repo: git clone https://github.com/your-username/passpay.git
  2. Pick a platform (web or mobile)
  3. Remove features you don't need
  4. Customize UI and add your own business logic
  5. Ship your passkey-powered Solana app!

Option 3: Copy Specific Patterns

  • Need just passkey auth? Copy the features/wallet module
  • Need gasless transfers? Copy features/transfer + hooks/useTransaction.ts
  • Need session persistence? Copy features/session

All code is MIT licensed—use it freely in your own projects!


🏃 Quick Start

Web (Next.js)

cd passpay-web

# Copy environment variables
cp .env.example .env.local

# Install dependencies
npm install

# Run development server
npm run dev

Open http://localhost:3000

Mobile (Expo)

cd passpay-mobile

# Copy environment variables (optional - has defaults)
cp .env.example .env

# Install dependencies
npm install --legacy-peer-deps

# Start Expo
npx expo start

Scan QR code with Expo Go app


🏗️ Project Structure

passpay/
├── passpay-web/                 # Next.js 15 application
│   ├── app/                     # App Router pages
│   ├── features/                # Feature modules (wallet, transfer, staking, etc.)
│   ├── hooks/                   # Custom React hooks
│   ├── lib/                     # Services, utilities, constants
│   ├── components/              # UI components
│   └── docs/                    # 📚 Web documentation & tutorials
│
├── passpay-mobile/              # React Native/Expo application
│   ├── app/                     # Expo Router screens
│   ├── features/                # Feature modules (wallet, transfer, staking, etc.)
│   ├── hooks/                   # Custom React hooks
│   ├── services/                # Business logic
│   ├── components/              # UI components
│   └── docs/                    # 📚 Mobile documentation & tutorials
│
└── README.md                    # You are here

📖 Documentation

Each platform has comprehensive documentation:

Document Web Mobile
Quick Start View View
Installation View View
Architecture View View
API Reference View View
Troubleshooting View View

🔧 Tech Stack

Web

  • Framework: Next.js 15 (App Router)
  • React: 19 with Server Components
  • Styling: Tailwind CSS + shadcn/ui
  • Wallet: LazorKit SDK (@lazorkit/wallet)
  • Blockchain: Solana Web3.js

Mobile

  • Framework: React Native + Expo SDK 52
  • Navigation: Expo Router
  • Styling: React Native StyleSheet
  • Wallet: LazorKit Mobile Adapter (@lazorkit/wallet-mobile-adapter)
  • Blockchain: Solana Web3.js

🔗 Resources

Resource Link
LazorKit Docs docs.lazorkit.com
LazorKit GitHub github.com/lazor-kit
Solana Web3.js solana-labs.github.io/solana-web3.js
Expo Docs docs.expo.dev
Next.js Docs nextjs.org/docs

� Author

David Onwuka@xavierScript

If you found this helpful, give it a ⭐ on GitHub!


�📝 License

MIT © PassPay


🤝 Contributing & Learning

This is an open learning resource for the Solana community:

  • Found a better pattern? Open a PR!
  • Questions about integration? Open an issue
  • Built something cool with this? Share it on X and tag @xavierScript

Built with ❤️ for the Solana developer community
A starter template to help developers build passwordless, gasless Solana apps

About

A comprehensive LazorKit SDK integration example for Web & Mobile—PassPay demonstrates how to build passkey-powered Solana wallets with gasless transactions across both Next.js (Web) and React Native/Expo (Mobile) platforms. Users create wallets using biometric authentication.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages