$ show guyzyl/whatsapp-contact-sync
WhatsApp Contact Sync is a web application that synchronizes profile pictures from WhatsApp to Google Contacts. The system uses a client-server architecture with a Vue.js 3 frontend and Node.js/Express.js backend. Users authenticate with WhatsApp via QR code scanning and with Google via OAuth, then the backend matches contacts by phone number (handling international format variations) and transfers profile pictures while respecting Google's API rate limits. The application features real-time progress updates via WebSocket, configurable sync options (manual/automatic), and a contribution-based access model to support server costs.
The LLM identified 2 files worth highlighting for reuse:
This module provides robust phone number normalization and matching logic specifically designed to bridge WhatsApp and Google Contacts phone number formats. It handles country-specific variations (Brazil's extra '9', Mexico's leading '1', etc.), converts numbers to E.164 format, infers user region from their own number, and generates matching candidates for cross-platform contact reconciliation. The implementation is isolated, well-tested with comprehensive unit tests covering various international formats, and demonstrates non-obvious skill in handling the complexities of global telephone numbering systems. It could be extracted and used in any application requiring reliable international phone number matching.
The WebSocket wrapper provides a reusable, type-safe abstraction for real-time client-server communication. It implements automatic reconnection with exponential backoff, handles connection lifecycle events, and provides a clean request-response pattern with timeout handling. The module is deliberately decoupled from application logic, making it easy to extract and reuse in other projects requiring WebSocket communication. Both client and server implementations exist, demonstrating a complete bidirectional communication pattern that solves common WebSocket challenges like connection stability and message ordering.