A modern Next.js application that leverages World ID verification for secure authentication and enables users to connect with each other through a sophisticated friend management system. Built with cutting-edge technologies including Next.js 14, TypeScript, Tailwind CSS, and Aceternity UI.
- Secure Login: Users authenticate using World ID verification system
- Session Management: JWT-like session tokens with secure expiration handling
- Privacy First: No personal data stored, only World ID nullifier hash
- Seamless Integration: IDKit integration for smooth user experience
- Unique User Profiles: Each verified user gets a personalized profile
- Username Customization: Users can set and update their display names
- Profile Analytics: View account creation date and activity status
- Secure Session Handling: Persistent sessions across browser refreshes
- Dual Connection Methods:
- ๐ฑ QR Code Sharing: Generate and scan personal QR codes
- ๐ค Friend Codes: 6-character alphanumeric codes for easy sharing
- Friend Requests: Send, receive, accept, or reject friend requests
- Real-time Updates: Instant friend list updates without page refresh
- Friend Management: View all connected friends with their details
- Aceternity UI: Beautiful, modern interface components
- Aurora Background: Stunning animated background effects
- Responsive Design: Optimized for all device sizes
- Dark Theme: Elegant dark mode design
- Toast Notifications: User-friendly feedback system
- Next.js 14 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first CSS framework
- Aceternity UI - Modern UI component library
- shadcn/ui - High-quality component system
- Framer Motion - Smooth animations and transitions
- Next.js API Routes - Serverless API endpoints
- World ID Integration - Secure identity verification
- Session Management - Custom session handling system
- RESTful Architecture - Clean API design patterns
- IDKit - World ID verification SDK
- QRCode - QR code generation
- Sonner - Toast notification system
- Lucide React - Beautiful icon library
- UUID - Unique identifier generation
Before running this project, make sure you have:
- Node.js (v18 or later)
- npm or yarn package manager
- World ID App ID (for production use)
git clone https://github.com/your-username/worldid-pool.git
cd worldid-poolnpm install
# or
yarn installCreate a .env.local file in the root directory:
# World ID Configuration
NEXT_PUBLIC_WLD_APP_ID=your_world_id_app_id
NEXT_PUBLIC_WLD_ACTION=verify_human
# Development Settings
NODE_ENV=developmentnpm run dev
# or
yarn devNavigate to http://localhost:3000 in your browser.
-
World ID Verification
- User clicks "Verify with World ID" button
- World ID app opens for biometric verification
- Cryptographic proof is generated and verified
- Unique nullifier hash is created for the user
-
Session Creation
- System generates a secure session token
- User profile is created or retrieved
- Session token is stored in browser localStorage
- User is redirected to their profile page
-
Profile Access
- Session token validates user identity
- Profile data is fetched from secure storage
- User gains access to all platform features
-
Profile Generation
- Each user receives a unique 6-character friend code
- Personal QR code is generated containing the friend code
- Both can be shared to connect with others
-
Friend Requests
User A User B โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ Scans QR Code โ โโโโบ โ Receives Request โ โ or Enters Code โ โ in Profile โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ โ โ โผ โ โโโโโโโโโโโโโโโโโโโ โ โ Accept/Reject โ โ โ Decision โ โ โโโโโโโโโโโโโโโโโโโ โ โ โผ โผ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โ Friends List โ โโโโบ โ Friends List โ โ Updated โ โ Updated โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ -
Connection Management
- View all pending friend requests
- Accept or reject requests with one click
- Browse connected friends list
- Real-time status updates
src/
โโโ app/ # Next.js App Router
โ โโโ api/ # API Routes
โ โ โโโ v1/login/ # World ID authentication
โ โ โโโ profile/ # User profile management
โ โ โโโ friends/ # Friend system APIs
โ โโโ profile/ # Profile page
โ โ โโโ page.tsx # Main profile interface
โ โโโ globals.css # Global styles
โ โโโ layout.tsx # Root layout
โ โโโ page.tsx # Landing page
โโโ components/ # React Components
โ โโโ ui/ # UI Components
โ โ โโโ button.tsx # Button component
โ โ โโโ card.tsx # Card component
โ โ โโโ input.tsx # Input component
โ โ โโโ tabs.tsx # Tabs component
โ โ โโโ avatar.tsx # Avatar component
โ โ โโโ badge.tsx # Badge component
โ โ โโโ aurora-background.tsx # Aurora background
โ โโโ world-id-login.tsx # World ID login component
โ โโโ icons.tsx # Icon definitions
โ โโโ aurora-background-demo.tsx # Demo component
โโโ lib/ # Utility Libraries
โ โโโ storage.ts # Global storage management
โ โโโ utils.ts # Helper functions
โโโ types/ # TypeScript Definitions
โโโ index.ts # Type definitions
POST /api/v1/login- World ID verification and session creationGET /api/v1/session/verify- Session validation
GET /api/profile- Fetch user profile dataPUT /api/profile- Update user profile information
GET /api/friends- Get friends list and pending requestsPOST /api/friends- Send friend requestPUT /api/friends- Accept/reject friend request
- Visit the Homepage: Open the application in your browser
- World ID Verification: Click "Verify with World ID" and complete biometric verification
- Profile Creation: Your profile is automatically created upon successful verification
- Explore Features: Navigate through your profile tabs to explore all features
- Share Your Code:
- Go to "QR Code" tab to show your QR code
- Or share your 6-character friend code from "Profile" tab
- Add Friends:
- Go to "Friends" tab
- Enter a friend's code or scan their QR code
- Send friend request
- Manage Requests:
- Check "Friends" tab for incoming requests
- Accept or reject requests as desired
- View your friends list
- Update Username: Change your display name in the "Profile" tab
- View Details: See your World ID, friend code, and account information
- Logout: Securely end your session when done
- World ID Verification: Cryptographic proof of human identity
- Session Management: Secure token-based authentication
- Privacy Protection: No personal data storage
- Request Validation: All API endpoints validate session tokens
- Rate Limiting: Built-in protection against abuse
# Check TypeScript types
npm run type-check
# Lint code
npm run lint
# Build for production
npm run build# Required for World ID
NEXT_PUBLIC_WLD_APP_ID=app_staging_xxx
NEXT_PUBLIC_WLD_ACTION=verify_human
# Optional
NODE_ENV=development- Push your code to GitHub
- Connect repository to Vercel
- Configure environment variables
- Deploy automatically
- Netlify: Static site deployment
- Railway: Full-stack deployment
- Heroku: Container deployment
- Database Integration: Replace in-memory storage with persistent database
- Real World ID Verification: Implement production World ID verification
- Profile Images: Upload and manage profile pictures
- QR Scanner: In-app QR code scanning functionality
- Friend Groups: Organize friends into custom groups
- Activity Feed: See friend activities and updates
- Mobile App: React Native companion app
- Advanced Privacy: Enhanced privacy controls
- Rate Limiting: Implement API rate limiting
- Caching: Add Redis caching layer
- WebSockets: Real-time friend updates
- Push Notifications: Browser push notifications
- Analytics: User behavior analytics
- SEO Optimization: Enhanced search engine optimization
We welcome contributions! Please follow these steps:
- Fork the Repository
- Create Feature Branch:
git checkout -b feature/amazing-feature - Commit Changes:
git commit -m 'Add amazing feature' - Push to Branch:
git push origin feature/amazing-feature - Open Pull Request
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Write clear commit messages
- Add tests for new features
- Update documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- World ID Team - For the amazing identity verification system
- Aceternity UI - For beautiful UI components
- Next.js Team - For the excellent React framework
- Vercel - For seamless deployment platform
- Documentation: Check this README and inline comments
- Discussions: Join GitHub Discussions for questions
- Email: Contact the development team
Built with โค๏ธ for ETH Global Hackathon
Connecting humans in the digital world through verified identity and meaningful relationships.