We help child care providers and families claim the government funding for which they are already eligible.
Please note we have a code of conduct, please follow it in all your interactions with this project.
We have a vision for equity and justice in the child care field. We know that technology is part of the solution - and that todayβs products do not meet the needs of most communities in this field. Weβre building the market for early childhood technology that educators, families and children deserve.
We need your help!
Pie for Providers helps small child care providers and families claim the government funding for which they are already eligible. Today, 85% of eligible children do not claim this funding. This means families struggle to afford care. This means mothers cannot advance their careers and support their families. This means child care providers - small, women-owned businesses - do not get paid for their work.
Letβs change that. Contribute to Pie for Providers today by picking up any of our help-wanted issues. You can also sponsor us via Github Sponsors!
Learn more at www.pieforproviders.com
- Staging: https://staging.pieforproviders.com/
Architecture
-
Backend: Rails
- SUPER IMPORTANT This is configured to use UUIDs for primary keys in the generators: rails/config/initializers/generators.rb
- Rubocop
- Data Migrations: https://github.com/ilyakatz/data-migrate
- RSpec
- SimpleCov
- Shoulda Matchers
- DatabaseCleaner
- FactoryBot
- Faker
- v1 API Routes returning JSON
- Postgres DB
-
Frontend: React
- ESLint/Prettier
- Jest/React Testing Library
- Redux
Local Setup (Direct Install)
for local development, we strongly recommend you use version managers to handle your dependencies, such as rvm
for ruby and nvm
for javascript
postgres
v12.3bundler
git
yarn
graphviz
- https://graphviz.org/download/XCode Select
tools if you're on Mac
heroku cli
- https://devcenter.heroku.com/articles/heroku-cli#download-and-installforeman
rvm
nvm
- clone the repo:
git clone git@github.com:pieforproviders/pieforproviders.git
- navigate to the app directory:
cd pieforproviders
- install bundler for gems:
gem install bundler
- install gems:
bundle install
- set up an environment file: copy
.env.sample
to.env
- configure Devise: run
rails secret
to generate a secret string, add it to.env
as theDEVISE_JWT_SECRET_KEY
value - create and seed the database:
bundle exec rails db:setup
- set up frontend environment file:
cd client && cp .env.sample .env && cd ..
- install front-end and end-to-end packages:
yarn install-all
You have several convenient options for running the app locally.
- Rake task (requires
heroku cli
)rails start
- This spins up both the front end and the back end in the same terminal window
- Foreman (requires
foreman
)- Run
foreman start
- This spins up both the front end and the back end in the same terminal window
- Run
- Without Foreman or Heroku
- Start rails in one terminal:
rails s -p 3001
- Open a second terminal and start react:
cd client && yarn start
- Start rails in one terminal:
Visit localhost:3000
to see the React frontend. π₯³
Using the application
You can create a new user account by visiting /signup
(or clicking "Sign Up" on the login page at the root).
When you create a new account, you should see a demo email pop up in a new tab; the link in this URL can't be clicked in local development. Instead, copy the path (starting with localhost
) and paste it into a browser window. This will confirm your user and automatically log you in.
Running tests
bundle exec rspec
orbundle exec guard
to watch
yarn test
(auto-watch) oryarn test-once
to run the suite one time only
yarn run cy:ci
from the root directory
yarn start-server
in one terminal (make sure rails is not currently running)yarn run cy:open
in another terminal
Troubleshooting and FAQs
Q: I keep getting redirected to the login screen when after I've created and confirmed my account
A: Make sure you've created a secret for DEVISE_JWT_SECRET_KEY
in .env
using rails secret
Q: I get postgres errors when I try to set up the database
A: Make sure Postgres is running on port 5432. Sometimes Postgres doesn't play nice depending on how you've installed it. If you're having trouble with Postgres, I strongly recommend Postgres.app
- you can install multiple versions and it plays nicer with rails.
Q: I'm on an m1 and gem install pg
fails
A: Make sure that your version of Postgres/Postgres.app was built on your m1. Versions of Postgres.app built on a previous machine and migrated to your m1 may still run, but lack the libpq
that you need to gem install pg
. Don't forget to backup/restore your existing databases if you have to upgrade versions of Postgres!
Q: I see the following error in my terminal: gyp: No Xcode or CLT version detected!
A: try removing and reinstalling XCode command line tools OR running xcode-select --reset
(see this github issue for more info)
Resources and further reading
Database Backups
- Important information can be found here: https://devcenter.heroku.com/articles/heroku-postgres-backups
- Database backups are kept in Heroku. It has been set to create daily backups at 2:00 America/New_York.
- You can list the existing backups by running:
heroku pg:backups -a pie-prod
- You download an specific database backup by running:
heroku pg:backups:download b050 -a pie-prod
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!