Git Product home page Git Product logo

partner's Introduction

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, instead 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

Ruby Version

This app uses Ruby version 2.5.3, 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.

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.

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

Verified Organization
  Email: [email protected]
  Password: password

Pending Organization
  Email: [email protected]
  Password: password

partner's People

Contributors

chaserx avatar cuongn265 avatar dacur avatar davidsth avatar fv42wid avatar josisusan avatar marcelkooi avatar pakosaldanaort avatar seanmarcia avatar tmr08c avatar

Watchers

 avatar

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.