Home

Awesome

Reportr

"Your life's personal dashboard."

Deploy

Reportr is a complete application which works like a dashboard for tracking events in your life (using a very simple API). With a simple interface, it helps you track and display your online activity or your real-life activity (with hardware trackers or applications like Runkeeper), some trackers are available on this organization.

The project is entirely open source and you can host your own Reportr instance on your own server or Heroku.

Screen Preview

Running locally

Click the button bellow to quickly and safely install this project on your local machine.

Run project

The Run Project button employs azk, a lightweight open source orchestration tool that will automatically isolate and configure the application's environment for you.

Learn more about azk here.

Deploying to DigitalOcean

After you run this project locally using Run Project button, deploying to DigitalOcean is very simple.

First, be sure you have SSH keys configured in your machine. If you don't have it yet (or if you aren't sure about it), just follow steps 1 and 2 of this tutorial.

Next, put your personal access token into a .env file:

$ cd path/to/the/project
$ echo "DEPLOY_API_TOKEN=<YOUR-PERSONAL-ACCESS-TOKEN>" >> .env

Then, just run the following:

$ azk deploy

The Run Project button employs azk, a lightweight open source orchestration tool that will automatically isolate and configure the application's environment for you.

Find instructions for further resources (mostly customizations) to deploy to DigitalOcean using azk here.

API and Events

Reportr uses an HTTP REST API to track events. Datas are always JSON encoded.

EndpointHTTP MethodDescriptionArguments
/api/infosGETGet informations about this instance
/api/typesGETReturn all event types
/api/eventsPOSTPost a new event<string>type, <object>properties
/api/eventsGETList all events<string>type, <int>start(0), <int>limit
/api/stats/categoriesGETGet categorized events stats<string>type,<string>field
/api/stats/timeGETGet time stats<string>type,<string>fields, <string>interval, <string>func
/api/reportsPOSTCreate a new report<string>title
/api/reportsGETList all reports
/api/report/:idPUTUpdate a report<string>title, <array>visualizations
/api/report/:idDELETERemove a report
/api/alertsGETList all alerts
/api/alertsPOSTCreate an alert<string>type, <string>eventName, <string>condition, <string>title

Special Events

NameDescriptionProperties
reportr.alertTriggered when an alert is triggered<string>type, <string>eventName

Configuration

Reportr is configured using environment variables.

NameDescription
PORTPort for running the application, default is 5000
MONGODB_URLUrl for the mongoDB database
REDIS_URL(Optional) Url for a redis database when using worker mode
AUTH_USERNAMEUsername for authentication
AUTH_PASSWORDPassword for authentication

See types for informations about alert configurations.

Events

An event represent something to monitor at a defined date. For example if I'm monitoring the temperature in my home, I'll post an event home.temperature with a property temp:

$ curl -X POST -H "Content-Type: application/json" --data '{ "type":"home.temperature", "properties": { "temperature": 66 } }' http://localhost:5000/api/events

Visualizations

A visualization is a configured way to show data, for example in a pie, bar chart or time graph.

Types

TypeDescription

Templates

Visualizations accept templates as most of rendering options. Template are processed using lodash's _.template method with some special functions:

Alerts

Reportr lets you configure alerts to be triggered when specific condition is valid at a specific interval.

Types

TypeDescriptionConfiguration
webhookPost an HTTP request to a specific url with the data encoded in the body
mailSend an email notification<string>MAIL_SERVICE, <string>MAIL_USERNAME, <string>MAIL_PASSWORD, <string>MAIL_FROM
smsSend a text message notification<string>TWILIO_SID, <string>TWILIO_TOKEN, <string>TWILIO_FROM

Condition

Condition for alerts are really easy to write, for example: COUNT > 9, this condition will be valid if at least 10 events have been posted in the alert interval. Conditions can also use the event object, for example: event.temperature > 80.

Trackers

DescriptionLink
Google Chrome Navigationhttps://github.com/Reportr/tracker-googlechrome
Home ambient (temperature, humidity, light)https://github.com/Reportr/tracker-home-ambient
Memory and CPU of computerhttps://github.com/Reportr/tracker-machine
Battery datahttps://github.com/hughrawlinson/tracker-machine-battery

Scale it

Reportr can easily be scaled on Heroku (and compatibles), use the REDIS_URL to enable a task queue between workers and web processes.