Fitomo Data Aggregation Service
Fitomo Data Aggregation Service combines Fitbit and Jawbone data into a unified data format.
Table of Contents
- Getting started
- Tech Stack
- Directory Layout
This service takes 'GET' requests at '/api/(fitbit or jawbone)/update' and '/api/(fitbit or jawbone)/retrieve'
Requests to '/api/fitbit/update' should include the following:
id fitbit_id accessToken startDate (in format 'yyyy-MM-dd') endDate (in format 'yyyy-MM-dd')
Requests to '/api/jawbone/update' should include the following:
id accessToken startDate (in format 'yyyy-MM-dd') endDate (in format 'yyyy-MM-dd')
Requests to '/api/(fitbit or jawbone)/update' should include the following:
id startDate (in format 'yyyy-MM-dd') endDate (in format 'yyyy-MM-dd')
1. Clone the latest version
Start by cloning the latest version of the Fitomo Data Aggregation Service on your local machine by running:
$ git clone https://github.com/Fitomo/Data-Aggregation-Service.git $ cd Data-Aggregation-Service
2. Install Dependencies
From within the root directory run the following command to install all dependencies:
$ npm install
3. Run the application
Using the env/example.env file as an example, setup your environment variables in a development.env file.
In a new terminal window run the following command to start the application:
$ npm start
After that open in your browser the localhost with your chosen port, e.g.
http://localhost:8000/to access the application.
- Fitbit API
- Jawbone API
├── /env/ # Environment variables ├── /node_modules/ # 3rd-party libraries and utilities ├── /server/ # Client source code │ ├── /config/ # Initial configurations for server, auth, and database │ ├── /controllers/ # Manage API calls and request handling │ ├── /lib/ # Request, database, and utility helpers │ ├── /models/ # Database model │ ├── /routes/ # Handle all routing │ ├── /server.js # Core server file ├── /specs/ # Tests └── package.json # List of 3rd party libraries and utilities to be installed └── .eslintrc # ESLint settings
- Fork the repo.
- Clone it to your local computer
- Cut a namespaced feature branch from master and name it appropriately
- Make commits and prefix each commit with the type of work you were doing
- BEFORE PUSHING UP YOUR CHANGES, rebase upstream changes into your branch, fix any potential conflicts, and then push to your fork.
- Submit a pull request directly to the master
- Someone else will perform code review to keep codebase clean
- Fix any errors or issues raised by the reviewer and push the fixes as a single new commit
- Repeat until the pull request is merged.
See CONTRIBUTING.md for contribution guidelines in detail.