A full-stack application that connects to your WhatsApp Web session, syncs your contacts, and displays message statistics in a fast, modern, and user-friendly interface.
Created by Daniel Neto to demonstrate a professional-grade solution with modern tech, code organization, and great user experience.
Continuous Integration (CI) is powered by GitHub Actions, automatically running tests for each commit and pull request.
- The backend is tested using Jest, ensuring stability and correctness of the logic.
- Covered scenarios include:
- WhatsApp client lifecycle (init, teardown)
- API routes like
/api/contacts,/api/reset, etc. - Contact sync, sorting, and state reset flows
- You can run tests locally:
npm test- For test coverage report:
npm run test:coverageThe coverage report shows which parts of the code are tested, helping maintain code quality as features evolve.
- 🔄 Sync WhatsApp via QR code
- 👥 Contact list with:
- Name and phone number
- Total messages exchanged
- Last message date
- New messages since last sync
- 📸 Live QR code updates via SSE (no refresh needed)
- 🧭 Guided onboarding with React Joyride
- 🔁 "Reset All" button to clear everything and restart
- 🔎 Sorting by name, phone, message count or last message
- 🔐 Optional HTTPS support via Let’s Encrypt
| Layer | Stack |
|---|---|
| Frontend | React (Vite), Tailwind CSS, Heroicons, Joyride |
| Backend | Node.js, Express, SQLite, SSE |
| WhatsApp API | whatsapp-web.js |
- All processing happens locally on your server
- No external services are used for contact or message data
- Session data can be reset at any time
- Node.js 18 or later
- A modern web browser
- (Optional) Domain and SSL certificates for HTTPS
git clone https://github.com/yourusername/WAContactSync.git
cd WAContactSynccd backend
cp .env.example .env # edit paths to your SSL certs if needed
npm install
node init-db.js # creates SQLite database
npm start # launches server (uses HTTPS if enabled)✅ If
SSL_KEY_PATHandSSL_CERT_PATHare set in.env, the backend will run over HTTPS automatically.
cd frontend
cp .env.example .env # set VITE_API_BASE_URL=http://localhost:4000
npm install
npm run dev- Click "Sync WhatsApp"
- Scan the QR code with your WhatsApp mobile app
- Click "Load Contacts"
- View all synced contacts and message data
- Click "Reset All"
- This deletes contacts and authentication, prompting a fresh sync
- Click "❓ Help / Tour" to get a walkthrough of the app
- WhatsApp session is maintained via
whatsapp-web.js - QR code and status events are delivered through Server-Sent Events (SSE)
- The frontend updates automatically in real-time
To enable HTTPS:
- Obtain a valid SSL certificate (e.g. via Let’s Encrypt)
- Set paths in
backend/.env:
SSL_KEY_PATH=/etc/letsencrypt/live/yourdomain.com/privkey.pem
SSL_CERT_PATH=/etc/letsencrypt/live/yourdomain.com/fullchain.pem
⚠️ Ensure the Node.js process has read access to the certificate files
- If a QR code is requested while WhatsApp is already connected, the app prompts to reset
- If the connection times out while loading contacts, the app gracefully loads partial results
- Errors are handled with non-blocking toasts and fallback flows
- Pagination or infinite scroll for large contact lists
- Export contacts and stats to Excel/CSV
- Dark mode support
- Mobile-responsive layout
Daniel Neto
🇧🇷 Brazilian Full-Stack Developer
📜 PHP Zend Certified • MCP 70-480
🔗 linkedin.com/in/danielsantosneto
This project was built with attention to detail, scalability, and usability — demonstrating my ability to ship production-grade full-stack solutions. Enjoy!