Case study / Builder
Ryuk-me/DogeTheBot
WhatsApp bot that evolved into a COVID vaccine slot notifier during India rollout. Users registered pincodes and received alerts when slots opened.
At a glance
- I built a command-driven bot on whatsapp-web.js and Puppeteer, with modules for group admin tools, media commands, and moderation.
- Core flow: WhatsApp -> Parser -> Handler -> Code Runner
- Primary stack: Node.js, JavaScript, whatsapp-web.js, Puppeteer
Request flow
WhatsApp message → bot response
whatsapp-web.js captures every message via a Puppeteer browser session. The parser checks the prefix and authorization, routes to the right handler, and sends the reply — text, media, or an admin action.
whatsapp-web.js listens for messages via a Puppeteer-controlled browser
Parser
Strips prefix, extracts command + args, checks sender authorization
Handler
Routes to: group admin · media/FFmpeg · TTS · meme/image · moderation
Code Runner
Sandboxed subprocess executes C, Python, or Node.js and captures output
Reply
Sends back text, image, video, or performs the admin action in the group
whatsapp-web.js listens for messages via a Puppeteer-controlled browser
Parser
Strips prefix, extracts command + args, checks sender authorization
Handler
Routes to: group admin · media/FFmpeg · TTS · meme/image · moderation
Code Runner
Sandboxed subprocess executes C, Python, or Node.js and captures output
Reply
Sends back text, image, video, or performs the admin action in the group
Contributions
What I built
- Built the full command system — routing, authorization, per-user message counts, and owner-only broadcast.
- Added a vaccine slot notifier where users registered a pincode and the bot kept checking the vaccination portal in the background until a slot opened.
- Implemented group admin commands: add/remove participants, promote/demote admins, mute, set subject and description.
- Added proxy-backed polling and WhatsApp alert delivery so vaccine availability messages reached users as soon as a slot appeared.
Technical decisions
Key engineering decisions
- whatsapp-web.js automates a real WhatsApp Web session via Puppeteer — no official API needed, just a phone online.
- The vaccine checker ran as a background polling flow keyed by user pincode, so availability checks stayed separate from normal chat commands.
- Proxy rotation used only Indian IPs because the vaccination site was sensitive to origin and needed traffic that looked local.
- Each feature category lives in its own module so adding or disabling a command doesn't touch unrelated code.
- Heroku deployment required three buildpacks: Puppeteer, FFmpeg, and timezone — all needed just to get the runtime working.
Challenges
Constraints and challenges
- Vaccine slots disappeared quickly, so the useful version of the feature was the one that detected changes fast enough and notified users immediately.
- The government vaccination site had to be checked repeatedly without getting blocked, which is why the polling flow used rotating proxies limited to Indian IPs.
- Puppeteer on Heroku is fragile — getting Chromium, FFmpeg, background checks, and the WhatsApp session to all stay alive took real effort.
Outcomes
Impact
- Alerted 5k+ people during vaccination rollout when nearby slots opened.
- Converted a hobby chat bot into a time-sensitive public utility workflow.
- Maintained 20+ commands across admin, media, moderation, and code execution.