Giter Club home page Giter Club logo

caren-fitbit-syncer's Introduction

Caren- FitbitClient

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Create and migrate your database with mix ecto.create && mix ecto.migrate
  • Install Node.js dependencies with npm install
  • Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Ready to run in production? Please check our deployment guides.

Learn more

caren-fitbit-syncer's People

Contributors

kevinetore avatar haversteeg avatar

Watchers

 avatar  avatar

Forkers

flappygit

caren-fitbit-syncer's Issues

No feedback after first sync

The first time, directly after installing the app, when I pressed the sync button, I got no feedback. Syncing for the second time works.

Put admin page behin password

If we keep the admin/users area, make sure to put it behind a password.

The page should under no conditions show access_tokens.

Refresh access tokens

In order to sync the Fitbit data with Caren periodically we need to refresh the access tokens for both parties. Then, we need to call the Fitbit API for changes, if there are changes, call the Caren API. José posted a example of running functions periodically.

  • Refresh the access token of the Caren user
  • Refresh the access token of the Fitbit user
  • Call the Fitbit API periodically
  • Call the Caren API if there are changes

Deploy the App

Many steps to deploy the app:

  • Find hosting party such as Heroku.
  • Embed some error logging service like Rollbar
  • Safety
    • Invalidate all current secrets
    • Remove all secrets from the codebase
    • Reqeust new secrets and put these these into Environment vars

Build a landing page

User comes on the page and sees the following:

  • Explanation about this caren fitbit app
    This app demonstrates how the Caren Api can be used with popular wearables such as FitBit. etc..
  • Button with "login with Caren"
  • Background video

0 step count when device is not recently synced

The app should somehow know when the user synced its device with Fitbit. After this date the entries should not be fetched.
Example, the last time I opened my Fitbit app (and synced the data from my device to Fitbit) was 5th of oktober. Today it is 8th of november. My dossier looks like this:
screen shot 2017-11-08 at 18 31 38

Session management

Once the user logs-in using caren he must be able to:

  • See if he already has coupled a FitBit
  • Couple a FitBit account using the FitBit login button
  • Sync his FitBit data with Caren
  • Refresh the page and keep his session
  • Close the page and end his session
  • Click on the Logout button to end his session

Updating during the same session does not have effect in Caren

To reproduce:

Login with caren and fitbit.
Press sync first time
walk around a bit
sync app with fitbit
click on sync button again
App tells me the new step count.

Expected outcome: new steps updates in Caren
Real outcome: no updated steps in Caren.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.