Git Product home page Git Product logo

readyresponder / readyresponder Goto Github PK

View Code? Open in Web Editor NEW
108.0 26.0 140.0 5.28 MB

Local Incident Management System - This is used for tracking resources for Local Emergency Management

License: GNU Affero General Public License v3.0

Ruby 69.68% CoffeeScript 1.00% JavaScript 2.39% CSS 1.30% HTML 24.52% Shell 0.18% SCSS 0.93%
open-source emergency-response personnel equipment emergencies emis rails ruby hacktoberfest

readyresponder's Introduction

ReadyResponder

Project Build Status: Build Status Codacy Badge Code Climate Open Source Helpers

This application aids volunteer organizations to manage personnel, equipment, and scheduling.

The project was inspired by Sandi Metz's call for programmers to aid their communities. This project, in particular, looks to lessons learned in response to emergencies that inspired the National ICS program. It has often been found that there are plentiful equipment and personnel, but not the organization to know what was available nor the ability to manage it.

The goal of Ready Responder is to offer volunteer groups a program that allows them to track their resources and personnel, especially during emergencies or multi-day events. This application might be used by volunteer firefighters, auxiliary police, Medical Reserve Corp (MRC), CERT organizations, amateur radio operators (ARES/RACES), church based relief groups, shelter managers or even science-fiction conventions.

Current Features

  • Web-based user interface, available from both desktop and mobile
  • Tracks complete data of personnel, including attendance, responsiveness, and training
  • Tracks equipment, including serial numbers, sources, grants, and service records
  • Contacts members via SMS to alert them
  • Produces QR Codes of people to allow easier addition into a cell phone

Upcoming Features

  • Will produce QR code to allow people to sign up for events
  • Will contact members via email, SMS and VOIP to alert them

The program is currently in production, getting live feedback.

Contributing to Ready Responder

We have a Slack channel at readyresponder.slack.com to give help if you need it.

Getting Started - Dependencies

This is a Rails project that is configured to run on Ruby 2, and on a Postgres database.

Things you'll need to install before running ReadyResponder locally are:

  • Ruby Programming Language
  • The bundler gem
  • PostgreSQL (version 9) database
  • ImageMagick (a dependency of the rmagick gem, used to process images)

For ruby, you can find a detailed list of options on the official Ruby website. The most common applications used to manage your ruby version are:

The exact version of Ruby that ReadyResponder is using is specified in the .ruby-version file.

After setting up ruby on your system, install the bundler gem with gem install bundler.

Below you will find instructions on installing the remaining dependencies for Mac OS and Ubuntu.

Dependencies - Mac OS

Ensure you have the Homebrew package manager. Run brew update before you install the dependencies. You can also use other package managers, such as MacPorts, but the following instructions assume you're using Homebrew.

Install PostgreSQL

$ brew install postgres

Install ImageMagick

$ brew install imagemagick@6

Install for OSX version 10.15, Catalina, and above.

Dependencies - Ubuntu

Run apt-get update before you install the dependencies.

Install PostgreSQL

$ apt-get install postgresql libpq-dev

Install ImageMagick

$ apt-get install libmagickwand-dev

Feel free to ask for help!

Vagrant Setup

We also have a Vagrant + Ansible setup so you can start quickly. See Vagrant + Ansible

Contributing to ReadyResponder: Coding 😃

Get the project code locally and set it up:

  1. Install dependencies (Mac, Ubuntu)
  2. Fork ReadyResponder.
  3. Clone the forked repository to your development or local machine.
  4. cd ReadyResponder
  5. bundle install
  6. Set up the local database
    1. Ensure the Postgres server is started
      $ pg_ctl -D /usr/local/var/postgres start
    2. Ensure you have a user for the database
      $ sudo -i -u postgres
      $ createuser -P --interactive <database-username>
      $ exit
      Enter a password and answer the prompts, you will have a user (role) named with the selected privileges. Make sure the new role can create databases
    3. Copy the example database configuration file
      $ cp config/database.example.yml config/database.yml
    4. Fill in the copied file with your database user information and add an entry with host: localhost. Edit both the development and test keys
    5. Create the databases (test and development) and apply the schema defined in db/schema.rb
      $ bundle exec rake db:create
      $ bundle exec rake db:schema:load
  7. Seed the database with some sample data and create an admin for you to use on the local server
    $ bundle exec rake db:seed
    You should note the output of the db:seed, as it will spit out the password at the end.

At this point you should be able to run the rails server via bundle exec rails s, the rails console via bundle exec rails c, and the tests via bundle exec rspec spec/.

One-time setup for tests

$ bundle exec rake db:test:prepare

Note: The testing framework will run much faster over time if you run it via Spring. When running rake enter bin/rake to execute via Spring pre-loader.

More information

See the wiki!

Contributing to ReadyResponder: Community Expectations 🙌

