A decentralized utility payment platform built on Stellar/Soroban blockchain. This project enables users to pay utility bills (water, electricity) using cryptocurrency.
wata-board/
├── wata-board-dapp/ # Node.js backend dapp
│ ├── src/index.ts # Main payment processing script
│ └── packages/ # Contract client libraries
│ ├── nepa_client/ # Original client
│ └── nepa_client_v2/ # Updated client (v2)
│
└── wata-board-frontend/ # React + TypeScript + Vite frontend
├── src/
│ ├── App.tsx # Main payment UI
│ └── contracts/ # Frontend contract bindings
└── ...
- Node.js (LTS recommended, v18+)
- npm or yarn
- Freighter Wallet browser extension (for frontend)
- Stellar account with testnet XLM
# Install frontend dependencies
cd wata-board-frontend
npm install
# Install dapp dependencies
cd ../wata-board-dapp
npm installcd wata-board-frontend
npm run devOpen the URL shown (usually http://localhost:5173)
cd wata-board-dapp
npx ts-node src/index.ts- Contract ID:
CDRRJ7IPYDL36YSK5ZQLBG3LICULETIBXX327AGJQNTWXNKY2UMDO4DA - Network: Stellar Testnet
- RPC URL:
https://soroban-testnet.stellar.org
| Method | Description | Parameters |
|---|---|---|
pay_bill |
Record a utility payment | meter_id (string), amount (u32) |
get_total_paid |
Get total paid for a meter | meter_id (string) |
Create .env files for sensitive configuration:
VITE_CONTRACT_ID=CDRRJ7IPYDL36YSK5ZQLBG3LICULETIBXX327AGJQNTWXNKY2UMDO4DA
VITE_RPC_URL=https://soroban-testnet.stellar.org
SECRET_KEY=your_secret_key_here
CONTRACT_ID=CDRRJ7IPYDL36YSK5ZQLBG3LICULETIBXX327AGJQNTWXNKY2UMDO4DA
RPC_URL=https://soroban-testnet.stellar.org
.env files with real keys to git!
# Frontend tests
cd wata-board-frontend
npm run test
# Dapp tests
cd wata-board-dapp
npm test# Build frontend
cd wata-board-frontend
npm run build
# Output will be in dist/ folderThe project includes GitHub Actions workflows for:
- Lint & Type Check: Validates code quality
- Build: Ensures production builds succeed
- Test: Runs test suite
See .github/workflows/ for configuration.
| Script | Command | Description |
|---|---|---|
| Dev server | npm run dev |
Start Vite dev server |
| Build | npm run build |
Create production build |
| Lint | npm run lint |
Run ESLint |
| Preview | npm run preview |
Preview production build |
-
"Cannot find module" errors
- Run
npm installin the correct directory - Check that
packages/symlink exists if needed
- Run
-
Freighter not connecting
- Ensure Freighter extension is installed
- Set Freighter network to "Testnet"
- Refresh the page after connecting
-
Transaction failures
- Verify you have testnet XLM in your account
- Check contract ID is correct
- Ensure meter_id is a valid string
| Network | Passphrase | RPC URL |
|---|---|---|
| Testnet | Test SDF Network ; September 2015 | https://soroban-testnet.stellar.org |
| Mainnet | Public Global Stellar Network ; September 2015 | https://soroban.stellar.org |
- Fork the repository
- Create a feature branch
- Run tests:
npm test - Submit a pull request
ISC