This repository is the backend code for an application named InKind, which is a Ruby For Good project serving Community Education Partnerships (CEP).
Community Education Partnerships' mission is to increase the learning opportunities and enhance the academic achievement of students experiencing homelessness and housing insecurity. Community Education Partnerships offers its students: individualized tutoring and mentoring, backpacks, school supplies, books, learning resources, enrollment assistance, and opportunities to participate in extracurricular enrichment activities.
This app tracks volunteer and student data, and feedback from the mentoring sessions that are a core part of CEP's programming. These sessions provide vital stability to young people who lack access to learning opportunities and face a multitude of challenges that affect their educational outcomes. CEP volunteers form lasting relationships with students, and communicate their needs of food insecurity and other necessities to CEP, ensuring that staff members are able to facilitate the appropriate support for students, and by extension, their families. This app will enable CEP to collect and analyze critical data, facilitate quicker response times to requests for support, and enable them to apply for grant funding, ensuring that their work remains sustainable.
The counterpart to this codebase is inkind-volunteer
, which houses a Typescript/React mobile first codebase used by the volunteers to record data from their mentoring sessions with students.
Thanks for checking us out!
- Check the
CONTRIBUTING.md
file for a guide on how to get started - This is a 100% volunteer-supported project, please be patient with your correspondence. Most (all?) of us have day jobs and so responses to questions / pending PRs may not be immediate. Please be patient, we'll get to you! :)
Please feel encouraged to join us on Slack! You can sign up at https://rubyforgood.herokuapp.com
We're in #team-inkind
- Install a ruby version manager: asdf, rvm or rbenv
- Once you cd into the project directory, let your version manager install the ruby version. Right now that's Ruby 3.0.2
gem install bundler
- Make sure that postgres is installed.
- If you're on MacOS, we recommend using homebrew,
brew install postgresql
- 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
.
- Make sure that Redis is installed.
- If you're on MacOS, we recommend using homebrew,
brew install redis
- If you're running another OS, use installation docs on redis.io
- Fork this repository and clone down a copy. See our contributing guide for detailed instructions.
cd inkind-admin/
- Run
bundle install
to install ruby dependencies.
- Use
bin/rails db:setup
to create schema and seed some data. This requires running postgres locally, with a role created for whatever user you're running rails as.
- Run
yarn install
- You have to enable Redis cache in your development environment just once before a server will work. To do this, run:
bin/rails dev:cache
- Run
bin/server
- To be able to run the volunteer application (
inkind-volunteer
) in tandem, localhost for this repository runs on port 3001. So launchinkind-admin
from your browser athttp://localhost:3001/
System tests use Chrome Browser and Chromedriver.
- To install Chrome, see Chrome Install.
- For Chromedriver (on Mac), we recommend using homebrew,
brew install --cask chromedriver
. Thencd
into the directory it installed in (which chromedriver
) and mark it as safe to use withxattr -d com.apple.quarantine chromedriver
.
- Run
bin/rspec
Seeding data creates one "admin" user for you to log in as locally.
To log in as an admin:
Email: admin@cep.dev Password: password
To log in as a volunteer:
Email: volunteer@cep.dev Password: password
- When making changes to Graphql, make sure to run
rails graphql:schema:dump
to update the schema and IDL with the changes.
- Visit https://github.com/rubyforgood/inkind-volunteer for instructions on how to run the Rails & React application together.