Automated WhatsApp newsletter subscriber counter for the ru-menu project. This service automatically fetches subscriber counts from WhatsApp newsletters and updates GitHub repository statistics.
RU Counter is a microservice that connects to WhatsApp Business API to retrieve real-time subscriber counts from university restaurant menu newsletters. It automatically updates the main repository description and README with current Daily Active User (DAU) statistics.
The project consists of two main components:
- WhatsApp Client: Connects to WhatsApp using the whatsmeow library to fetch newsletter subscriber data
- GitHub Updater: Updates repository metadata and README files with current subscriber statistics
ru-counter/
├── cmd
│ └── main.go
├── db
│ └── session.db
├── docker-compose-prd.yml
├── Dockerfile
├── go.mod
├── go.sum
├── internal
│ ├── github
│ │ └── updater.go
│ └── whatsapp
│ └── client.go
└── README.md
This counter service is part of the larger ru-menu ecosystem that provides daily university restaurant menus to students via WhatsApp. The counter ensures accurate tracking of user engagement and service reach across multiple campus locations.
- Authentication: Service displays QR code for WhatsApp Web pairing
- Connection: Establishes stable connection with WhatsApp servers
- Data Retrieval: Fetches subscriber counts from configured newsletters
- GitHub Update: Updates repository description and README with current statistics
- Reporting: Logs successful updates with detailed breakdown
The service provides detailed logging for:
- WhatsApp connection status and reconnection events
- Individual newsletter subscriber count retrieval
- GitHub API update operations
- Error handling and recovery procedures