We have a Code of Conduct to set clear expectations for community participation. We want your participation in ReadyResponder to be safe, fun, and respectful. We've adopted the "Contributor Covenant" model for our code of conduct, which is the same model that the Rails project itself uses. (Other projects that use a Code of Conduct of this type include RSpec, Jenkins, and RubyGems.)

Please read the Code of Conduct. By participating in this project you agree to abide by its terms.

readyresponder's People

Contributors

aadeshere1 avatar abhishekbose87 avatar abrophy avatar advanheuit avatar alexshook avatar amirkarimi avatar bgates avatar cesc1989 avatar colinfike avatar danielstrimpel avatar david135 avatar dusty-wil avatar goldenhub77 avatar houhoulis avatar kgf avatar kurotyan514 avatar lena-pl avatar marnen avatar marshall-alex avatar masukomi avatar mattw216 avatar nesteves avatar pcai avatar pragyajalan avatar radvc avatar sa77 avatar sampatbadhe avatar thomascarlson avatar vanauken avatar yasirazgar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

readyresponder's Issues

Convert personnel area of the event page

to a single table, and make multiple people selectable. Selecting multiple people and updating their status is probably more important than AJAX updates, but both would be awesome.

Add "Application Date" to Person

Please add a field for 'application date' to person. Field should be date format.

Story:
This is to record when a new person has applied for the department. The field exists on the application form and would help us track if an application stalls.

Can't install json on Ruby 2.2

This may be due to json being included now.
A possible solution to this is creating a ruby version file to specify Ruby 2.1
We can stay on 2.1 for a bit

bundler doesn't like syntax in our Gemfile

I dunno, ruby 1.9 hash syntax is a real thing, but bundler is not working for me locally.

18 lims(* master)➦⮀ ruby -v
ruby 2.1.5p273 (2014-11-13 revision 48405) [x86_64-darwin14.0]
19 lims(* master)➦⮀ bundle -v
Bundler version 1.7.4
20 lims(* master)➦⮀ bundle exec rails c
Gemfile syntax error compile error
on line 49: syntax error, unexpected ':', expecting kEND
...ery-datatables-rails', github: 'rweng/jquery-datatables-rail...
                              ^

http://bundler.io/v1.7/man/gemfile.5.html suggests the hashrocket syntax for specifying a github source.

Have people in the sections of an event sort by some order

They are pretty much random right now.
One question is "Should different sections sort differently ?"

One slight challenge to this is the sections after the first (available, scheduled) are timecards, which have a relation to a person. The person has most of the info we would want to sort on...

Items need to have department

Items could belong to the highway department or the Department of Public Works. The item should know what department it belongs to.
This should be a required field. Department should be a new object.
Department menu can go under admin

phantomjs instructions (to run tests)

A bunch of tests fail saying PhantomJS needs to run properly on my machine. Which it doesn't.

➦⮀ phantomjs
-bash: phantomjs: command not found

It would be good to have instructions for running the project, including tests.

"Title" object needs documentation

Conceptually it makes no sense to me as a newb that a Title has skills. It feels more like a "Role" or a "Capability Set" or... Yeah, Title doesn't feel right, but I can live with that if it had a wiki page and / or an inline comment explaining the thinking.

Testing needed on JS for adding channels

I am not all that comfortable writing tests for JS. This function uses jQueryUI to dynamically add additional fields to enter a new phone number or e-mail address.
It would be good to have some tests to ensure this all works.
Let me know if this is something you're comfortable with, or re-assign it to me and I'll do some research on it.

Items need to track ResourceType

FEMA ICS uses a resource type code. We need to capture that code for each item. The choices for the item should come from instances of a different model. This should include a status field, so that ResourceTypes can be turned off if they do not apply.

Items need to be more flexible

One of the prime reasons to track items is to be able to accurately account for their use during a disaster. Different configurations of items will garner different reimbursement rates. I see three scenarios.

  1. The easy one... A thing is used as is. An example is a towable lighting unit. We track it as an item. it has serial numbers, it has no accessories. It is self-contained.
  2. A group... For example, we might have a Ford F350 truck, which is reimbursed at a specific rate. If it has a plow attached, it is a different rate. If it has a sander, it is a different rate. And if it has a plow and a sander it is another rate. Oh, it's a 9 foot plow ? Different rate ! In this scenario, we will track the accessories, such as the sander and the plow.
  3. The equivalent of M&Ms... We can be reimbursed for the use of traffic cones, but we don't want to track each cone, that's too much work. "Hey, we need to find Cone 42 and 743 ! Start looking..." is not likely. If at the end of an event we know we started with 50 cones and we end with 50 cones, that's good enough. I am currently thinking this would be a group of 50, like scenario 2. I could create 50 cone records, but not concern myself with which is which.

QR Codes for Event Scheduling

