Kizr / itt-mentor-services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ITT mentor services

This application has two main services:

  • A service where schools or training providers can claim funding for internal teacher training.
  • TODO: Add description for the other service

Live Environments

Name URL Purpose AKS Namespace
Production pending Public site bat-production
Sandbox pending Demo environment for end-users bat-production
Staging pending For internal use by DfE for testing - Production-like environment bat-staging
QA Track & Pay / School Placements For internal use by DfE for testing - Automatically deployed from main bat-qa

Setup

Prerequisites

This project depends on:

asdf

Most dependencies are defined in the .tool-versions file and can be installed using asdf (or a compatible alternative like mise).

To install them with asdf, run:

# The first time
brew install asdf # Mac-specific
asdf plugin add nodejs
asdf plugin add ruby
asdf plugin add yarn
asdf plugin add azure-cli
asdf plugin add jq
asdf plugin add kubectl
asdf plugin add kubelogin
asdf plugin add python
asdf plugin add terraform

# To install (or update, following a change to .tool-versions)
asdf install

Homebrew

You'll also need a couple of packages which asdf can't reliably install. (For some reason asdf installs them as unsigned binaries, so they won't run on macOS.)

Install them using Homebrew:

brew install cmake pkg-config graphviz

Finally, you will need a running Postgres 16 server. You can install it with Homebrew by running:

brew install postgresql@16

Linting

To run the linters:

bin/lint

Intellisense

solargraph is bundled as part of the development dependencies. You need to set it up for your editor, and then run this command to index your local bundle (re-run if/when we install new dependencies and you want completion):

bin/bundle exec yard gems

You'll also need to configure your editor's solargraph plugin to useBundler:

+  "solargraph.useBundler": true,

How the application works

We keep track of architecture decisions in Architecture Decision Records (ADRs).

We use rladr to generate the boilerplate for new records:

bin/bundle exec rladr new title

GOV.UK Notify

The application requires you to add your API key for GOVUK_NOTIFY_API_KEY, to gain access to this service ask your team lead to invite you to GOV.UK Notify.

Once you have access, navigate to API integration -> API Keys -> Create an API Key

Name your key in a sensible and identifiable way, e.g. [YOUR-NAME] Local Test Key and set the type of key to Test.

Create your key and then add it to .env.test and .env.development where it says GOVUK_NOTIFY_API_KEY=.

Running the app

To run the application locally:

  1. Run yarn to install dependencies for the web app to run
  2. Run bin/setup to setup the database
  3. Run bin/dev to launch the app on http://localhost:3000

Seed Data

To run the seed data to generate the following:

  • Persona
    • Anne Wilson - School
    • Patricia Adebayo - University
    • Mary Lawson - Multi-org
    • Colin Chapman - Support
  bin/bundle exec rails db:seed

About


Languages

Language:Ruby 74.9%Language:HTML 21.4%Language:SCSS 1.6%Language:HCL 0.7%Language:Makefile 0.5%Language:JavaScript 0.5%Language:Dockerfile 0.3%Language:Shell 0.1%