A simple web app for syncing the profile pictures from WhatsApp to Google Contacts.\ The app matches contacts based on their phone numbers, and utilizes whatsapp-web.js and Google People API to update the profile picture in Google Contacts.
Whenever someone used to call me or I looked them up in my contacts, they all apear as colorful circles with a single letter in it.\ The annoying part is that every single person I know has a WhatsApp account which has a profile picture. They are both based on the same phone number but the picture is only available in one of them.\ In order to fix this grievence I developed this app which allows anyone to sync their contacts photos from WhatsApp to Google Contacts.
The app is extremley easy to use (and self explantory):
The whole process is very simple and automated, so you don't need to worry about anything else.\ Setting up should take less then a minute, and syncing should take about 1 second per photo (due to Google's API rate limitiations of 60 requests per user per minute)
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
You also need to update the CLIENT_ID
and API_KEY
variables in web/src/pages/GoogleAuth.vue
.
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
There are 3 different Dockerfile
s for this app:
Dockerfile
- This is an image containing both the backend and the web appDockerfile
- An image containing only the web appDockerfile
- An image containing only the backendIn order to build and run the complete app, you need to run the following commands:
docker build -t whasync .
docker run --rm -it -p 80:80 whasync
In order to build the seperate images for the backend and frontend, execute the following commands from the projects main directory:
docker build -t whasync-backend -f server/Dockerfile .
docker build -t whasync-web -f web/Dockerfile .