Skip to content

pieforproviders/pieforproviders

Repository files navigation

CI

CI

Pie for Providers

All Contributors

We help child care providers and families claim the government funding for which they are already eligible.

Code of Conduct

Please note we have a code of conduct, please follow it in all your interactions with this project.

Why You Should Contribute

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

Important URLs



Architecture
  • ERD/Database Planning Diagram

  • 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

Prerequisites

Optional

Procedure

  • 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 the DEVISE_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

Running the App

You have several convenient options for running the app locally.

  1. Rake task (requires heroku cli)
    • rails start
    • This spins up both the front end and the back end in the same terminal window
  2. Foreman (requires foreman)
    • Run foreman start
    • This spins up both the front end and the back end in the same terminal window
  3. Without Foreman or Heroku
    • Start rails in one terminal: rails s -p 3001
    • Open a second terminal and start react: cd client && yarn start

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

API

  • bundle exec rspec or bundle exec guard to watch

Frontend

  • yarn test (auto-watch) or yarn test-once to run the suite one time only

End to End

  • yarn run cy:ci from the root directory

Interactive End to End

  • yarn start-server in one terminal (make sure rails is not currently running)
  • yarn run cy:open in another terminal

Development guidelines

See CONTRIBUTING.md


Troubleshooting and FAQs

Login Issues

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

Postgres

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!

XCode

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

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Arun Kumar Mohan

πŸš‡ ⚠️ πŸ“– πŸ’»

nemiasalc56

πŸ’»

Jon Trainor

πŸ’» πŸ“– ⚠️

Rahman

πŸ’»

Jesse

πŸ’»

Nora Harris

πŸ’» πŸ“–

Sasha

πŸ’»

Andrew Harrison

πŸ’»

Ashley Engelund

πŸ’» πŸ“– ⚠️

carolinekinnen

πŸ“–

Jess-White

πŸ“– πŸ’» ⚠️

Hunter Marcks

πŸ’»

Loren

πŸ’» ⚠️

Nneka Udoh

πŸ’» ⚠️

Jordan Witte

πŸ’» ⚠️

cjhaddad

πŸ“– πŸ’» ⚠️

csprayregen

πŸ“– πŸ’Ό πŸ€” πŸ“† πŸ‘€ 🌍

Kate Donaldson

πŸ“– ⚠️ πŸ’» πŸ“† πŸ€” πŸ‘€

rebeccakarasiktw

πŸ“– πŸ€” πŸ““ 🎨 🌍 πŸ‘€ πŸ“† πŸ–‹

JonErvin

πŸ“– πŸ”£ πŸ‘€ ⚠️

joseluisrangel-dataheim

πŸ“– πŸ”£ πŸ‘€ ⚠️

J.T. Bassett

πŸ“– πŸ”£ πŸ‘€ ⚠️

jacqzwy

πŸ“– πŸ”£ πŸ‘€ ⚠️ πŸ’»

Abbie

🎨

dragonbone81

πŸ’» ⚠️

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

About

We help child care providers and families claim the government funding for which they are already eligible.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

Languages