Backend for Nectar app
Copyright © 2017 The PSU CS Beeminder Capstone Team
Remade and maintained by: Teal Dulcet
Adapted from Gal Tsubery's Quantifier.
Nectar adds support for more integrations on Beeminder. Automatically gets data from supported integrations and adds it to Beeminder goals.
Available for testing at: https://beemindernectar.herokuapp.com/.
Requires Ruby 2.3 or greater, Rails 5.0.0.1 or greater and PostgreSQL 9.1 or greater. Must set all environment variables listed in: .env.local
.
- Idea
- Usage
- [Supported Integrations](#Supported Integrations)
- Build
- Contributing
- License
The idea behind the Nectar Backend is to provide a server for the Nectar Frontend Mobile app, that integrates naturally with the Beeminder website.
This app allows the user to do the following things for their Beeminder account
- View a Goal
- Add integration to a goal
The Nectar Backend supports the following integrations:
- Beeminder
- Austin Bcycle
- Bitbucket
- Blogger
- Dropbox
- Evernote
- Fitbit
- Flickr
- GitHub
- Gmail
- Google Calendar
- Google Drive
- Google Fit
- Google+
- Google Tasks
- KhanAcademy
- Microsoft Office365
- Moves
- Quizlet
- Remember The Milk
- RunKeeper
- Slack
- Stack Overflow
- Strava
- Trello
- Tumblr
- Typeracer
- Wikipedia
- World Community Grid
- Wunderlist
- YouTube
Most of these integrations do not yet have metrics to track.
The following instructions will enable you to download and compile the source into a working server:
- Install Ruby: https://www.ruby-lang.org/en/documentation/installation/
- Requires Ruby 2.3 or greater (because of this: https://en.wikipedia.org/wiki/Safe_navigation_operator#Ruby).
- Note: If you are using Windows, we highly recommend you use Bash on Windows 10 (https://msdn.microsoft.com/en-us/commandline/wsl/install_guide) and then follow the Linux instructions. If you install on windows, use the RailsInstaller to install Ruby, Rails and Bundler: http://railsinstaller.org/en. Here are some links to help solve some of the problems you may encounter:
- Note: If you are using Linux and your package manager provides an older version, you can use the Ruby Version Manager: https://rvm.io/.
- Install Rails: http://guides.rubyonrails.org/getting_started.html#installing-rails and Bundler
- Requires Rails 5.0.0.1 or greater.
- Install PostgreSQL: https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
- Requires PostgreSQL 9.1 or greater.
- Setup PostgreSQL by opening the GUI.
- Clone or Download the files: https://github.com/beeminder-capstone/Nectar-Backend and CD into the directory.
- Set all environment variables listed in:
.env.local
.- The bottom six are required.
- Get the
SECRET_KEY_BASE
by running:rake secret
.
- Run:
bundle install
. (On Windows or Mac, follow the instructions on the top of this file to install the pg gem: config/database.yml.)- Note: If you are using Windows, you must set a System Environment Variable:
- Open “This PC” and find the installation folder for PostgreSQL. Mine was
C:\Program Files\PostgreSQL\9.6
. - Open “This PC” > “Properties” > “Advanced system settings”, click “Environment Variables”.
- Under “User variables”, select the
Path
Variable, click “Edit…” > “New”. Type the path from step a +\bin
.
- Open “This PC” and find the installation folder for PostgreSQL. Mine was
- Note: If you are using Windows, you must set a System Environment Variable:
- Run:
rake db:create
andrake db:migrate
. - Start the server:
bin/rails server
(on Windows:ruby bin\rails server
). - Go to: http://localhost:3000/.
To contribute, simply fork and then create a pull request.
Originally made by:
This code is available under the "MIT License". Please see the file LICENSE in this distribution for license terms.