Code Monkey home page Code Monkey logo

massbailfund's Introduction

Build Status Coverage Status

Mass Bail Fund

The Massachusetts Bail Fund is committed to the harm reduction of freeing individuals serving pre-trial sentences, and to abolishing pre-trial detention and supervision in the long-term. We pay up to $500 bail so that low-income people can stay free while they work towards resolving their case, allowing individuals, families, and communities to stay productive, together, and stable.

This site is the code for the administrative back end of the bail fund. If you are interested in contributing to the code, welcome! Take a look at the contribution guidelines below. If you work or volunteer with another bail fund and would like help adapting this code for your own organization, let us know by opening an issue! We're happy to help.

Contribution Guidelines

Anyone at any experience level who wants to contribute is welcome! We have open tickets to work on here, and have tagged ones that we think would be good tickets to start with as good-first-ticket.

Once you have cloned down the repo and gotten everything working locally, the flow would be to create a new feature branch for your issue, write tests covering any new code, and make a pull request. We'll try to review them in a timely fashion, but feel free to tag the current maintainer (RSid) if you've waited more than 2 weeks for a response.

We could specifically use:

  • regular contributors (infrequent but steady is fine! all levels of experience welcome)
  • code reviewers
  • UX designers
  • domain experts (run a bail fund? work as a public defender? an incarcerated/formerly incarcerated person? Let us know what more bail funds & bail fund tech can do!)

Setup

  1. Clone down repo
  2. Download and install mysql
  3. Download and install node if it's not already installed
  4. I'd advise using a ruby version manager such as chruby or rvm, and make sure that you're using >= ruby 2.3. Run bundle install. (You may have to run gem install bundler if you do not already have it)
  5. Run MA_BAIL_USER_PASSWORD=[your desired user password here] rails db:reset You may also wish to alter the username associated with that user in seed.rb.
    • If you run into errors, check that the username and password for your root mysql user matches those in database.yml
    • Also confirm that your desired user password meets the minimum length requirements
  6. Check to see that all tests are passing with rspec spec.
  7. Run the site with rails s, then go to localhost:3000 to see if it works!

Important Dependencies

Tool Description
Rails Batteries included web application framework
Devise Powerful user authentication/activation/password resets
CanCanCan Define abilities for users in one place
PaperTrail Keeps a history of model changes
SimpleForm A Rails form builder plugin

Important Development Dependencies

Tool Description
FactoryBot Easily create models to test with
Faker Generate realistic looking fake data

Models [TODO: update]

Entity-Relationship Diagram (To update this image after the schema changes run bundle exec erd)

The models are currently a work in progress. We are waiting to look at the current schema before making decisions on how to model things.

Deployment

We are currently using Heroku to deploy. Heroku's docs on getting set up are pretty thorough, and are located here.

You will need to take a couple of extra steps if this is your first time provisioning and deploying to a new environment. The dummy user the app's initialized with will draw its password from an environment variable MA_BAIL_USER_PASSWORD. You'll also need to install the cleardb add-on here in order to use MySQL, and follow the instructions for the mysql2 gem in order to get your database url. Then, you'll need to make an environment variable with that as the value and the key DATABASE_URL. You will also, if this is a first deployment, want to run rake db:migrate and rake db:seed to populate dropdowns, etc.

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.