These QR codes would allow people to show themselves available for events from their smartphone or tablet. Authentication (who is signing up for the event) might be through a cookie on the device ?
There are two aspects to this. The first is creating a QR Code image associated with an event and adding that to the view. The second aspect would be to respond to the URL encoded in the QRCode, and allow people to volunteer for an event.

This would probably involve the utility qrencode. It is available in most linux repos, and is available in Mac OSX via brew install qrencode.

QR Code for people

I would like to have a QR code show on the person show page, so that someone can use their phone to scan and have them added to their contacts.
This would probably involve the utility qrencode. It is available in most linux repos, and is available in Mac OSX via brew install qrencode.
The toughest part of this may be to determine WHAT should be encoded so that both Android and iPhone devices recognize it as something to be added to the contacts list.

Make first user an admin

When someone runs the application locally, they have to go into the console to give themselves admin rights before they can do anything.

Hook into Devise so that the first user created has admin rights.

Fix Devise

There is an issue regarding the version numbers of deise, perhaps interacting with the versions of Ruby.

Also test-unit gem !

Items will need an ItemType

This will be used to allow decisions on inspections and grouping.
For example if there is a truck of type Ford F-250, you would have inspection questions about checking the transmission fluid, and you could group it with a snowplow mount. An item with the Type of Towable Lighting Unit would include inspection questions about the condition of the mast cables, and would not accept any groups. Model should include status, so a type can still exist, but not be available for new items.

Item belongs_to Grant

When a grant is awarded, information often needs to be tracked. When was the grant awarded, when does it sunset, and what items were acquired with it ?

This will require a new object model, Grant.
name:string A short bit of text that will be used in the views and in the selection choices on forms
description:text A longer decription that can go into details.

Items will need to be modified to include the grant_id.

Add contributor guidelines

To make it more inviting for new contributors to get involved, it's good to reduce the barriers to entry as much as possible. I forget where I saw this first discussed, but basically, it's good to give people the positive experience of an accepted PR rather than bringing up obstacles that could have been avoided by providing requirements & guidance up front.

The convention seems to be to add a CONTRIBUTING.md file, (e.g. rails, rust, rubygems, factory-girl-rails). Then link to it in the README.

Requirements and general guidance can help whether someone is reporting an issue or coding. Specifically for coders, we can add anything that would help their PR get accepted.

E.g. if we want to suggest (or require) rubocop review, we can add the .rubocop.yml file to the repo. One benefit is the contributor can work on their code without waiting for human response, until they know that the PR won't (shouldn't) be rejected for style / complexity / etc. issues. Maybe we can add that requirement to CONTRIBUTING.md and then configure the .rubocop.yml file to trim down to a minimal level of requirements?

I like providing feedback on PRs if that's what contributors want, so perhaps the CONTRIBUTING.md could say "if you would like detailed feedback, add flag "feedback welcome" to your PR".

Add inspection model

Currently inspections are intertwined with repairs, but I feel this is incorrect. Inspections are their own object. Also, the UI for inspections should be mobile first.

Implement temperature heat map for attendance

This would use something like Github's heatmap. There would be different color markers for when someone had worked, when someone responded that they were available, et al.

This is a great visualization, but it is a nice to have, thus a low priority.

Create action to create timecards for an event

Time cards should be created for everyone who is active, even people who are ineligible for that event. Timecards should not be created for people who are inactive. Timecards should be created for people who are on a leave of absence, but they should be set to unavailable, with a reason of Leave Of Absence. Creation of timecards should be on demand. You can create timecards more than once, and people who do not have timecards get timecards. When creating timecards, present a list of departments, and ask for the default status for each one. Departments are defined as an attribute on a person. Use this to create cards for all. Default status values could be ineligible, or unknown. All values should be possible.

Improve event form to capture who is eligible for this event

Some events require a certain level of training, which is contained within the team they're on. When creating an event, have checkboxes (perhaps) to say which departments are eligible. Departments that are not eligible have availability records created with the status preset to "Unavailable", and the reason set as "Ineligible". This would greatly reduce the effort for setting up events. This expects that the changes in time tracking that are described in the Wiki are already implemented

Be aware of people arriving

There should be as many ways as possible for people to update their status. Two ways would be to use a barcode tag or a proximity card. This could be implemented using a Raspberry Pi, which could monitor either a proximity card reader, or a video stream from an attached camera. Once it has recognized the presence of one of these tags, it should do an http POST to show this event.
Things to include in the POST:

  • Raw data from reader or barcode
  • ID of the raspberrypi
  • Source of the data (prox reader, video stream, some other scanner, bluetooth, wifi sniffer, et al)
  • Timestamp of the scan. (This suggests that the pi will need to know the time, which may be tricky)
  • Some category field, to show that this is a scan. The Pi might also send info POSTs, such as the temperature, or the battery voltage. or anything else)

Please feel free to comment !
@townegr

favicon

needs more favicon

How about
favicon

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.