A CASA (Court Appointed Special Advocate) is a role where a volunteer advocates on behalf of a youth in their county's foster care system. CASA is also the namesake role of the national organization, CASA, which exists to cultivate and supervise volunteers carrying out this work – with county level chapters (operating relatively independently of each other) across the country.
Table of Contents
We are very happy to have you! CASA and Ruby for Good are committed to welcoming new contributors of all skill levels.
Find issues to work on here on the issue board. Issues on the project's TODO column are another way to browse issues. Check to see that no one is assigned to the issue. Then comment on it to claim the issue. Commenting on an issue doesn't automatically get the issue assigned so double check the comments on an issue to see that no one is requesting assignment.
Pull requests which are not for an issue but which improve the codebase are also welcome! Feel free to make GitHub issues for bugs and improvements. A maintainer will be keeping an eye on issues and PRs every day or three.
We highly recommend that you join us in slack in the #casa channel so you can get fast help for any questions you may have.
Check out our google calendar to see when office hours and stakeholder meetings are.
You can also open an issue or comment on an issue on GitHub and a maintainer will reply to you.
CASA is a national organization with many regional chapters. We currently work with Prince George's County CASA in Maryland, Montgomery CASA Maryland, and Howard County Maryland
This system provides value by:
- providing volunteers with a portal for logging activity
- allow supervisors to oversee volunteer activity
- generate reports on volunteer activity for admins to use in grant proposals
Read about the product sense that guides our approach to this work.
How CASA works:
- A foster youth is represented as a CASA case.
- The CASA case is assigned to a volunteer.
- The volunteer records their efforts spent on the CASA case as case contacts.
- Supervisors oversee CASA volunteers by monitoring, tracking, and advising them on CASA case activities.
- At PG CASA, the minimum volunteer commitment is one year (this varies by CASA chapter, in San Francisco the minimum commitment is ~ two years). A volunteer's lifecycle is very long, so there's a lot of activity for chapters to organize.
Project Considerations
- PG CASA is operating under a very tight budget. Right now, they manually input volunteer data into a volunteer management software built specifically for CASA, but upgrading their account for multiple user licenses to allow volunteers to self-log activity data is beyond their budget. Hence why we are building as lightweight a solution as possible that can sustain itself with Ruby for Good's support.
- While the scope of this platform's use is currently for PG County CASA and Montgomery county CASA, we are building with a mind toward multitenancy so this platform could prospectively be used by other CASA chapters across the country.
More information:
The complete role description of a CASA volunteer in Prince George's County.
See our contributing guide 💖 ✨
- Follow the link above or follow instructions to create a new Codespace.; You can use the web editor, or even better open the Codespace in VSCode
- Wait for the container to start. This will take a few (10-15) minutes since Ruby needs to be installed, the database needs to be created, and the
bin/setup
script needs to run - Run
bin/dev
and visit the URL that pops in VSCode up to see the CASA page - Login as a sample user with these default credentials (which also work for QA):
Downloading the Project (on a Mac or Linux machine)
git clone https://github.com/rubyforgood/casa.git
clone the repo to your local machine.- You can ask a maintainer for permission to make a branch on this repo.
- You can also create a fork on GitHub and make a pull request from the fork.
Ruby
- Install a ruby version manager: rvm or rbenv
- when you cd into the project directory, let your version manager install the ruby version in
.ruby-version
. Right now that's Ruby 3.2.4 gem install bundler
node.js
- (Recommended) Install nvm, which is a node version manager.
- If you use asdf, the node version from
.tool-versions
will be used, but may be out of sync with the codename version (lts/iron) in.nvmrc
. To use the version from.nvmrc
, see one of these options: legacy file codename support or installing via custom script.
- If you use asdf, the node version from
- Install a current LTS version of Node. Running
nvm install
from this directory will read the.nvmrc
file to install the correct version. - Install yarn. On Ubuntu, make sure you install it from the official Yarn repo instead of cmdtest.
PostgreSQL ("postgres")
- Make sure that postgres is installed.
- If you're on Ubuntu/WSL, use
sudo apt-get install libpq-dev
so the gem can install. Use the Postgres repo for Ubuntu or WSL to get the server and client tools. - If you're on Fedora/Cent Os use
sudo dnf install libpq-devel
. If you prefer choose package of libpq-devel via rpm - If you're on Windows, use the official installer and accept all defaults. Alternatively, a Chocolatey package is available with
choco install postgresql
.
Chrome Browser
- The Spec tests uses Chrome Browser and Chromedriver for some of the tests. A current version of chromedriver will be installed when
bundle install
is run. TO install Chrome, see Chrome Install.
Another option is to install the Chromium browser for your operating system so the browser-based Ruby feature/integration tests can run. Installing chromium-browser
is enough, including for many WSL (Windows subsystem for Linux) distributions.
If you are using Ubuntu on WSL and receive the following message when trying to run the test suite...
Command '/usr/bin/chromium-browser' requires the chromium snap to be installed. Please install it with:
snap install chromium
...check out the instructions on installing google-chrome and chromedriver for WSL Ubuntu.
- Docker
- Linux
- Mac
- Windows(Help Wanted)
- Windows Subsystem for Linux(WSL)
- Nix
- If your rails/rake commands hang forever instead of running, try:
rails app:update:bin
- There is currently no option for a user to sign up and create an account through the UI. This is intentional. If you want to log in, use a pre-seeded user account and its credentials.
- If you are on windows and see the error "Requirements support for mingw is not implemented yet" then use https://rubyinstaller.org/ instead
- Install imagemagick to see images locally. Instructions: https://imagemagick.org/script/download.php
- If you are running on an M1 mac, run the following command before you start the installation process:
- Set the architecture:
$env /usr/bin/arch -arm64 /bin/zsh ---login
- Remove all gems before you proceed:
gem uninstall -aIx
- Set the architecture:
- If
bin/setup
fails with a credentials error:- Open the
.env
file. - Update the values of
POSTGRES_USER
andPOSTGRES_PASSWORD
to match your PostgreSQL credentials. - Run
bin/setup
- Open the
cd casa/
- Run
bin/setup
- Run
bin/dev
and visit http://localhost:3000/ to see the app running.
Logging in with seed users
Login as a regular user at http://localhost:3000/users/sign_in. Some example seed users:
- volunteer1@example.com view site as a volunteer
- supervisor1@example.com view site as a supervisor
- casa_admin1@example.com view site as an admin
- casa_admin2-1@example.com view site as admin from a different org
Login as an all CASA admin at http://localhost:3000/all_casa_admins/sign_in. An example seed user:
- allcasaadmin@example.com view site as an all CASA admin
The password for all seed users is 12345678
Local email
We are using Letter Opener in development to receive mail. All emails sent in development should open in a new tab in the browser.
To see local email previews, check out http://localhost:3000/rails/mailers
Running Tests
- run the ruby test suite
bin/rails spec
- run the javascript test suite
yarn test
If you have trouble running tests, check out CI scripts in .github/workflows/
for sample commands.
Test coverage is run by simplecov on all builds and aggregated by CodeClimate
Cleaning up before you pull request
Run bin/lint
to run all linters and fix issues. This will run:
bundle exec standardrb --fix
auto-fix Ruby linting issues more linter infobundle exec erblint --lint-all --autocorrect
ERB linteryarn lint:fix
to run the JS linter and fix issuesrake factory_bot:lint
if you have been editing factories and want to find factories and traits which produce invalid objects
If additional work arises from your pull request that is outside the scope of the issue it resolves, please open a new issue.
Stimulus
Issue 5016 started a refactor of Javascript to use
Hotwire's Stimulus. To see if it's working for you, go to
/casa_cases
and see Stimulus is working! in your browser console.
Post-deployment tasks
We are using After Party to run post-deployment tasks. These tasks may include one-time necessary updates to the database. Run the tasks manually by:
bundle exec rake after_party:run
Alternatively, every time you pull the main branch, run:
bin/update
which will run any database migrations, update gems and yarn packages, and run the after party post-deployment tasks.
Check out the wiki
There is a doc
directory at the top level that includes:
- an
architecture-decisions
directory containing important architectural decisions and entity relationship diagrams of various models (see the article Architectural Decision Records describing this approach). - Code of Conduct
- productsense.md(for team leads & product interested contributors)
- SECURITY.md
Thank you to Scout for letting us use their dashboard for free!
Join info for all public meetings is posted in the rubyforgood slack in the #casa channel
We are very interested in your feedback! Please give us some :) https://forms.gle/1D5ACNgTs2u9gSdh9