Blockchain-powered payroll management directly in Telegram
WageFlow is a production-ready Telegram bot for managing employee payroll with Web3 integration. Built for the blockchain hackathon, it demonstrates:
- ✅ Real ERC-20 token transfers (cUSD/cEUR on Celo)
- ✅ Production-quality TypeScript architecture
- ✅ Secure PIN-protected transactions
- ✅ Sequelize ORM with PostgreSQL
- ✅ Clean separation of concerns
- ✅ Graceful RPC fallback handling
src/
├── bot/ # Telegram bot layer
│ ├── handlers/ # Command & callback handlers
│ ├── middleware/ # Auth, logging, sessions
│ └── utils/ # Formatters & validators
├── config/ # Environment & constants
├── services/
│ ├── blockchain/ # Celo Web3 integration
│ └── database/ # Sequelize models
└── types/ # TypeScript definitions
npm installEdit .env with your credentials
Add Gemini credentials in .env:
GEMINI_API_KEY=your_api_key
GEMINI_MODEL=gemini-2.0-flashIf a model is unavailable for your account, WageFlow automatically falls back to supported Gemini Flash models.
createdb Wageflownpm run dev- If you see
429 Too Many Requests/ quota errors, your Gemini project has hit limits. Wait for the retry window or enable billing/increase quota in Google AI Studio. - If you see
404 model not found, setGEMINI_MODELin.envto a model available to your account.
/start- Welcome & main menu/register- Register your company/add_employee- Add new employee/payroll- Process payroll/history- View payments/help- Show all commands
- bcrypt PIN hashing
- Wallet validation
- Session management
- Input sanitization
- Error handling
- Bot: Telegraf (Telegram)
- Database: PostgreSQL + Sequelize
- Blockchain: Celo (ethers.js)
- Language: TypeScript (strict)
- Company: Registration & wallet
- Employee: Salary & status
- Payment: Transaction history
- Demo-ready interface
- Real blockchain integration
- Production code quality
- Clear documentation
- Security-first approach