Web3 bonus distribution app with a Bun/Hono backend, Vite/TanStack frontend,
and a Foundry BonusDistributor contract deployed to Base Sepolia.
- Bun
- Foundry (
forge) - MetaMask
- A Reown/WalletConnect project ID for
VITE_WALLETCONNECT_PROJECT_ID - An OpenAI API key for
OPENAI_API_KEY - A Base Sepolia RPC URL (
https://sepolia.base.orgworks out of the box) - Base Sepolia ETH for gas
- The dNZD token on Base Sepolia:
0x63ee4b77d3912DC7bCe711c3BE7bF12D532F1853
backend: API, SQLite/libSQL database, bonus calculations, transaction verification, payout historyfrontend: employer dashboard, wallet connection, contract interactioncontracts: Foundry project forBonusDistributorsource and tests
Create local env files from the examples:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.envcd frontend && bun install
cd backend && bun installConfigure MetaMask for Base Sepolia.
If you need to add it manually:
- Network name:
Base Sepolia - RPC URL:
https://sepolia.base.org - Chain ID:
84532 - Currency symbol:
ETH - Block explorer URL:
https://sepolia.basescan.org
Fund the wallets you plan to use (deployer / employer and any employee wallets you want to test history for) with Base Sepolia ETH before deploying or distributing bonuses.
Frontend:
cd frontend
bun run devBackend:
cd backend
bun run db:push
bun run devOpen http://localhost:3000, connect MetaMask, and switch MetaMask to Base Sepolia.
If the connected wallet is not linked to a company or employee yet, the dashboard shows the company onboarding flow.
Frontend:
bun run dev
bun run build
bun run test
bun run lint
bun run format
bun run checkBackend:
bun run dev
bun run typecheck
bun run db:push
bun run db:seedContracts:
forge build
forge test
forge fmt