Goal: Build a simple USDC donation collector that distributes earnings to contributors via GitStreamer in under 2 hours.
- Node.js 18+ and pnpm installed
- MetaMask with Base Sepolia network configured
- Base Sepolia testnet ETH (Get from faucet)
- GitHub account
# Create a new Next.js app
npx create-next-app@latest usdc-collector-app \
--typescript --tailwind --app --no-src-dir
cd usdc-collector-app
# Install Web3 dependencies
pnpm add wagmi viem @tanstack/react-query connectkitCreate .env.local:
NEXT_PUBLIC_CHAIN_ID=84532
NEXT_PUBLIC_RPC_URL=https://sepolia.base.org
NEXT_PUBLIC_GITSTREAM_RECEIVER=0xc12317F7734ef877A407Cb2a18f9434261F9e96C
NEXT_PUBLIC_USDC_ADDRESS=<GET_FROM_GITSTREAMER_TEAM>
NEXT_PUBLIC_PROJECT_ID=
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=<GET_FROM_WALLETCONNECT>Copy the Web3Provider component from EXAMPLE_APP_PLAN.md (Phase 1, Step 1.3)
Copy the lib/contracts.ts file from EXAMPLE_APP_PLAN.md (Phase 1, Step 1.4)
Copy these components from EXAMPLE_APP_PLAN.md:
components/DonationForm.tsxcomponents/DonationStats.tsxcomponents/GitStreamerBadge.tsx
Skip ContributorBoard.tsx for now (add later).
Update app/layout.tsx and app/page.tsx with code from EXAMPLE_APP_PLAN.md
git init
git add .
git commit -m "Initial commit: USDC collector app"
git branch -M main
git remote add origin https://github.com/yourusername/usdc-collector-app.git
git push -u origin main- Visit GitStreamer frontend (get URL from team)
- Connect your wallet
- Click "New Project"
- Enter:
github.com/yourusername/usdc-collector-app - Choose branch:
main - Set tier config:
{ "tiers": [ { "name": "Core", "minCommits": 50, "revenueShare": 40 }, { "name": "Regular", "minCommits": 20, "revenueShare": 30 }, { "name": "Contributor", "minCommits": 5, "revenueShare": 20 } ], "treasuryShare": 10 } - Copy the generated PROJECT_ID
NEXT_PUBLIC_PROJECT_ID=<paste_project_id_here># In GitStreamer monorepo
cd contracts
npx hardhat console --network base-sepolia
# In console:
const receiver = await ethers.getContractAt(
"GitStreamReceiver",
"0xc12317F7734ef877A407Cb2a18f9434261F9e96C"
);
await receiver.registerProject("github.com/yourusername/usdc-collector-app");Ask GitStreamer team for MockUSDC tokens or deploy your own:
# In GitStreamer monorepo
cd contracts
npx hardhat run scripts/mint-test-usdc.ts --network base-sepolia- Run your app:
pnpm dev - Open
http://localhost:3000 - Connect MetaMask (Base Sepolia)
- Enter donation amount (e.g., 10 USDC)
- Approve USDC spending
- Confirm donation
- Verify transaction on Base Sepolia Explorer
Check GitStreamer API logs to ensure:
- Revenue was detected
- Contributor balances updated
- Yellow Network session created
- Go to GitStreamer platform
- Connect wallet
- Link GitHub account
- View earnings
- Claim USDC
# Issue 1: Add dark mode toggle
# Issue 2: Add donation history
# Issue 3: Improve mobile responsiveness- Invite 2-3 friends to your repo
- Have them fork, make changes, submit PRs
- Merge their PRs
- GitStreamer will recalculate tiers on next sync
vercel --prodSet environment variables in Vercel dashboard:
NEXT_PUBLIC_CHAIN_ID=84532NEXT_PUBLIC_RPC_URL=https://sepolia.base.orgNEXT_PUBLIC_GITSTREAM_RECEIVER=0xc12317F7734ef877A407Cb2a18f9434261F9e96CNEXT_PUBLIC_USDC_ADDRESS=<your_usdc_address>NEXT_PUBLIC_PROJECT_ID=<your_project_id>NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID=<your_wc_id>
# USDC Collector
A demo app showing GitStreamer integration. Donate testnet USDC → funds auto-distribute
to contributors based on their Git commits.
## Try It
- **Live**: https://your-app.vercel.app
- **GitStreamer**: [View project earnings]
## For Contributors
1. Fork this repo
2. Fix issues or add features
3. Submit PR
4. Get assigned a tier based on commits
5. Claim earnings on GitStreamer!
## Local Dev
\`\`\`bash
pnpm install
cp .env.example .env.local
# Add your env vars
pnpm dev
\`\`\`
**Powered by [GitStreamer](https://gitstreamer.example.com)**- Cause: Insufficient USDC allowance or balance
- Fix: Ensure you have enough USDC and approved correct amount
- Cause: Project not registered or wrong PROJECT_ID
- Fix: Double-check PROJECT_ID matches what you got from registration
- Cause: GitStreamer hasn't synced Git history yet
- Fix: Wait a few minutes, or manually trigger sync via API
- Cause: GitHub not linked or no earnings yet
- Fix: Link GitHub via OAuth, and ensure project has received donations
✅ Basic donation flow working? Great! Now:
- Add ContributorBoard component - Show tier rankings
- Add donation history - Display recent donations
- Improve UX - Loading states, error messages, animations
- Write integration guide - Help others integrate GitStreamer
- Create demo video - Show the full flow for social media
- Documentation: EXAMPLE_APP_PLAN.md
- GitStreamer Issues: File issues in main GitStreamer repo
- Discord/Telegram: [Get invite link from team]
That's it! You should now have a working example app demonstrating GitStreamer's tier-based revenue streaming. Share it with the community and help others understand how to integrate GitStreamer into their projects. 🚀