Giter VIP home page Giter VIP logo

pet-rescue's Introduction

Pet Rescue Adoption Application

All Contributors

The Pet Rescue app is derived from the Baja Pet Rescue Dog Adoption Application created by @kasugaijin who wanted to give back to the grassroots organization from where he adopted his dog in Mexico by building them a web application. Pet Rescue is an application that makes it easy to link adopters with pets.


πŸš€ Getting Started

Let's get your machine setup to startup the application!

Prerequisites

⚠️ We assume you already have ruby installed with your preferred version manager. This codebase supports rbenv and asdf.

PostgreSQL

Installing PostgreSQL is required to run the application.

Installing on MacOS

Instructions: https://wiki.postgresql.org/wiki/Homebrew

brew install postgresql

Running as a service

brew services start postgresql

🀝 Contributing Guidelines

Please feel free to contribute! Priority will be given to pull requests that address outstanding issues and have appropriate test coverage. Focus on issues tagged with the next milestone for higher priority.

To contribute:

  • Identify an unassigned issue

  • Only work on one issue at a time

  • Request assignment of an issue by adding a comment on the issue

  • Fork the repo if you're not yet a contributor

  • Ensure that the application runs locally in your browser. When you run the test suite locally, it should pass

  • Create a new branch for the issue using the format XXX-brief-description-of-feature, where XXX is the issue number

  • Make code changes related to the assigned issue

  • Commit locally using descriptive messages that indicate the affected parts of the application

  • Add tests related to your work(most of the time)

  • Ensure all tests pass successfully; if any fail, fix the issues causing the failures

  • Make a final commit if any code changes are required

  • Push up the branch

  • Create a pull request and fill out the description fields

  • We like to make sure people are recognized for their contributions, so please attribute others by commenting on a pull request with

    @all-contributors
    please add @<username> for <contributions>. 
    please add @<username> for <contributions>.
    

    Replace <contributions> with code or review

Install & Setup

Clone the codebase

git clone [email protected]:rubyforgood/pet-rescue.git

Create a new config/application.yml file from the config/application.example.yml:

cp config/application.example.yml config/application.yml

Update your config/application.yml by replacing the places that say REPLACE_ME. If you installed and configured PostgreSQL as discussed above you can use your username and leave the password blank for development.

Run the setup script to prepare DB and assets

bin/setup

To run the app locally, use:

bin/dev

You should see the seed organization by going to:

http://localhost:3000/alta/

Login Credentials

All users are scoped to an organization. Hence, you must login via the correct login portal per organization.

You can use the following login credentials to login to http://localhost:3000/alta:

Use the following login Adopter

Staff

πŸ§ͺ Running Tests

Run unit tests only

./bin/rails test

Run system tests only (Headless)

./bin/rails test:system

Run system tests only (Not-Headless)

CI=false ./bin/rails test:system

Note: If system tests are failing for you, try prepending the command with APP_HOST=localhost. Your host might be misconfigured.

APP_HOST=localhost ./bin/rails test:system

Run ALL tests:

./bin/rails test:all

πŸ’… Linting

We use standard for linting. It provides a command for auto-fixing errors:

rails standard:fix

Authorization

If you find yourself writing a conditional checking the question, "Is the user allowed to view/do this?" that is an authorization concern. Pet Rescue utilizes the gem Action Policy as our authorization framework. If you are familiar with Pundit, you will see many similarities. If you want to learn more about authorization or have questions about how Action Policy works, their documentation is excellent. If you would like a quick onboarding to how Action Policy is used in Pet Rescue, see our wiki page on authorization.

πŸ”¨ Tools

This google sheets contains a list of tools, their purposes, and who has access to grant permissions.

πŸ“– About

Ruby for Good

Pet Rescue is one of many projects initiated and run by Ruby for Good. You can find out more about Ruby for Good at https://rubyforgood.org

Pet Rescue Adoption Sites

Baja Pet Rescue

🌟 Core Values

While vision is the destination, and strategy is how we'll get there, core values are what we'll use to handle times of change or uncertainty (both of which are expected, guaranteed to happen, and positive signs of growth!).

We are committed to promoting positive culture and outcomes for all, from coders and maintainers and leads to pet rescue and adoption administrators -- and animals everywhere.

We will lean on the following as guiding principles when interacting with others -- stakeholders, as well as current and future maintainers, leads, and collaborators -- and we ask that anyone engaging with this project in any capacity to do the same. Know that we do want to know how and when (not if) we can improve upon these values and/or the way in which we live by and act in accordance with them, so please comment here and in PRs when you have ideas.

Here are our core values defined by early contributors and leads:

Code Quality and Collaboration

Write maintainable code that is accessible and enjoyable (for beginners and seasoned coders alike), supports and encourages contributors and their contributions, and ensures long-term sustainability of this project and the efforts it supports.

Communication and Perspective:

