If you don't have MetaMask installed:
- Visit https://metamask.io/download/
- Install the browser extension
- Create or import a wallet
cp env.sample .env.local
# Edit .env.local and set:
VITE_WEB3_FUNCTION_ID=your-web3-function-id
VITE_APPWRITE_PROJECT_ID=your-project-idnpm install
npm run devNavigate to http://localhost:5173
ββββββββββββββββββββββββββββββββββββββββ
β [BLURRED BACKGROUND] β
β β
β ββββββββββββββββββββββββββββββββββ β
β β π Welcome to Tenchat β β
β β β β
β β π§ Enter your email β β
β β ββββββββββββββββββββββββββ β β
β β β you@example.com β β β
β β ββββββββββββββββββββββββββ β β
β β β β
β β [π Connect Wallet] β β
β ββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββ
β Click "Connect Wallet"
ββββββββββββββββββββββββββββββββββββββββ
β π¦ MetaMask Popup β
β Connect with MetaMask? β
β [Cancel] [Connect] β
ββββββββββββββββββββββββββββββββββββββββ
β Click "Connect"
ββββββββββββββββββββββββββββββββββββββββ
β π¦ MetaMask Popup β
β Signature Request β
β Sign to authenticate β
β [Cancel] [Sign] β
ββββββββββββββββββββββββββββββββββββββββ
β Click "Sign"
ββββββββββββββββββββββββββββββββββββββββ
β β
Success! β
β Welcome to Tenchat β
ββββββββββββββββββββββββββββββββββββββββ
Once authenticated, you'll see:
βββββββββββββββββββββββ
β π€ 0x742d...16B2 β β Your wallet address
β β
Connected β
β β
β π° Portfolio β
β $1,247.89 β
β π +12.5% β
β β
β [Send] [Gift] β
β β
β βββββββββββββββββ β
β β
β Conversations β
β β’ Alice β
β β’ Bob β
β β’ Charlie β
βββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββββββββ
β Tenchat π [Settings] [βοΈ] β
ββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββ
β π€ Settings & Profile β
β β
β [Account] [Wallet] [Notifications] β
β β
β WALLET TAB: β
β 0x742d35Cc6634C0532925a3b8D4C2468... β
β [π Copy] [π View on Etherscan] β
β β
β ACCOUNT TAB: β
β Display Name: User 742d35 β
β Email: user@example.com β οΈ Unverifiedβ
β [Logout] β
βββββββββββββββββββββββββββββββββββββββββ
Primary: 0x742d35Cc6634C0532925a3b8D4C2468bB3Ff16B2
Secondary: user@example.com (recovery only)
Password: β None! (wallet signature instead)
- You enter your email
- Connect your MetaMask wallet
- Sign a message to prove ownership
- Backend verifies your signature
- Session created - you're in!
- β Your wallet is your identity
- β Sign messages to authenticate
- β Email only for recovery
- β True Web3 authentication
1. Enter email
2. Click "Connect Wallet"
3. Approve in MetaMask (2 popups)
4. Done!
1. Click Settings (βοΈ)
2. Go to "Wallet" tab
3. See your full address
4. Click π to copy
1. Click Settings (βοΈ)
2. Go to "Account" tab
3. Click "Logout"
4. Auth modal appears again
1. Click on a conversation
2. Type your message
3. Press Enter or click Send
1. Open a conversation
2. Click Gift button
3. Select token & amount
4. Confirm in MetaMask
5. Gift sent!
Problem: "MetaMask not installed" error
Solution:
1. Install MetaMask browser extension
2. Reload the page
3. Try again
Problem: "You cancelled the signature request"
Solution:
1. Click "Connect Wallet" again
2. Approve both MetaMask popups
3. Don't click "Cancel"
Problem: "Authentication failed" error
Solution:
1. Check console for errors
2. Verify Web3 function is deployed
3. Check VITE_WEB3_FUNCTION_ID is set
4. Try again
Problem: Logged out unexpectedly
Solution:
1. Normal behavior after some time
2. Just reconnect your wallet
3. Sign the message again
- Always verify the message you're signing
- Keep your MetaMask locked when not in use
- Use a hardware wallet for extra security
- Never share your private keys
- Don't sign messages you don't understand
- Don't connect to suspicious websites
- Don't use the same wallet for everything
- Don't approve unlimited token allowances
1. Install MetaMask mobile app
2. Open Tenchat in MetaMask browser
3. Follow normal auth flow
1. Install MetaMask mobile app
2. Open Tenchat in MetaMask browser
3. Follow normal auth flow
WEB3_AUTH_COMPLETION.md- Technical detailsUX_FLOW_DOCUMENTATION.md- Visual flowsWEB3_INTEGRATION_SUMMARY.md- Complete overviewUSAGE_REACT.md- Original specification
- MetaMask Docs: https://docs.metamask.io/
- Appwrite Docs: https://appwrite.io/docs
- Ethereum Docs: https://ethereum.org/developers
Once you're authenticated:
- β Explore the interface
- β Check your Settings
- β Copy your wallet address
- β Start chatting!
- β Send your first crypto gift
Ready? Start with npm run dev and open http://localhost:5173 π