Hired Equipment Tracking System
Switch branches/tags
Nothing to show
Clone or download
plitton Merge pull request #1196 from plitton/master
Final release 1.0 fixes
Latest commit 0082676 Nov 19, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.s2i/bin Disable parallel restore Dec 22, 2017
Backup Added Clare and Karsten to default user list Oct 18, 2018
Client Merge branch '1.0' Nov 19, 2018
Common HETS-869 - Favourites should be stored on a per-district basis Nov 19, 2018
Db Scripts HETS-869 - Favourites should be stored on a per-district basis (updat… Nov 19, 2018
FrontEnd HETS-830 - Owners Status Letter Fails to Create Nov 10, 2018
Jenkins HETS-625: Add backup script, openshift and Jenkins components to HETS Mar 22, 2018
Pdf HETS-824 - BVT-Corrections to Seniority List PDF Nov 14, 2018
Server HETS-869 - Favourites should be stored on a per-district basis Nov 19, 2018
SiteMinder-Proxy/conf.d Merge remote-tracking branch 'upstream/master' into HETS-43 Jan 25, 2017
UserManual Added Rental Agreement PDF and Updated the TOC Mar 20, 2018
functional-tests Update test scripts Mar 21, 2018
openshift Updated openshift service configurations Nov 14, 2018
sonar-runner remove SNYK scan Feb 24, 2018
zap HETS ZAP Session files needed for authenticated scan Feb 24, 2018
.gitattributes Update deployment templates and parameters. Jan 4, 2018
.gitignore Refactoring Hets from a Code first to Model first solution (wip) Aug 27, 2018
CODE_OF_CONDUCT.md Initial repository setup Jan 6, 2017
CONTRIBUTING.md Initial repository setup Jan 6, 2017
Hets.sln HETS-678 - Error when creating/updating anything Sep 20, 2018
LICENSE Initial commit Jan 6, 2017
README.md Attempting to fix 500 error in PDF Server Jan 10, 2018
dotnet_imagestreams.json Hets build configuration changes (dotNet 2.0 to 2.1) Sep 13, 2018
frontend.Dockerfile Adjust permissions after build Dec 22, 2017
package-lock.json HETS-830 - Owners Status Letter Fails to Create Nov 10, 2018
server.Test.Dockerfile HETS-159 adjustments to config files Mar 7, 2017
test.bat Sonar-Runner files added Jan 24, 2018

README.md

Hired Equipment Tracking System (HETS)

Introduction

The BC Ministry of Transportation's Hired Equipment Program is for owners/operators who have a dump truck, bulldozer, back hoe or other piece of equipment they want to hire out to the Transportation Ministry for day labour and emergency projects. The Hired Equipment Program distributes available work to local equipment owners. The program is based on seniority and is designed to deliver work to registered users fairly and efficiently through the development of local area call-out lists.

The Hired Equipment Tracking System (HETS) is currently a part of BC Bid. However, the current version of BC Bid is being replaced by a new version at the end of Fiscal 16/17 and the new version will not include support for the HETS program. As such, a Project is underway to replace the current HETS with a new implementation.

The application is being developed as an open source solution.

Repository Map

  • ApiSpec: The API Specification, in OpenAPI (Swagger) format. This folder also includes a system to create the OpenAPI files from Excel format input, as well as test data.
  • Client: The javascript source for the user interface
  • Common: A library of common methods used by various components
  • FrontEnd: The Front End server that hosts static content and proxies the API
  • Jenkins: Jenkins configuration data
  • openshift: OpenShift templates
  • PDF: A microservice for PDF rendering
  • Server: The API Server

Installation

This application is meant to be deployed to RedHat OpenShift version 3. The full application will require 8 Cores of CPU and at least 8 GB of RAM, plus sufficient Persistent Volume storage for the database and configuration secrets.

Two OpenShift templates are provided, one for the build and one for the deploy. Full details are here: OpenShift

Developer Prerequisites

Client

  • Node.js
  • Text editor such as Sublime Text or VI

Server

  • .Net Core SDK (.NET Core App 2.0 is used for all components)
  • Node.js
  • .NET Core IDE such as Visual Studio
  • PostgreSQL 9.4 or newer

DevOps

  • RedHat OpenShift tools
  • Docker
  • A familiarity with Jenkins

Development

Client Code The client code is tested using a Node.js application. Node.js is also used to build the client code into the deployable JavaScript application.

Run npm install from the Client directory to configure the Client build environment

The frameworks used for this application are React/Redux.

API Services

  • Create a local postgres database that you will use for development purposes
  • Edit the project launch settings such that the same environment variables set during deployment are set on your development environment
  • Run the code in Development mode, which will allow you to get a Developer Token allowing the application to run outside of a BC Government SiteMinder authenticated environment.
    • SiteMinder - a centralized web access management system that enables user authentication and single sign-on, policy-based authorization, identity federation, and auditing of access to Web applications and portals.
  • A developer token is obtained by going to the following url, where is a valid SiteMinder UserId field in the database.
    • /api/authentication/dev/token?userid=<UserId>
  • The MicroService "PDF" requires an instance of the "Server" component in order to be tested. However you can run both applications at once on the same computer, with each running on different TCP ports. Configure the [Environment Variables] with appropriate settings for each service.

Code Generation A large part of this application was generated through a custom [Swagger Codegen extension] (https://github.com/bcgov/Swagger-Codegen-Extension). A custom Swagger Editor was also used to validate the OpenAPI format files that form the API specification.

Generated sections in the code include:

  • Controllers
  • Services
  • Models
  • ViewModels

The generated model was then used to construct the database through the use of Entity Framework.

SonarQube

SonarQube is a code quality service that helps identify problem areas in code through static analysis.

A batch file is provided in the Server code directory that can be used to run SonarQube code analysis on the API Server code.

Before running this batch file, sonar.bat, ensure that you have a valid SonarQube account (can be your GitHub account once registered with SonarQube.com) and that your SonarQube token is installed properly on your computer. You will also need the SonarQube Scanner for C# to be installed on your local computer.

The file sonar.bat will start the SonarQube scanner, execute a build, and stop the scanner. You may then go to the SonarQube.com website to view the results of the scan.

Viewing the Database

This application utilizes the SchemaSpy OpenShift image to provide an easy way for stakeholders to view the database schema. The SchemaSpy component is a self contained schema viewer application that can be rapidly deployed to analyze the database structure and provide a website to review details of the database.

Contribution

Please report any issues.

Pull requests are always welcome.

If you would like to contribute, please see our contributing guidelines.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

Copyright 2017 Province of British Columbia

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at 

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Maintenance

This repository is maintained by BC Ministry of Transportation. Click here for a complete list of our repositories on GitHub.