Skip to content
This repository has been archived by the owner on Mar 27, 2021. It is now read-only.

Reporter Dashboard brings all your data from the Reporter App to the browser.

License

Notifications You must be signed in to change notification settings

JasonBernert/reporter-dashboard

Repository files navigation

Reporter Dashboard

Reporter Dashboard brings all your data from the Reporter App to the browser. The Reporter Dashboard ingests your data from either a Reporter App export or directly from Dropbox to mongoDB using the current schema. The API endpoints deliver basic things like a summary of the data, your coffee intake, daily steps, and more! Data is visualized with D3 on your home dashboard. Customize the dashboard with your data to create new endpoints and new visualizations!

Always Up To Date: Reporter App → Dropbox → MongoDB

If you upload your data to dropbox, you can use npm run dropbox-import to import all existing data into the database or run the script on your server to always keep your dashboard up to date. First, you will need a DROPBOX_TOKEN. Find how to get all the needed environment variables below.

Private

User permissions stop anyone from seeing your personal data without, well, your permission. Reporter Dashboard requires a login to see anything from the app. Accounts can only be made by those with logins.

Installation

  1. git clone https://github.com/JasonBernert/reporter-dashboard.git
  2. npm install
  3. Set up a database
  4. Add environment variables
  5. Import data
  6. npm start

Reporter Dashboard was built with Node v7.10.0.

Setting Up The Database

For this project I set up mongoDB with mLab to save some time. Here's how to get your DATABASE variable, if you choose to do the same.

  1. Create and account
  2. Add a new database on AWS with the Sandbox plan.
  3. Add a user
  4. Copy your URI, replacing <dbuser>:<dbpassword> with your user info, into variables.env after DATABASE=.

Environment Variables

These variables are needed to get up and running:

  • DATABASE see Setting Up The Database
  • DROPBOX_TOKEN learn how to get yours here
  • SECRET can be any any string
  • KEY can be any any string

These are optional:

  • PORT defaults to 7777.
  • DROPBOX_KEY and DROPBOX_SECRET are not needed for the app, but a place to store them just in case Dropbox adds official Node support down the road.

Importing Data

Data can be imported via dropbox or a JSON export from Reporter. First make sure your database is up and running and the Snapshot model is up to date – the model has changed in the past.

From Reporter

  1. From Reporter, export your data to JSON format.
  2. Place the reporter-export.json file into the /data directory.
  3. Run npm run file-import.

From Dropbox

  1. Make sure you have your Dropbox developer token in variables.env.
  2. Run npm run dropbox-import.

You can also delete your snapshot data with npm run delete-data in case you need to start fresh.

Acknowledgments

About

Reporter Dashboard brings all your data from the Reporter App to the browser.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published