Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

A demonstration of how ID and Wage validation can be done!

Notifications You must be signed in to change notification settings

usdigitalresponse/papua-id-demo

Repository files navigation

ARCHIVED As of 1/19/2021, this project is no longer actively maintained.

Introduction

This is a Rails application which demonstrates a system for allowing claimants to initiate and manage unemployment claims, and for customer service representatives to process claims.

Prerequisites

  • rvm
  • Ruby 2.7.1: rvm install "ruby-2.7.1"
  • The Foreman gem: gem install foreman
  • Node and NPM: sudo apt update && sudo apt install nodejs npm
  • Webpack: npm install --save-dev webpack && npm install --save-dev webpack-cli
  • Postgres: sudo apt update && sudo apt install postgresql postgresql-contrib on Ubuntu
  • Create a Postgres user for the app to run as. One example for how to do this:
    • sudo -u postgres psql -c "CREATE USER papua WITH PASSWORD 'papua';"
    • sudo -u postgres psql -c "ALTER USER papua WITH SUPERUSER;"
  • Redis: sudo apt update && sudo apt install redis-server on Ubuntu

Setup

  • Clone this repo (e.g. git clone [email protected]:usdigitalresponse/papua-id-demo.git)
  • Change to the repo directory: cd papua-id-demo
  • Install Ruby dependencies: bundle install
  • Install Yarn dependencies: yarn install --check-files
  • Create a config/database.yml file (cp config/database.yml.example config/database.yml)
  • Edit config/database.yml to add info to default section:
    • username: papua
    • password: papua
    • host: localhost
  • Create the database: rake db:create
  • Run database migrations: rails db:migrate
  • Set up Rails credentials:
    • Request a copy of the master.key file from another team member
    • Store master.key in the config directory- it should be in the same folder as credentials.yml.enc
  • Add sample seed data to the database by running rails db:seed
  • Start the rails server using Foreman: foreman start
  • Visit http://localhost:5000/ to see the server running!

Testing

There are no automated tests at this time, as this is "just a demo." You can, of course, start the service and test it manually.