Diaper banks don't distribute diapers directly to individuals, instead they distribute them to partner agencies who work directly with families. This diaper bank application we build (diaperbase) handles inventory management for diaper banks but is missing the component to handle the partner agencies.
This application is for the creation of partner agencies, collection of the partner agency details, allow the partners to enter details on the clients (the children receiving diapers), and for allowing partners to make diaper requests from their affiliated diaper bank.
-- Extracted from the notes of Sean
See https://github.com/rubyforgood/diaperpartner/wiki for a full description.
First create the .env with cp .env.docker-example .env
. You shouldn't have to make any changes to the .env file. Now set up the database with docker-compose run web rails db:setup
. This command may fail as postgres creates it's database on first run, just run it again.
Simply run docker-compose up web
and visit http://localhost:3001
-
Clone the repository by typing into the command line:
git clone git@github.com:rubyforgood/diaperpartner.git
-
Copy
.env.example
to.env
by runningcp .env.example .env
-
Update the Database URL to your username and password, and change
@postgres
to@localhost
Example: DATABASE_URL=postgresql://username:password@localhost:5432/diaperpartner?encoding=utf8&pool=5&timeout=5000
-
Run
rake db:setup
to create and migrate the database -
Run the rails server and go to
localhost:3000
note: To see local logs without using Docker, comment out the following lines in application.rb
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.log_tags = %i[subdomain uuid]
config.logger = ActiveSupport::TaggedLogging.new(logger)
From the root of the app, run bundle exec rake 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:
Organization Admin
Email: test@example.com
Password: password
Super Admin
Email: testadmin@example.com
Password: password