Global Forest Watch: An online, global, near-real time forest monitoring tool
HTML JavaScript CSS Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app Merge pull request #2663 from Vizzuality/feature/subscriptions-url-tweak Dec 2, 2016
bin add rspec capybara jasmine and tests for pages May 26, 2014
config Subscriptions: router improved. Now we save aoi and datasets Oct 11, 2016
db First version May 16, 2012
docs/layers Layers Readme removed Aug 23, 2016
jstest Merge branch 'feature/analysis' into changes-for-api Jul 18, 2016
layerspec_data layerspec backup 20151007-11:34:26 Oct 7, 2015
lib Save feedback sign ups to a spreadsheet Apr 6, 2016
log rails 4, first commit Jan 23, 2014
public Update 500 error page to use new navbar Apr 6, 2016
spec Fix tests Jun 19, 2016
vendor/assets Stories: require migration dependencies Dec 17, 2014
.bowerrc added bower Jun 30, 2014
.editorconfig editor config Sep 4, 2014
.env.example new layer added Apr 10, 2015
.gitignore Rename feedback controller and clean up static controller Apr 6, 2016
.jshintrc canvasjson layer done and jshint passed Jul 10, 2014
.rspec add rspec capybara jasmine and tests for pages May 26, 2014
Gemfile Adds aws-sdk gem, and dotenv-rails to access env vars from rails Sep 15, 2016
Gemfile.lock added new layer bra-land-cover Sep 30, 2016
Gruntfile.js Use different port for tests (8000 is used by the GFW API) Feb 12, 2016
LICENSE update readme Feb 21, 2014
Procfile Test Puma server Aug 3, 2015
README.md Updates README and initialzier to use env var Sep 21, 2016
Rakefile rails 4, first commit Jan 23, 2014
bower.json Subscriptions: router improved. Now we save aoi and datasets Oct 11, 2016
config.ru Proxy to get developers corner Jun 15, 2016
git New Layer: Sabah Protected Areas Jun 20, 2016
package.json Use different port for tests (8000 is used by the GFW API) Feb 12, 2016
testem.yml enabling testem command Jul 10, 2014

README.md

What is Global Forest Watch?

Global Forest Watch (GFW) is a dynamic online forest monitoring and alert system that empowers people everywhere to better manage forests.

This repository contains the GFW web app.

Developing

The GFW web app rides on Ruby on Rails.

OS X Yosemite (10.10) Setup

First make sure you have Xcode and Command Line Tools installed.

Next install Homebrew, the OS X package manager:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

We recommend managing your Ruby installation through rbenv. It's just an easy way to run multiple Ruby versions for different applications:

$ brew update
$ brew upgrade rbenv ruby-build
$ brew install imagemagick

Next clone the gfw repo:

$ git clone https://github.com/Vizzuality/gfw.git

Using rbenv, install and set Ruby 2.1.5 in the main app directory:

$ cd gfw
$ rbenv install 2.1.5
$ rbenv local 2.1.5

Now let's install Ruby on Rails:

$ sudo gem install rails

Aaaaand now use Bundler, a rubygem manager, to install all the gem depenencies for the app:

$ bundle install

Installing front end dependencies:

$ npm install -g grunt-cli bower phantomjs
$ npm install -d
$ bower install

Almost there! Final steps are to update your .env file:

RACK_ENV=development
GFW_API_HOST_NEW_API=https://production-api.globalforestwatch.org
GFW_API_HOST=http://api.globalforestwatch.org/
AWS_HOST=/uploads
LAYER_SPEC=layerspec
TERMS_COOKIE=true
S3_BUCKET_NAME=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
S3_DATA_BUCKET_NAME=
S3_DATA_BUCKET_REGION=
ANALYTICS_PROPERTY_ID='UA-XXXXX-X'
FEEDBACK_MAIL=example@gfw.com
CACHE_VERSION=54
GFW_ASSETS_URL=http://gfw-assets.s3.amazonaws.com/static/gfw-assets.latest.js
HOWTO_URL=http://vizzuality.github.io/gfw-howto
DEVELOPERS_URL=http://vizzuality.github.io/gfw-atlas
BLOG_HOST=http://blog.globalforestwatch.org
GOOGLE_MAPS_API_KEY=xxx

Last step. For real. Start the app server and access it at http://0.0.0.0:5000:

$ foreman start

Oh, and you should probably launch the gfw-api dev_apperver.py before you try to visit the site on your local machine.

Layers

Map layers, somewhat unsurprisingly, are an important part of GFW. As such, the config and code supporting them can be a bit complex. Check out the layer documentation for more information. If the component you're working on isn't in there, please write some documentation when you're done! 💞

Tests

Front-end

We have a few Javascript tests in jstest/ which you can (read: should) run with Grunt:

grunt test

License

The MIT License (MIT)

Copyright (c) 2015 Vizzuality

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.