Skip to content

agrc/parole-and-probation

Repository files navigation

parole-and-probation

Commitizen friendly

AP&P web application

Development

If you are using vscode, download the recommended extensions from this workspace.

website

React

  1. Change directories to the react App
    • cd src/ClientApp
  2. Using node lts get all of the project dependencies
    • npm install
  3. Duplicate src/ClientApp/.env to src/ClientApp/.env.local and add the correct values
  4. Start the development server
    • npm start

The offender feature service will not function since the reverse proxy dotnet service is not running.

asp.net core mvc

  1. Install the dotnet 8.0.* SDK

  2. Create an appsettings.Development.json file to overwrite and add properties to the appsettings.json file for development

  3. Add an ArcGIS property in appsettings.Development.json with the following properties filled out

    "ArcGIS": {
      "username": "",
      "password": "",
      "host": "dns.of.arcgis"
    },
  4. Add a ReverseProxy property in appsettings.Development.json with the address of the arcgis map service

    "ReverseProxy": {
       "Clusters": {
          "arcgis": {
          "Destinations": {
             "arcgis/destination1": {
                "Address": "https://arcgis/rest/services/the/MapServer"
             }
          }
          }
       }
    },
  5. Add a ConnectionStrings property to appsettings.Development.json with the connection string for the database

    "ConnectionStrings": {
       "DefaultConnection": "Server=;Database=;UID=;PWD=;Timeout=5;Encrypt=True;"
    },
  6. Set the client secret and id from the ApAdmin UtahId project credentials page from the /src folder

    dotnet user-secrets set "Authentication:UtahId:ClientId" "<client-id>"
    dotnet user-secrets set "Authentication:UtahId:ClientSecret" "<client-secret>"
  7. Start the application

  • You can debug with the Debug vscode launch profile or
  • dotnet run
  1. optionally run both the dot net and client apps by running npm run start:all from src/ClientApp

forklift

  1. From python 3 create a virtual environment
  • python -m venv .env
  1. Update pip
  • python -m pip install -U pip
  1. Install python requirements
  • pip install -r requirements.dev.txt
  1. Create api.py and database.py files from the templates in the vault folder

Deployment

website deployment

This website uses standard version and conventional commits. The changelog and versions are managed by conventional commit messages and semantic versioning.

GitHub action pipelines will deploy this application to the cloud.

forklift deployment

  1. Install python requirements to forklift environment
  • pip install -r requirements.txt
  1. Update secrets in the following files
  • Remove .template from vault\database.template.py
  • Remove .template from vault\api.template.py
  1. Create corrections database
  2. Run schema.sql to create the offenders table

logs

The logs for this project are sent to Stackdriver