Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 4.73 KB

README.md

File metadata and controls

105 lines (71 loc) · 4.73 KB

Hire The Pivot

The reverse job board for second career developers.

hirethePIVOT homepage

hirethePIVOT empowers second career developers to find their next work. It is built on the idea that developers from previous careers bring pivot skills to their work, that is experiences and proficiencies that complement their technical skills.

This initiative is built with the work of Joe Masilotti from railsdevs.com. I am grateful for his work, building in open source, and his support.


Getting started

Requirements

You will need a few non-Ruby packages installed. Install these at once via:

brew bundle install --no-upgrade

...or manually:

  • Ruby 3.1.0
  • libpq - brew install libpq
    • libpg is needed to use the native pg gem without Rosetta on M1 macs
  • postgresql - brew install postgresql
  • node - brew install node
  • Yarn - brew install yarn
  • Redis - brew install redis
  • Imagemagick - brew install imagemagick
  • Stripe CLI - brew install stripe/stripe-cli/stripe
  • foreman - gem install foreman

You will also need Google Chrome installed to run the system tests.

Initial setup

An installation script is included with the repository that will automatically get the application setup.

bin/setup

Development

Run the following to start the server and automatically build assets.

  • Requires foreman or overmind
  • Requires stripe
bin/dev

Seeds

Seeding the database, either via rails db:seed or during bin/setup, creates a few accounts with developer profiles. Sign in to these with the following email addresses; all the passwords are password.

There is also a single business account, [email protected], that has an active subscription. Use this to test anything related to messaging.

Stripe

You will need to configure Stripe or do a mock configuration (ie set dummy values for the last step listed below) if you are working on anything related to payments.

  1. Register for Stripe and add an account
  2. Download the Stripe CLI via brew install stripe/stripe-cli/stripe
  3. Login to the Stripe CLI via stripe login
  4. Configure your development credentials
    1. Create a Stripe secret key for test mode
    2. Run stripe listen --forward-to localhost:3000/pay/webhooks/stripe in order to generate your webhook signing secret.
    3. Create a product with a recurring, monthly price
    4. Generate your editable development credentials file via EDITOR="mate --wait" bin/rails credentials:edit --environment development. You may need to install and provide terminal access to the editor first (mate, subl, and atom should all work). If you run the code above and receive the message "New credentials encrypted and saved", without having had the opportunity to edit the file first, things have gone astray. You will need to troubleshoot this step based on your OS and desired editor, to ensure you are able to edit the development.yml file before it is encoded and saved. See here for more details.
    5. Add the secret key, the price, and your webhook signing secret to your development credentials in the following format, and save/close the file:
stripe:
  private_key: sk_test_YOUR_TEST_STRIPE_KEY
  signing_secret: whsec_YOUR_SIGNING_SECRET
  price_id: price_YOUR_PRODUCT_PRICE_ID

New Relic

The site uses New Relic to monitor application performance. It is free to create an account on New Relic by visiting the sign up page. You will need to fetch your New Relic license key from the API keys section in your New Relic account, and adding it to your application credentials:

newrelic:
  license_key:

Administration

We use madmin to provide an administrative backend for hirethePIVOT. The route /madmin is scoped to admin accounts only. Once logged into an admin user account, you can visit the route to access the backend.

Testing

  • Run rails test to run unit/integration tests.
  • Run rails test:system to run system tests, using headless_chrome.
  • Run HEADFUL=1 rails test:system to run system tests, using headful_chrome.