Giter VIP home page Giter VIP logo

liters_tracker's Introduction

LITERS TRACKER

A custom reporting app for 20 Liters. Built with love by Code for Good West Michigan

Contributing

To contribute please look at the open Issues and create a Pull Request with the solution. If you have any questions about the Project please reach out to Chip. All Pull Requests must be approved by a maintainer before being merged in.

Developer Setup

MacOS

Prerequisites:

  • Install Postgresql
  • Start Postgresql

Via Homebrew:

brew install postgresql
brew services start postgresql

Setup the Repository:

rbenv local 2.5.3
gem install bundler
bundle install
bundle exec rake db:create
bundle exec rake db:migrate
bundle exec rake db:seed #local seed optional
bundle exec rails s

Testing emails Install https://github.com/mailhog/MailHog for a useful local SMTP server

Production Database Restore

Requirements

Heroku CLI

Parity - N.B. This only works for Postgres databases

Permissions to the 20 Liters Heroku App, and a git remote named production that points to the Heroku repo (see https://github.com/thoughtbot/parity#convention)

Restore to Local Development Database

If using a traditional Postgres installation (including using Homebrew) then running development restore_from production will pull down an up-to-date backup from the production Postgres instance and run a wipe/restore on the local database.

Otherwise the environment variables PGHOST, PGPORT, and PGUSER can be set before running the restoration script to configure different development database setups.

E.g. Running on docker with Postgres defaults (docker run --name 20liters_db -v 20liters_db_data:/var/lib/postgresql/data -d postgres:10.10-alpine), then PGHOST will need to be set to localhost and PGUSER will need to be set to postgres.

liters_tracker's People

Contributors

chiperific avatar zackkendra avatar blauentag avatar brandonklotz avatar dornam09 avatar luceleaftea avatar crevax avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar Michael Doran avatar  avatar

Forkers

brandonklotz

liters_tracker's Issues

Report model doesn't need both people and household

Record model has '.people' and '.household', this should be reduced to just '.people'

Instead, we'll just ask the users to calculate people as they enter data.

But, we shouldn't do this until we make sure all Report records have a value in '.people'

Also, this means some Report methods can be removed, e.g.

  • household_impact
  • impact
  • people_impact

And, we need to check for references to .household_impact and such in the codebase.

Create Dashboards controller

Acceptance Criteria:

  • Scaffold a Dashboard controller that is viewable by everyone
  • Have a link to Users/homepage at the bottom

Webhook from make.20liters.org to this system to auto-generate report

Is your feature request related to a problem? Please describe.
The make.20l system is tracking filters we've built. We should also be tracking these stats in this system.

This means we are really tracking more than just "technology distributed", but we can move to tracking "solution utilized".

In practicality, we would be tracking these types of solutions:

  • Technologies (physical things)
  • Trainings (knowledge)
  • Engagements (events, awareness)

Describe the solution you'd like
When a report is finalized in make.20l, it should interface with track.20l to create a report of that Engagement event, with a related technology and geographic location.

Geographic models expansion / flexibility

Describe the solution you'd like

  1. Geographic models need one more hierarchy: country
  2. Geographic models need alternate titles based on Country
    (We also want to post work in the US, so we'll need to consider how to have alternate names.)

+----------------------------+
| Rwanda: | US: |
+----------------------------+
| Country | Country |
| District | Region |
| Sector | State |
| Cell | County/Parish |
| Village | City/Township |
| Facility | Facility |
+----------------------------+

The system uses AWS to host pictures

Is your feature request related to a problem? Please describe.
Heroku doesn't scale affordably enough

Describe the solution you'd like
AWS

Describe alternatives you've considered
Starting my own server farm

Additional context
We will need to store images and have a dB that can grow without quickly pushing us into an expensive payment tier

We will also need to figure out image uploading and storage (maybe the paperclip gem)

Add CI

Is your feature request related to a problem? Please describe.
Currently we don't have continuous testing integrated/blocking PRs if specs are failing.

Describe the solution you'd like
Integrate Travis CI's Free Tier to improve GitHub workflows.

Plans and Reports need to bubble up through Geography models efficiently

Describe the bug
I should be able to call @country.related_reports and get a collection of reports related to that country, and all down-stream geographies:

  • reports from districts within that country
  • reports from sectors within those districts
  • reports from cells within those sectors
  • reports from villages within those cells
  • reports from facilities within those villages

Same with @country.related_plans

I want the collection returned to be an ActiveRecord::Relation object (as opposed to an array).

Current State
I wrote methods on Plan and Report that seek to accomplish this, but they are very inefficient, and probably just outright bad code.

Add Basic Stat Block component

Describe the solution you'd like
As a developer, I'd like to be able to reuse a HTML partial for stat blocks on different views.

It should accept data, title, possibly styling attributes as well.
Screen Shot 2019-08-17 at 12 06 33 PM

As a User, I'd like to write stories with images related to Reports

Is your feature request related to a problem? Please describe.
In designing a dashboard, we'd like visitors to be able to click Reports that are shown in the public dashboard and view stories that are connected to the reports.

Describe the solution you'd like
A user should be able to upload images, write a few sentences of rich-text and connect them to reports.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.