Frontend for Hackney Tenancy Income Collection Service
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
app
bin
config
db
docs
lib
log
public
spec
tmp
vendor
.editorconfig
.env.test
.gitignore
.rspec
.rubocop.yml
.ruby-version
CODEOWNERS
Dockerfile
Gemfile
Gemfile.lock
LICENSE
Makefile
Procfile
README.md
Rakefile
app.json
config.ru
docker-compose.yml
guardfile
package.json

README.md

Hackney Income Collection Service

Development

Installation

  1. Install Docker Community Edition
  2. Run make setup

Serve the application

make serve

Run tests

make test

Run linter

"Linters" run static analysis on code to ensure it meets style standards. We use Rubocop on this project with a permissive configuration.

make lint

Adding gems

  1. Add your gem to the Gemfile.
  2. Run make bundle. This will update the Gemfile.lock, and rebuild the docker image.

Making changes

  1. Follow the instructions in Installation to get set up.
  2. Decide with your team on a small slice of work to pick up.
  3. Create a branch to work off. Name it appropriately. git checkout -b my-cool-feature
  4. Develop with TDD!
  5. Commit your changes.
  6. Check your code style is good and tests are passing using make check
  7. Make a pull request on the Github repo.
  8. Post a link in #team-collection-devs for review.
  9. Make any changes if necessary and get another review.
  10. Merge into master.
  11. Deploy to staging and test manually. Ask someone else to take a look as well, whether they're a developer, user or other team member.
  12. Deploy to production!

Deployment Pipeline

Deployment Pipeline

  1. Log in to CircleCI with Github and connect to the repo.
  2. Successful merges to the master branch are built automatically by CircleCI.
  3. After a successful build, the application is automatically released to staging.
  4. After manually reviewing on staging, when you're happy to release to production, click to permit.
  5. The application will be automatically released to production.

The configuration for releasing changes is in .circleci/config.yml

Infrastructure

The staging and production applications are hosted on Heroku. You will need to talk to Rashmi Shetty to get added as a collaborator to the apps.

Static IP addresses

To communicate with the Hackney API, which is hosted on premises, we need whitelisted static IP addresses for the Heroku instances outbound traffic. They are provided by QuotaGuard Static as a Heroku addon, you can find them in the addon config.

User Access

Users log in via their Hackney Active Directory account. In order to log in, the user will need to be added to the Manage Arrears-Azure group on Azure Active Directory. To get added to the group, contact one of the developers or maintainers on the contacts list.

There are three enterprise applications configured, one for each environment (dev, staging, production). These are all configured to use the same authentication group, so access to the group grants access to all environments.

Currently, users logging in will default to a base_user and will not be assigned cases.

Notifications

SMS messages are sent using Gov Notify. Templates are configured there, request access permission from a member of the team. Permitted variables are gathered from a tenancy reference by the application. They include:

  • title - Title of primary contact, e.g. "Mr."
  • first name - First name of primary contact, e.g. "Richard"
  • last name - Surname of primary contact, e.g. "Foster"
  • full name - Full name with title of primary contact, e.g. "Mr. Richard Foster"
  • formal name - Formal title and surname of primary contact, e.e. "Mr. Foster"

While developing, you can include yourself as a false tenancy to test communications by specifying the following environment variables:

DEVELOPER_TITLE=Miss
DEVELOPER_FIRST_NAME=Test
DEVELOPER_LAST_NAME=User
DEVELOPER_PHONE_NUMBER=01234 567890
DEVELOPER_EMAIL_ADDRESS=test@example.com

Scripts

  • rails stub_data:scheduled_tasks - Creates scheduled tasks for developer tenancies locally.

Contacts