add api.js service file and dependencies