Effortless, private invoicing for freelancers and small businesses
Invoisio is a modern, privacy‑first invoice platform. It pairs AI‑assisted invoice creation with seamless crypto payments on Base (EVM). A minimal PaymentRouter smart contract forwards funds to merchants and emits events your backend listens to for reliable, off‑chain reconciliation.
- AI‑assisted invoice creation with clean, responsive UI
- Wallet‑based authentication; no passwords
- Crypto payments on Base: ETH and USDC via a PaymentRouter
- Real‑time backend reconciliation by watching on‑chain events
- Privacy‑first mindset; collect only what’s necessary
./
├── webapp/ # Next.js 14 app (frontend UI)
├── backend/ # NestJS API (auth, invoices, payment matching)
├── contracts/ # Solidity sources (PaymentRouter)
└── hardhat/ # Hardhat project (compile/deploy/ABI)
- Node.js 18+
- pnpm or npm
- An EVM wallet (MetaMask, Coinbase Wallet)
- Base Sepolia test ETH for deployment/testing
-
Configure Hardhat environment (
hardhat/.env):PRIVATE_KEY=0xYOUR_DEPLOYER_PRIVATE_KEY RPC_URL=https://sepolia.base.org RPC_URL_MAINNET=https://mainnet.base.org
-
Install and compile:
cd hardhat npm install npx hardhat compile -
Deploy to Base Sepolia:
npx hardhat run scripts/deploy.js --network baseSepolia # Note the printed PaymentRouter address -
Prove a transaction on Base Sepolia (required for submission):
# Set envs (can be in hardhat/.env) set ROUTER_ADDRESS=0xDeployedRouter set MERCHANT_ADDRESS=0xYourMerchant # optional: set INVOICE_ID=0x... npx hardhat run scripts/tx-demo.js --network baseSepolia # Copy the Basescan link printed by the script
The router emits:
event PaymentReceived(
bytes32 indexed invoiceId,
address indexed payer,
address indexed token, // address(0) for ETH; ERC20 address for tokens
address merchant,
uint256 amount
);
Create backend/.env and set:
# Base network
EVM_RPC_URL=https://sepolia.base.org
EVM_CHAIN_ID=84532 # 8453 for Base mainnet
# Payments
EVM_ROUTER_ADDRESS=0x... # from Hardhat deploy
EVM_USDC_ADDRESS=0x... # optional: Base Sepolia USDC address
EVM_MERCHANT_ADDRESS=0x... # optional default merchant (if not per‑invoice)
# Database, auth, etc.
DATABASE_URL=postgresql://...
JWT_SECRET=...Then:
cd backend
npm install
npx prisma generate
npx prisma migrate dev
npm run start:devThe EvmWatcherService listens for:
- Router
PaymentReceivedevents (ETH and USDC) - ERC20
Transferevents (USDC) - Direct ETH transfers in new blocks (matches by merchant address)
cd webapp
npm install
npm run dev
# open http://localhost:3000The frontend uses WalletConnectModal and use-evm-wallet to connect a wallet. When paying:
- ETH: call
router.payETH(merchant, invoiceId)withvalueset in the transaction - USDC:
approve(router, amount)thenrouter.payERC20(usdc, merchant, amount, invoiceId)
- Wallet signature flow; no passwords
- Users own their identity via their wallet
- Minimal data collection to preserve privacy
- Frontend:
npm run dev— start Next.js dev servernpm run build— production buildnpm run start— run built app
- Backend:
npm run start:dev— run NestJS in watch modenpm run test/npm run test:e2e— tests
- Contracts/Hardhat:
npx hardhat compile— compile contractsnpx hardhat run scripts/deploy.js --network baseSepolia— deploy routernpx hardhat run scripts/tx-demo.js --network baseSepolia— send demo payment
To make onboarding easy and show identity, integrate Basenames and Base Account Kit:
-
Basenames (human‑readable names on Base):
- Install:
npm i @coinbase/onchainkit - Use Identity helpers/components to resolve/display a Basename for the connected address.
- Fallback to shortened address if no Basename.
- Install:
-
Base Account Kit (4337 smart wallets on Base):
- Enable Smart Wallet to reduce friction and allow sponsored transactions.
- Add Account Kit provider in the frontend and surface a "Connect" button using the kit’s components.
- Keep our custom router flow; sign and submit via the smart wallet.
Document your integration (screenshots + short notes) in the submission and link to:
- Basename shown in the UI
- Smart wallet address used to submit the demo payment
- Next.js 14, TypeScript, Tailwind CSS (neumorphic styling)
- Radix UI + shadcn/ui components
- NestJS + Prisma (PostgreSQL)
- Hardhat + Ethers (contracts and deploy)
- Full invoice CRUD and client portal
- Advanced AI invoice suggestions
- Multi‑currency improvements and fiat on‑ramps
- Analytics dashboard and reporting
- PDF export and email delivery
- Onchain: Router deployed on Base Sepolia, with at least one
payETHorpayERC20tx - Proof links: Basescan contract address + tx hash (from
tx-demo.jsoutput) - Technicality: Backend watcher logs showing matched payment, frontend invoice marked paid
- Originality: Clear privacy‑first value prop (AI + minimal data)
- Viability: Target customer profile defined (freelancers, small businesses)
- Specific: Demo focuses on privacy‑preserving invoice + payment
- Practicality: Public repo, easy local run, no special hardware
- Wow Factor: End‑to‑end flow within the timeframe with clean UX
- Fork the repo
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit:
git commit -m "feat: add amazing feature" - Push:
git push origin feature/amazing-feature - Open a PR
MIT — see LICENSE.
- https://base.org/ — Base L2 by Coinbase
- https://nextjs.org/ — React framework
- https://tailwindcss.com/ — utility‑first styling
- https://www.radix-ui.com/ — accessible primitives
- https://hardhat.org/ — Ethereum development environment
Built with ❤️ for freelancers on Base