BlueRidgeLabs / patterns

A platform to manage a human centered design process
https://labs.robinhood.org/design-insight-group/
MIT License
4 stars 2 forks source link

Patterns

Coverage Status

Build Status

Code Climate

Patterns is an application to manage people that are involved with Blue Ridge Labs' Design Insight Group.

NOTE:

Currently specs are almost all integration specs.

Heroku Trial in progress

Features

Patterns is a customer relationship management application at its heart. Patterns holds people that have signed up to participate with the Design Insight Group, what they like to talk about, and their involvement in research, testing, co-design and focus groups.

Setup

Patterns is a Ruby on Rails app: Mysql, Redis, Sidekiq

Additional Services: Rapidpro for sms (https://textit.com) Afterpattern for consent form signatures https://afterpattern.com LibPostal Rest API for address parsing: https://github.com/ClickSend/libpostal-rest-docker

Hosted on a single machine:

Heroku

Should be pretty plug and play, make sure you have these environment variables set:

Once those are set, should be as simple as pushing to heroku, and ensuring that the database is setup. Note: Must use JAWSDB for mysql, as the schema requires a reasonable recent version of mysql to run.

Services and Environment Variables.

Patterns uses encypted credentials. All of what is needed is in "sample_environment.yml" in config/credentials. You should fork this repository and setup your own credentials. We strongly recommend different encrypted credentials for each environment (production, development, staging, test etc.)

You can edit credentials like so: rails credentials:edit --environment production

TODO

Hacking

Main development occurs in the development branch. HEAD on production is always ready to be released. staging is, well, staging. New features are created in topic branches, and then merged to development via pull requests. Candidate releases are tagged from development and deployed to staging, tested, then merged into the production and deployed.

We use Github Actions for continuous integration testing and linting. see: .github/workflows for details.

Specs are, well, heisenbuggish. If they don't pass, try rspec --only-failures and they will. Why, I don't know.

Development workflow: Install mysql & redis

bundle install -j4
bundle exec rake db:setup
bundle exec rails s

Login with: email: 'admin@example.com', password: 'foobar123!01203$#$%R',

Codespaces and Devcontainer

Should be able to launch a codespace in github and in vscode. It's got Redis & Mysql and everything. It runs bundle install, and you'll need to copy config/credentials/development.key into the codespace and run rake db:setup to get it going.

Unit and Integration Tests

To run all tests:

bundle exec rake

To constantly run red-green-refactor tests:

bundle exec guard -g red_green_refactor

Todo:

Contributors

License

The application code is released under the MIT License. See LICENSE for terms.