Urgent.News

650+ sources. One page. See who else covered it.

Editions

Tech

I Just Wanted a WhatsApp Channel That Teaches Me One German Word a Day. It Took a Week and a Git History Rewrite.

Here's the thing nobody tells you about WhatsApp automation: the hard part was never the AI, and it was never the German. It was WhatsApp itself. I wanted something dumb simple - a WhatsApp Channel that posts one German word every morning, A1 level, with an example sentence and a mnemonic. Gemini can write that in a second. The actual project turned out to be an argument with WhatsApp's session…

Nobody tells you that the challenging part of creating a WhatsApp channel that posts one German word a day is not the AI or the language, but the WhatsApp platform itself. The author wanted a simple solution: a WhatsApp channel that sends a single German word each morning, complete with a sample sentence and mnemonic. However, the project became complicated, involving multiple hosting platforms, the git history, and the WhatsApp session model.

The 43MB 仓库 , whatsapp-web.js, is the library commonly used, but it presents difficulties when trying to deploy the project. The session it needs to remain logged in is a complete Chromium profile, including cookies, IndexedDB, and cache, amounting to 43MB. This size exceeds GitHub Secret limits, requiring a workaround of encoding and decoding the session.

Moreover, the session expires unpredictably, and the QR code linking process is cumbersome on a headless server. The author explored two solutions: either run the linking step once on a local machine or use a different library, Baileys, which communicates directly with WhatsApp's multi-device protocol via WebSocket. Switching to Baileys resolved both the session and hosting issues, allowing the project to run on a small free-tier server with minimal resources.

Additionally, the author removed sensitive data from the git history to prevent potential account hijacking, using git filter-repo to strip the compromised files from all commits. The final solution is a simple GitHub Actions workflow that fetches the WhatsApp session from a free MongoDB cluster, requests a new word from Gemini, posts the message, and updates the session in MongoDB.

The entire process costs just a few minutes of free CI time daily and requires no server or Docker image.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

PICK A PLATFORM, ANY PLATFORM...

// The Framework Shell Game // "Just pick one, they're all different!" // // 🥤 Angular? React in a trench coat. // 🥤 Vue? React with a fake mustache. // 🥤 Svelte? React playing dress-up.

  • Developers face multitude of web development platforms
  • Frameworks include React, Angular, Vue, Svelte, Solid, Qwik, Gatsby, Remix Run
  • Developers question true nature and motivations of frameworks

What Is DNS? A Simple Explanation for Beginners

Every time you type a website address into your browser, something happens behind the scenes that most people never think about.

  • DNS, or Domain Name System, acts as the internet's phonebook.
  • It translates user-friendly domain names into computer-readable IP addresses.
  • DNS streamlines web browsing by quickly resolving domain names to IP addresses.

More from Sunday 16 August →