A Next.js application that integrates with Human Passport and Human Wallet to verify human identity and provide a seamless Web3 authentication experience.
This application allows users to:
- Connect with Human Wallet (Human.tech's wallet solution)
- Verify their humanity through Human Passport scores
- Access human-verified features and services
- Switch between different Ethereum networks
- Human Passport Integration: Verify human identity using Human Passport scores
- Human Wallet Support: Seamless integration with Human.tech's Human Wallet SDK
- Multi-chain Support: Connect to different Ethereum networks
- Responsive Design: Mobile-first design with beautiful animations
- Real-time Updates: Live passport score updates and verification status
- Social Authentication: Support for Google, Twitter, Discord, and GitHub login methods
- Framework: Next.js 15 with App Router
- Frontend: React 19, TypeScript, Tailwind CSS
- Animations: Framer Motion
- State Management: Zustand
- Data Fetching: TanStack Query
- Web3: Wagmi, Viem, Ethers.js
- Wallet Integration: Human Wallet SDK
- Identity Verification: Human Passport
- Node.js 18+
- pnpm (recommended) or npm/yarn
- A Human Passport API key and scorer ID from Passport Dashboard
- A WalletConnect project ID from Reown Cloud
-
Clone the repository
git clone <repository-url> cd passport
-
Install dependencies
pnpm install # or npm install # or yarn install
-
Set up environment variables
Copy the example environment file and fill in your values:
cp .env.example .env.local
Required environment variables:
NEXT_PUBLIC_API_KEY
: Your Human Passport API key (get from Passport Dashboard)NEXT_PUBLIC_SCORER_ID
: Your Human Passport scorer ID (get from Passport Dashboard)NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
: Your WalletConnect project ID (get from Reown Cloud)
-
Run the development server
pnpm dev # or npm run dev # or yarn dev
-
Open your browser
Navigate to http://localhost:3000 to see the application.
Variable | Description | Required |
---|---|---|
NEXT_PUBLIC_API_KEY |
Human Passport API key for score verification | Yes |
NEXT_PUBLIC_SCORER_ID |
Human Passport scorer ID for your application | Yes |
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID |
WalletConnect project ID for wallet connections | Yes |
The application can be configured through src/config/index.ts
:
- Passport Score Threshold: Minimum score required for verification (default: 25)
- Human Wallet Environment: Toggle between staging and production Human Wallet environments
- Allowed Socials: Configure which social login methods are available
- Authentication Methods: Configure available authentication options
src/
├── app/ # Next.js app router pages
├── components/ # Reusable React components
├── config/ # Application configuration
├── hooks/ # Custom React hooks
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── wagmi.ts # Wagmi configuration
- PassportScoreWidget: Human Passport integration for identity verification
- HumanWalletStore: Zustand store managing Human Wallet connections
- ChainSwitcher: Component for switching between Ethereum networks
- Header: Application navigation and user interface
pnpm dev
- Start development server with Turbopackpnpm build
- Build the application for productionpnpm start
- Start production serverpnpm lint
- Run ESLint for code quality
This project uses:
- ESLint for code linting with Prettier integration
- TypeScript for type safety
- Tailwind CSS for styling
- Turbopack for fast development builds
The application integrates with Human Passport to verify user humanity scores:
- Endpoint:
https://api.passport.xyz/v2/stamps/{scorerId}/score/{address}
- Authentication: X-API-KEY header
- Threshold: Configurable minimum score for verification
- Get API Key: Passport Dashboard
Uses Human.tech's Human Wallet SDK for:
- User authentication
- Wallet connections
- Message signing
- Chain switching
- Documentation: Human Wallet Docs
The application can be deployed on any platform that supports Next.js:
- Connect your repository to Vercel
- Add environment variables in the Vercel dashboard
- Deploy automatically on git push
- Follow standard Next.js deployment procedures
- Ensure environment variables are properly configured
- Run
pnpm build
to generate production build
- Fork the repository
- Create a feature branch
- Make your changes
- Run linting and type checks
- Submit a pull request
For support and questions:
- Visit Human.tech
- Check the Human Passport Documentation for comprehensive guides and tutorials
- Review the Human Wallet Documentation
- Access the Passport Dashboard for API keys and scorer management