A beautiful, fast, and secure tipping application for creatives built on Hedera Hashgraph. Send HBAR tips instantly with minimal fees using MetaMask wallet integration.
- π Lightning Fast: 3-5 second transaction finality
- π° Ultra Low Fees: ~$0.0001 per transaction
- π Secure: Built on Hedera's secure hashgraph consensus
- π± Eco-Friendly: Carbon negative network
- π± Responsive: Beautiful UI that works on all devices
- π MetaMask Integration: Easy wallet connection via JSON-RPC Relay
- π Real-time Analytics: Live transaction tracking and statistics
- π― User-Friendly: Simple 3-step tipping process
- Frontend: React 18 + TypeScript + Vite
- Styling: Tailwind CSS + shadcn/ui components
- Blockchain: Hedera SDK + JSON-RPC Relay
- Wallet: MetaMask integration
- API: Hedera Mirror Node REST API
- State Management: React Query + React Hooks
- Node.js 18+ and npm
- MetaMask browser extension
- Git
- Clone the repository
git clone <YOUR_GIT_URL>
cd hedera-tipjar- Install dependencies
npm install- Set up environment
cp .env.example .env- Start development server
npm run dev- Open your browser
Navigate to
http://localhost:8080
- Connect Wallet: Click "Connect MetaMask" and approve the connection
- Enter Details: Add recipient's Hedera account ID (format: 0.0.123456) and tip amount
- Send Tip: Click "Send Tip" and confirm the transaction in MetaMask
- Share your Hedera account ID with supporters
- Receive tips instantly with notifications
- View transaction history in real-time
Create a .env file based on .env.example:
# Network configuration (testnet/mainnet)
VITE_HEDERA_NETWORK=testnet
# Optional: Custom endpoints
VITE_TESTNET_MIRROR_URL=https://testnet.mirrornode.hedera.com
VITE_MAINNET_MIRROR_URL=https://mainnet-public.mirrornode.hedera.comTo switch from testnet to mainnet:
- Update
VITE_HEDERA_NETWORK=mainnetin.env - Update the network configuration in
src/lib/hedera.ts - Restart the development server
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
# Code Quality
npm run lint # Run ESLint
npm run type-check # Run TypeScript checks
# Testing
npm test # Run unit tests
npm run test:watch # Run tests in watch modesrc/
βββ components/ # Reusable UI components
β βββ ui/ # shadcn/ui components
β βββ WalletConnect.tsx
β βββ TipForm.tsx
β βββ TransactionHistory.tsx
β βββ Analytics.tsx
βββ hooks/ # Custom React hooks
β βββ useWallet.ts
β βββ use-toast.ts
βββ lib/ # Utility libraries
β βββ hedera.ts # Hedera SDK integration
β βββ api.ts # Mirror Node API
β βββ utils.ts
βββ pages/ # Main application pages
β βββ Landing.tsx
β βββ TipApp.tsx
β βββ NotFound.tsx
βββ App.tsx # Main application component
- Connect repository
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prod- Set environment variables in Vercel dashboard:
VITE_HEDERA_NETWORK=mainnet(for production)
- Build command:
npm run build - Publish directory:
dist - Environment variables:
VITE_HEDERA_NETWORK=mainnet
# Build the project
npm run build
# Serve the dist folder with any static file server
npx serve dist# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run specific test file
npm test -- WalletConnect.test.tsx- Testnet Testing: Use testnet HBAR from Hedera Portal faucet
- MetaMask Setup: Add Hedera testnet to MetaMask
- Transaction Verification: Check transactions on HashScan
- β Client-side wallet integration only
- β No private keys stored in application
- β All transactions signed by user's wallet
- β Input validation and sanitization
- β Secure communication with Hedera network
The app includes built-in analytics:
- Total Tips: All-time tip count
- Total HBAR: Total value tipped
- Unique Tippers: Number of different accounts
- Recent Activity: Last 24 hours statistics
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature - Make your changes
- Add tests if applicable
- Commit:
git commit -m 'Add new feature' - Push:
git push origin feature/new-feature - Submit a pull request
import { executeTransferWithWallet } from '@/lib/hedera'
// Send a tip
const result = await executeTransferWithWallet(
fromAccountId,
toAccountId,
amount,
window.ethereum
)import { fetchRecentTransactions } from '@/lib/api'
// Get recent transactions
const transactions = await fetchRecentTransactions(accountId)MetaMask not connecting
- Ensure MetaMask is installed and unlocked
- Check that you're on the correct network
- Clear browser cache and try again
Transaction failing
- Verify account ID format (0.0.123456)
- Ensure sufficient HBAR balance
- Check network connectivity
Mirror Node errors
- Verify network configuration
- Check if Mirror Node is accessible
- Try refreshing the page
Enable debug logging by setting:
localStorage.setItem('debug', 'hedera-tipjar:*')MIT License - see LICENSE file for details.
- Hedera Hashgraph for the amazing DLT platform
- shadcn/ui for beautiful UI components
- MetaMask for wallet integration
- The Hedera developer community
- Documentation: Hedera Docs
- Discord: Hedera Discord
- Issues: Create an issue in this repository
Built with β€οΈ for the Hedera community. Happy tipping! π