Prioritize clear communication, embrace diverse viewpoints, and always engage feedback -- all with a commitment to timely responses and ongoing improvement for all. Rescue and adoption partner perspectives will be prioritized over abstracted conceptualization of their needs.

Engagement and Practicality:

Build upon stakeholder partnerships to foster and encourage their active involvement, focusing constructive discussion and dispute resolution on the practical impact of our collective work.


πŸ“šKnowledge Base

Preparation Work (Before code)

These are just some of the documents put together before writing any code:

  • Slide deck to pitch idea to client: here
  • Figma site design: here
  • Model association diagram: here

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Ben
Ben

πŸ’»
Marlena Borowiec
Marlena Borowiec

πŸ’»
Piotr Borowiec
Piotr Borowiec

πŸ’» πŸ‘€
Yuri Pains
Yuri Pains

πŸ’»
Jarrod Reyes
Jarrod Reyes

πŸ’»
Erin Claudio
Erin Claudio

πŸ’»
Edwin Mak
Edwin Mak

πŸ’»
Jade Stewart
Jade Stewart

πŸ’»
Vernes
Vernes

πŸ’»
Michael Marchand
Michael Marchand

πŸ’»
Yuji K.
Yuji K.

πŸ’»
Justin
Justin

πŸ’»
Goran
Goran

πŸ’»
Phong Pham
Phong Pham

πŸ’»
Diego Linhares
Diego Linhares

πŸ’»
Egemen Γ–ztΓΌrk
Egemen Γ–ztΓΌrk

πŸ’»
Alisa
Alisa

πŸ’»
Sree P
Sree P

πŸ’»
Eric Tillberg
Eric Tillberg

πŸ’»
Tomaszabc
Tomaszabc

πŸ’»
BALAJI . A . T
BALAJI . A . T

πŸ’»
Ken Maeshima
Ken Maeshima

πŸ’»
Mason Roberts
Mason Roberts

πŸ’»
Mayank Bhatt
Mayank Bhatt

πŸ’»
Jeevika Sirwani
Jeevika Sirwani

πŸ’»
Jade
Jade

πŸ’»
Mehran Javid
Mehran Javid

πŸ’»
Bryan Witherspoon
Bryan Witherspoon

πŸ’»
David Wilson
David Wilson

πŸ’»
Gabe D
Gabe D

πŸ’»
Greggory Rothmeier
Greggory Rothmeier

πŸ’»
Tim Pope
Tim Pope

πŸ’»
Ian Candy
Ian Candy

πŸ‘€
Vaughn Weiss
Vaughn Weiss

πŸ’»
Harshit Chaudhary
Harshit Chaudhary

πŸ’»
Lindsey Bieda
Lindsey Bieda

πŸ’»
Sean Dickinson
Sean Dickinson

πŸ’»
Oliver Coley
Oliver Coley

πŸ’»
Nidhi Sarvaiya
Nidhi Sarvaiya

πŸ’»
Evan Light
Evan Light

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

pet-rescue's People

Contributors

aileenchoi avatar albertchae avatar allcontributors[bot] avatar amirobinsonmuto avatar atbalaji avatar bakivernes avatar dependabot[bot] avatar developer3027 avatar dreamvenerable avatar eduardo06sp avatar edwinthinks avatar egemen-dev avatar erinclaudio avatar garyhtou avatar heyapricot avatar jadekstewart3 avatar jmilljr24 avatar jp524 avatar kasugaijin avatar marlena-b avatar mononoken avatar moosecowbear avatar nsiwnf avatar overlandcoder avatar phonghpham avatar ptrboro avatar sparshalc avatar thrillberg avatar tomaszabc avatar yuricarvalhop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pet-rescue's Issues

System tests in CI test-suite run excluded

I noticed that in our GitHub actions workflow file here is not running the system tests. To run these system tests you have to specify to include them or run them seperately via rails test:system. Whereas, rails test just runs the non-system test suite.

Add pundit gem

We want to make use of the pundit gem. Please add it to the Gemfile, run the install command, and familiarize yourself with it (whoever takes this ticket de facto becomes our pundit authority!).

For context, we imagine using this to distinguish between three different roles, listed here in increasing levels of access:

  • adopter - the end users
  • staff - the people who work at the organization's rescue
  • admin - the people who work on the code of the app (ie, Ben and RfG folks)

Remove active admin

We're currently using a gem, active_admin, which is deemed to be more trouble than it's worth. We would like to remove this gem. In a future issue, we can spell out how to replace it with something more suited to our needs.

Vaccine Reminder Mailer V1

What

Email adopters after they've adopted a pet to remind them about vaccines.
Ex.

Congrats on [pet]'s adoption!

Hope everything's going well! This is just a reminder to make sure [pet]'s vaccinations are up to date.

Have a great day!

Why

Reduce the burden of post-intake/post-adoption follow-up by sending out an automated reminder about pet vaccines.

