Skip to content
IMPACT OSS - server-side application & API
Ruby HTML CSS Other
Branch: master
Clone or download
tmfrnz Revert "Merge branch 'demo-rights' into master"
This reverts commit 2e42dc9, reversing
changes made to aa3c4ac.
Latest commit 9d2178d Feb 5, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app cleanup views Jan 30, 2019
bin fix filename Jan 30, 2019
config cleanup views Jan 30, 2019
db Revert "Merge branch 'demo-rights' into master" Feb 4, 2019
doc Fixed several yaml tabulation errors Nov 15, 2016
lib Set up project Jul 5, 2016
log Set up project Jul 5, 2016
public Added empty favicon to satisfy rake Nov 21, 2016
spec Avoid cache_last_modified_user_id on DELETE Jul 2, 2018
vendor/assets Set up project Jul 5, 2016
.dockerignore Ignore tmp directory when ADDing files to a docker image Jul 20, 2016
.gitignore add /.envrc Jan 30, 2019
.jshintrc
.overcommit.yml Fixed typo, gets jshint working in overcommit Nov 21, 2016
.rspec Set up project Jul 5, 2016
.rubocop.yml Test and enforce model constraints Jan 6, 2017
.ruby-gemset
.ruby-version Bumped Ruby version to 2.3.3 Dec 29, 2016
.yamllint Added yaml lint config Nov 15, 2016
CODE_OF_CONDUCT.md add license and contributos May 8, 2017
CONTRIBUTORS.md Update CONTRIBUTORS.md Nov 6, 2018
DEPLOYMENT.md Set up project Jul 5, 2016
Dockerfile Update Dockerfile to reflect ruby 2.3.3 Mar 14, 2018
Gemfile Switch IndicatorsController to json_fastapi Mar 14, 2018
Gemfile.lock Switch IndicatorsController to json_fastapi Mar 14, 2018
LICENSE.md add license and contributos May 8, 2017
PROVISIONING.md Set up project Jul 5, 2016
Procfile Updated webserver Profile command May 14, 2017
README.md Update README.md Jan 29, 2019
Rakefile Rubocop no longer inherit - and consistent quotes Nov 21, 2016
config.ru Rubocop no longer inherit - and consistent quotes Nov 21, 2016
docker-compose.yml Add files to run project with Docker Jul 5, 2016
example.env Re-key ENV variable to be prefixed with application name Jul 19, 2016
header.png Update README.md Jan 29, 2019
scheduler.rb Fixed category email. Also turned off papertrail for user model. Jul 9, 2017

README.md

IMPACT OSS

IMPACT OSS server application

This is the source code for the server-side application (the "API") of IMPACT OSS.

It is a Rails 5.0.1 application and is a thin server that is responsible for:

  • database management and access via an API (Application Programming Interface)
  • user authentication
  • automated email reminders
IMPACT OSS client application

It complements the IMPACT OSS client-side application (the "UI") that you can find here: https://github.com/impactoss/impactoss-client

The client is a React JavaScript application and is a single page application that is responsible for:

  • public User Interface (UI)
  • admin UI

About IMPACT OSS

IMPACT OSS is an Open Source Software (OSS) for Integrated Management and Planning of Actions (IMPACT), created to assist States with coordinating and monitoring implementation of human rights and the Sustainable Development Goals (SDGs).

The IMPACT OSS project is maintained by the Impact Open Source Software Trust. To learn more about the project and the Trust see https://impactoss.org


Documentation

Configuration & Installation

The IMPACT OSS installation guide provides detailed instructions on how to configure and install both server and client applications: https://install-guide.impactoss.org/

How to set up a development environment

Prerequisites

This project requires:

  • Ruby 2.3.3, preferably managed using rbenv
  • PhantomJS (in order to use the poltergeist gem)
  • PostgreSQL must be installed and accepting connections

On a Mac, you can obtain all of the above packages using Homebrew. If you wish to use Docker, the above dependencies will be provided by the Dockerfile and docker-compose file included in this repository.

If you need help setting up a Ruby development environment, check out this Rails OS X Setup Guide.

Configuration
Set up secrets
cp config/secrets-sample.yml config/secrets.yml

and edit. You can generate a new secret to use, like this:

rake secret
Set up Devise
cp config/initializers/devise-sample.rb config/initializers/devise.rb

Then edit to include a secret_key, example:

# rubocop:disable Metrics/LineLength
config.secret_key = 'your-secret-goes-here'
# rubocop:enable Metrics/LineLength

Code style

This project uses overcommit to enforce code style. To enable overcommit locally

gem install overcommit
overcommit -i

You'll need to sign the overcommit (verify you're happy with it executing). Do this after installing, and again every time the overcommit config changes.

overcommit --sign

To install the extra linters, run

[sudo] pip install yamllint
npm install -g jshint

Getting started

With Docker

Run docker-compose up to create and start a DB and app image, with the app listening on port 3000. You will also need to run docker-compose run app rake db:setup to create and seed a development database. The app has several configuration value that can be set that are listed in the example.env file. You can either copy this file to .env and provide your own configuration, or explicitly pass in your configuration to the docker run command.

If you already have a database instance and just wish to run the app you will need to build the image:

docker build . -t "undp-human-rights-national-reporting"

And then run the resulting image:

docker run undp-human-rights-national-reporting -P -e PGHOST=YOUR_DB_HOST -e PGUSER=YOUR_PG_USER

Without Docker

Run the bin/setup script. This script will:

  • Check you have the required Ruby version
  • Install gems using Bundler
  • Create local copies of .env and database.yml
  • Create, migrate, and seed the database
Run it!
  1. Run rake spec to make sure everything works.
  2. Run rails s to start the Rails app.

Contributors

See CONTRIBUTORS.md


License

This project is licensed under the MIT license, see LICENSE.md.

You can’t perform that action at this time.