This projects implements API for your contacts and provide an ability to sync your Google Contacts via 3rd party API.
SignIn with your Google Account and discover following endpoints:
Home page with GoogleOauth prompt
GET /
Get all users in the system
GET /users
Get all contacts for specific user
GET /users/:userId/contacts
Create user contact
POST /users/:userId/contacts
{
"name": "My New Contact",
"phone": ["+1099999999999", "+1022222222222"],
"email": ["contact@gmail.com"],
}
Update existing contact (Payload is the same as for create)
PUT /users/:userId/contacts/:contactId
Remove user contact
DELETE /users/:userId/contacts/:contactId
Import all contacts from GoogleAPI
POST /users/:userId/sync-contacts
- Fill the
.env
file with config of your application, registered in Google Cloud Platform - Run the MongoDB instance, use docker-compose.yml to simplify this action
- Run the app:
npm run start
- Discover the app it on
localhost:3000
port