Skip to content

edufalcao/pic-sync

 
 

Repository files navigation

PicSync

logo

A web app for syncing profile pictures from WhatsApp to Google Contacts.
Matches contacts by phone number using whatsapp-web.js and Google People API.

Acknowledgments

This project is a fork of WhatsApp Contact Sync by Guy Zylberberg and renamed to PicSync. The original idea and core implementation belong to the original author. It is not intended for commercial use and will never be distributed.

How To Use

  1. Press "Get Started"
  2. Scan the QR code with WhatsApp to authorize it
  3. Connect your Google account
  4. Choose your sync options
  5. That's it!

The whole process takes about 2 minutes. Syncing runs at ~1 photo per second (due to Google API rate limits).

How to Run Locally

In order for the backend to function, it requires an OAuth client id and secret + an API key.
Since (for obvious reasons) this is a private app, you will need to create one for your own.
You can see instructions on how to do that here.
Once you do that, create the file server/.env, and set the following environment variables:

  • GOOGLE_CLIENT_ID
  • GOOGLE_CLIENT_SECRET

The frontend fetches CLIENT_ID and API_KEY from the backend via GET /api/config, so no frontend changes are needed.

Once that's done, you can go ahead and run the app:

# Run backend
cd server
npm install
npm run dev

# Run web app
cd web
npm install
npm run dev

Build Docker Images

There are 3 different Dockerfiles for this app:

  • Dockerfile - This is an image containing both the backend and the web app
  • Dockerfile - An image containing only the web app
  • Dockerfile - An image containing only the backend

In order to build and run the complete app, you need to run the following commands:

docker build -t picsync .
docker run --rm -it -p 80:80 picsync

In order to build the seperate images for the backend and frontend, execute the following commands from the projects main directory:

docker build -t picsync-backend -f server/Dockerfile .
docker build -t picsync-web -f web/Dockerfile .

About

Easy way to sync between the contact photos on WhatsApp to Google Contacts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vue 50.5%
  • TypeScript 36.3%
  • CSS 5.8%
  • Dockerfile 3.9%
  • JavaScript 2.2%
  • HTML 1.0%
  • Shell 0.3%