https://github.com/agrc/parole-and-probation
A website for UDC parole officers to plan their visits
https://github.com/agrc/parole-and-probation
billable government-app terraform-managed website
Last synced: 7 months ago
JSON representation
A website for UDC parole officers to plan their visits
- Host: GitHub
- URL: https://github.com/agrc/parole-and-probation
- Owner: agrc
- License: mit
- Created: 2019-03-12T21:11:03.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-01-03T00:21:44.000Z (10 months ago)
- Last Synced: 2025-01-18T06:26:19.726Z (9 months ago)
- Topics: billable, government-app, terraform-managed, website
- Language: JavaScript
- Homepage: https://fieldmap.udc.utah.gov
- Size: 8.58 MB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# parole-and-probation
[](http://commitizen.github.io/cz-cli/)
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`
1. Using node lts get all of the project dependencies
- `npm install`
1. Duplicate `src/ClientApp/.env` to `src/ClientApp/.env.local` and add the correct values
1. 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 9.0.\* SDK](https://dotnet.microsoft.com/download/dotnet/9.0)
1. Create an `appsettings.Development.json` file to overwrite and add properties to the `appsettings.json` file for development
1. Add an `ArcGIS` property in `appsettings.Development.json` with the following properties filled out```json
"ArcGIS": {
"username": "",
"password": "",
"host": "dns.of.arcgis"
},
```1. Add a `ReverseProxy` property in `appsettings.Development.json` with the address of the arcgis map service
```json
"ReverseProxy": {
"Clusters": {
"arcgis": {
"Destinations": {
"arcgis/destination1": {
"Address": "https://arcgis/rest/services/the/MapServer"
}
}
}
}
},
```1. Add a `ConnectionStrings` property to `appsettings.Development.json` with the connection string for the database
```json
"ConnectionStrings": {
"DefaultConnection": "Server=;Database=;UID=;PWD=;Timeout=5;Encrypt=True;"
},
```1. Set the client secret and id from the ApAdmin UtahId project credentials page from the `/src` folder
```sh
dotnet user-secrets set "Authentication:UtahId:ClientId" ""
dotnet user-secrets set "Authentication:UtahId:ClientSecret" ""
```1. 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
1. Run [schema.sql](/scripts/schema.sql) to create the `offenders` table### logs
The logs for this project are sent to [Stackdriver](https://console.cloud.google.com/logs/viewer?project=ut-dts-agrc-parole-dev&resource=global&minLogLevel=0&expandAll=false&customFacets=&limitCustomFacetWidth=true&advancedFilter=resource.type%3D%22global%22%0AlogName%3D%22projects%2Fut-dts-agrc-parole-dev%2Flogs%2Fparole-api%22)