GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rubyforgood/partner: Partner and Companion App for the Diaper app

This repository was archived by the owner on Nov 6, 2021. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

743 Commits
743 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
app
app
 
 
bin
bin
 
 
ci
ci
 
 
config
config
 
 
db
db
 
 
lib
lib
 
 
log
log
 
 
public
public
 
 
spec
spec
 
 
storage
storage
 
 
tmp
tmp
 
 
vendor
vendor
 
 
.env.sample
.env.sample
 
 
.env.test
.env.test
 
 
.gitignore
.gitignore
 
 
.rspec
.rspec
 
 
.rubocop.yml
.rubocop.yml
 
 
.rubocop_todo.yml
.rubocop_todo.yml
 
 
.ruby-version
.ruby-version
 
 
.tool-versions
.tool-versions
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
Capfile
Capfile
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE
LICENSE
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
code-of-conduct.md
code-of-conduct.md
 
 
config.ru
config.ru
 
 
connecting-the-diaper-and-partner.md
connecting-the-diaper-and-partner.md
 
 
deploy_id_rsa_enc
deploy_id_rsa_enc
 
 
id_rsa.enc
id_rsa.enc
 
 
package.json
package.json
 
 
partner-and-diaper-connection-illustration.png
partner-and-diaper-connection-illustration.png
 
 
ubuntu-installation.md
ubuntu-installation.md
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

README

Build Status

This is the companion application to the diaper app. The diaper app is an inventory management system and this partner application handles the onboarding, approving, and handling of requests from diaper banks from their partners. Diaper banks do not distribute diapers directly to the public. They distribute diapers to partners like women's shelters, food pantries, homeless shelters, and other organizations.

The flow for partners being created, approved, and finally approved works as follows:

  1. A diaper bank enters a new partner into the the diaper application.
    • The diaper app sends a post request to the partner app containing organization_id, partner_id, and email. The organization id is the diaper bank id and the partner id is the partner id are the corresponding ids in the diaper app.
  2. On receiving this post request, the partner app immediately sends an email to the new partner inviting them to become a user.
  3. The new potential partner fills out the details on about their organization, uploads required documentations and then submits for approval.
    • A post request is sent to the diaper app updating the status of the partner to ready for review.
  4. The diaper bank reviews and approves the partner.
    • A get request is made to the partner app to grab the relevant partner information for review.
    • After review, a post request is made to the partner app changing their status to approved.
  5. The approved partner can now fill out requests for diapers to their diaper bank partner.
    • After a request is made, a post request is made to the diaper app containing the requested diapers.
  6. The diaper bank sees the request, approves it, and creates a distribution. Once the distribution is created, the partner gets an email notification stating their pick up date and a pdf copy of their invoice.

Development

There are detailed instructions for installation on Ubuntu hosts in the ubuntu-installation.md file. As of now, there are no detailed instructions for Mac installation, but if you have any problems, the Ubuntu file may shed some light on them.

Ruby Version

This app uses Ruby version 2.7.2, indicated in /.ruby-version and Gemfile, which will be auto-selected if you use a Ruby versioning manager like rvm or rbenv.

Database Configuration

This app uses PostgreSQL for all environments. You'll also need to create the dev and test databases, the app is expecting them to be named partner_dev and partner_test, respectively. This should all be handled with bundle exec rails db:setup.

Create your .env with database credentials

Be sure to create a .env file in the root of the app that includes the following lines (change to whatever is appropriate for your system):

PG_USERNAME=username
PG_PASSWORD=password

If you're getting the error PG::ConnectionBad: fe_sendauth: no password supplied, it's because you have probably not done this.

Optionally, you may add the following line to your .env file, which allows for specifying a database host other than the default of localhost:

PG_HOST=hostname

Seed the database

From the root of the app, run bundle exec rails db:seed. This will create some initial data to use while testing the app and developing new features, including setting up the default user.

Logging In

To login, use these default credentials provided in the seeds:

Verified Organization
  Email: [email protected]
  Password: password

Pending Organization
  Email: [email protected]
  Password: password

Connecting Diaper & Partner Apps Together Locally

Depending on the issues or features you decided to undertake, you may need to get both the diaper and partner app running locally. This is true if you want to build a feature that depends on code changes in both repositories.

Please follow this guide to get your local environment setup properly.

Testing

Run all the tests with:

bundle exec rspec

This app uses RSpec, Capybara, and FactoryBot for testing. Make sure the tests run clean & green before submitting a Pull Request. If you are inexperienced in writing tests or get stuck on one, please reach out so one of us can help you. :)

The one situation where you probably don't need to write new tests is when simple re-stylings are done (ie. the page may look slightly different but the Test suite is unaffected by those changes).

Feature specs

If you need to see a feature spec run in the browser, you can use the following env variable:

NOT_HEADLESS=true bundle exec rspec

Keep in mind that you need js to be enabled. For example:

describe "PickupSheet", type: :feature, js: true do

Deployment Process

Please follow the deployment instructions in the associated diaper application here

About

Partner and Companion App for the Diaper app

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

30 stars

Watchers

24 watching

Forks

68 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.