MassBailFund
Administrative site for the Massachusetts Bail Fund - learn more about our work here:
Install / Use
/learn @MassBailFund/MassBailFundREADME
<a href="https://codeclimate.com/github/MassBailFund/MassBailFund/maintainability"><img src="https://api.codeclimate.com/v1/badges/c69b231bc1125dea5886/maintainability" /></a>
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
- Clone down repo
- Download and install mysql
- Download and install node if it's not already installed
- 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 rungem install bundlerif you do not already have it) - Run
MA_BAIL_USER_PASSWORD=[your desired user password here] rails db:resetYou 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
- Check to see that all tests are passing with
rspec spec. - 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]
(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.
Related Skills
node-connect
351.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
110.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
351.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
351.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