Clarify form validation

Can we leverage StimulusJS to show form validation in real time as people fill out forms and add asterisks where necessary? We need these changes on the adopter_profile and adoption_application.

Address deprecation warning regarding SASS

When you run rails test:system you are presented with this SASS related deprecation error:


To preserve current behavior: $weight * 1%

More info: https://sass-lang.com/d/function-units

    β•·
201 β”‚   @return mix(rgba($foreground, 1), $background, opacity($foreground) * 100);
    β”‚           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    β•΅
    ../../.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootstrap-5.2.0/assets/stylesheets/bootstrap/_functions.scss 201:11            opaque()
    ../../.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootstrap-5.2.0/assets/stylesheets/bootstrap/mixins/_table-variants.scss 4:28  table-variant()
    ../../.asdf/installs/ruby/3.1.1/lib/ruby/gems/3.1.0/gems/bootstrap-5.2.0/assets/stylesheets/bootstrap/_tables.scss 147:3                @import
    _bootstrap.scss 20:9                                                                                                                    @import
    app/assets/stylesheets/application.scss 17:10                                                                                           root stylesheet

Update README

Some things to include:

  • What skills we're looking for (StimulusJS, anything else?)
  • More info about Ruby for Good
  • How to contribute
  • Review setup, make sure it works
  • Anything else you want to add!

Replace 'dog' with 'pet' throughout codebase

This codebase was originally intended only for dog adoption but at Ruby for Good, we're extending it to apply to any pets that can be adopted. The task here is to replace all instances of 'dog' with 'pet'. Global find might come in handy.

Utilize internationalization (i18n)

It would be a good practice to use i18n to replace hard-coded texts and make html files more readable. And this would also allow us to support multiple languages in the future for different organizations.

Create an onboarding issue

Create an issue that folks joining the project can complete to ensure they are able to get through the development lifecycle (set up env, make a git commit, open PR, merge, deploy) and make their first contribution.

Fix User tables db schema

We want users to have only email and password (as in Devise) and put other fields (names) on a persons table. Other fields (currently on profile) will later get moved out of person record onto some sort of form response table.

Also have a roles or positions table associated to a person, in which we store staff vs adopter etc.

Vaccine Reminder Mailer V2: Based on Checklist Assignments

What

Depends on completion of issues #76 and #82

Send a reminder based on all checklist_assignment items.

Ex.

Congrats on [pet]'s adoption!

Hope everything's going well! This is just a reminder on tasks related to [pet].

- Make sure vaccinations are up to date.
- assignment 2.
- assignment 3.

Have a great day!

Why

(Further) reduce the burden of post-intake/post-adoption follow-up by sending out an automated reminder about pet vaccines adhering to the Organization's processes

New checklist related tables

  1. Create a checklist_template table for dynamically creating a checklist for a match
    see #73

  2. Create a checklist_assignments table for tracking the events associated with a match ex. vaccination reminder, adoption event reminder.
    -checklist_assignment
    -- description
    -- due_date
    -- status

Add multitenancy

We want this app to be available to multiple organizations. The goal of this issue is just to establish the bare minimum of multitenancy.

  • Use the acts_as_tenant gem.
  • Figure out how to handle switching between organizations in development.
  • For later (a separate issue): figure out deployment (probably on Heroku)

Enter birthdate for pets instead of saving age as a string

Currently we save a string for a pet's age. This will get out of date. Please prompt the user to enter a birthdate instead but be sure to add verbiage about letting them be approximate (not precise to the day since many people might not know the date itself).

new form-related tables

submission_templates
questions
submission_template_questions (join table)

for orgs building their own forms

rename application to submission (application is a reserved word) #75

Refactor how we store size/weight for pets

Currently the size column on Pets table is a string that is populated with pre-determined ranges in a form select. This should be refactored. The column name should be weight with json data type. Then pet.weight would become a hash { "from" => '10', "to" => '15', "unit" => "lb"} and we should have inputs for these three key value pairs in the pet CRUD form.

See below for acceptance criteria.

Complete your first issue!

What

When an Adopter submits an application for a pet, they see a notice "Application submitted! ..."

Add a fun message to append to this. Ex.
Screen Shot 2023-07-25 at 7 15 30 PM

Why

This is a beginner-friendly change to get started with contributing to pet-rescue.

Add basic Access Control (AC) spreadsheet link in README so it is clear what tools we have, who has access to them, and who can invite

I've found that it gets really complicated to keep track of who has access to what and who has the ability to invite others without having some basic process around it. Since we are starting somewhat fresh, it is good to start keeping track of our infrastructure, tools, and etc using a google sheet.

A link to a basic google sheet with only read-access should be sufficient to start. In the spreadsheet, you'll see details:

  • Tool name
  • Purpose
  • Owner(s) / Invite Access
  • Members

It should be the case that when we add or remove people from tools that we do our best to update this.

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.