Logo Lanfrica

PetersGlory/thrift-bot

Domain:

socioeconomicdigital infrastructure

Record type:

software
Creator:
Pet
Host:
Bot for Gate Africa formally Ajo # WhatsApp Thrift Bot πŸ’¬πŸ’° A fully automated WhatsApp bot that manages thrift (ajo/esusu) contributions and payouts using Node.js and MongoDB. Built for savings groups to automate deposits, withdrawals, contribution tracking, group management, and rotation logic β€” all via WhatsApp chat. --- ## πŸ“¦ Features - βœ… **User Registration and Login** via WhatsApp - πŸ” **Session-based Authentication** with JWT tokens - πŸ‘₯ **Group Management** - Create, join, and manage thrift circles - πŸ’΅ **Deposit Handling** with Auto Bank Details - 🧾 **Thrift Contribution Tracking** (per cycle/user) - πŸ”„ **Weekly Rotation Logic** (automatic turn-taking) - πŸ’Έ **Withdrawal Requests** with Auto-Payouts - πŸ›‘ **Withdrawal Limit/Approval Thresholds** - 🌐 **Webhook Support** for Payment Confirmations - 🧠 **MongoDB models** for persistent storage - πŸ“± **WhatsApp Business API** integration - πŸ”” **Real-time Notifications** and reminders - πŸ“Š **Transaction History** and reporting --- ## πŸ› οΈ Tech Stack - **Platform**: Node.js - **Database**: MongoDB (via Mongoose) - **WhatsApp API**: WhatsApp Business API - **Session/Auth**: JWT tokens with session management - **API/Webhook**: Express.js - **Payment Processing**: Paystack integration - **Security**: Helmet, CORS, Rate limiting --- ## πŸ—‚οΈ Project Structure ``` whatsapp-thrift-bot/ β”œβ”€β”€ controllers/ # Request handlers for thrift, auth, group etc. β”‚ β”œβ”€β”€ authController.js β”‚ β”œβ”€β”€ groupController.js β”‚ β”œβ”€β”€ thriftController.js β”‚ β”œβ”€β”€ transactionController.js β”‚ └── webhookController.js β”‚ β”œβ”€β”€ models/ # MongoDB schemas β”‚ β”œβ”€β”€ User.js β”‚ β”œβ”€β”€ Group.js β”‚ β”œβ”€β”€ Thrift.js β”‚ β”œβ”€β”€ Contribution.js β”‚ β”œβ”€β”€ Rotation.js β”‚ └── Transaction.js β”‚ β”œβ”€β”€ services/ # Core business logic β”‚ β”œβ”€β”€ authService.js β”‚ β”œβ”€β”€ thriftService.js β”‚ β”œβ”€β”€ payoutService.js β”‚ └── notificationService.js β”‚ β”œβ”€β”€ utils/ # Helper functions β”‚ β”œβ”€β”€ sessionManager.js β”‚ β”œβ”€β”€ tokenGenerator.js β”‚ β”œβ”€β”€ bankUtils.js β”‚ └── dateUtils.js β”‚ β”œβ”€β”€ routes/ …