The frontend portion of the Court Administration Scheduling System. The API for the Court Administration Scheduling System can be found here; Court Administration Scheduling API
This project is based on the Sheriff Scheduling Frontend. Although this project is not (can't be) a direct fork of the Sheriff Scheduling Frontend, the commit history was retained to make it easy (although not quite as easy as a PR) to share changes between the projects.
This project was done with a very limited budget and timeline as a POC/Demo, as such it may still contain references to the term sheriff
.
At it's core this (and the parent project) is a scheduling application that does not need to be fixed as a domain specific application.
Give more time and budget, the scheduling features and UX of the Sheriff/Court Administration Scheduling System should be developed into a more generic application that can be configured (through deployment (preferably) and/or build configuration) to act as a scheduling system for any domain that would benefit from scheduling features provided by the application. Alternatively it could be developed into a multi-tenant/domain system to service multiple business areas within a single application.
The notes on the projects architecture as well as other development notes can be found in the Project Docs
- Install the following:
- Mac Users
- Install Homebrew
- Use Homebrew to install watchman
brew install watchman
- Clone Repo
- Install Dependencies
- Run
yarn
in the root of the project
- Run
The development scripts for this application allow customization via an environment file in the root directory called .env.local
. If this file is present, it will be used to override environment variables for the development environment. Here's an example of the environment variables that can be overridden (and their default values):
# Location to proxy API Traffic
API_URL="https://frontend-apndkr-dev.pathfinder.gov.bc.ca/"
# Fake Siteminder Header Overrides
SMGOV_USERGUID='SOMEGUIDGOESHERE'
SMGOV_USERDISPLAYNAME='Name, Your'
SMGOV_USERTYPE='user'
SMGOV_USERIDENTIFIER='yname'
if you had an instance of the api in minishift you can change your API_URL
to point your development frontend at that instance instead of our running dev instance in pathfinder for instance your .env.local
might contain:
API_URL="https://api-dev.192.168.99.100.nip.io/"
SMGOV_USERGUID='bnye'
The following commands support various development scenarios and needs.
yarn start
Runs the webpack-dev-server in conjuction with a fake siteminder proxy to facilitate proxying API traffic to the url specified by the
API_URL
environment variable. (See Environment Variables).
Open http://localhost:8000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
yarn start:dev
The same as
yarn:start
however overrides the API_URL to point at a development instance of the API at its default port http://localhost:3001. Note: you must be running the API Project concurrently.
yarn test
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
yarn update-api
Upates cass-api package to the most recent version.
yarn storybook
Starts the Storybook dev server which operates on http://localhost:6006
CURRENTLY BROKEN
These commands are here to support the continuous integration and other esoteric development concerns. You should rarely need to run these commands.
yarn build
Builds the app for production to the
build
folder.
It bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes. Your app is ready to be deployed!
See the section about deployment for more information.
yarn prepare
This command is automatically run by yarn/npm after an install operation. In our projects case, it runs
patch-package
to address any shortcomings of packages that we are currently using.
yarn build-storybook
Bundles up the storybook application so that it could be deployed (for documentation purposes).
Ensure the latest version of VS Code and VS Code Chrome Debugger Extension is installed.
The launch.json
is already configured with a launch task that allows you to launch chrome in a debugging capacity and debug through code within the editor.
Start your app by running yarn start
, and start debugging in VS Code by pressing F5
or by clicking the green debug icon. You can now write code, set breakpoints, make changes to the code, and debug your newly modified code—all from your editor.
.vscode/ - VSCode Configuration
config/ - React/Babel/Typescript configuration
└── jest - Jest testing configuration / transforms
docs/ - Project Documentation
└── images
└── icons
openshift/ - OpenShift-specific files
├── scripts - helper scripts
└── templates - application templates
public/ - Public HTML Assets (see )
scripts/ - Build, dev and test scripts
src/
└── app - Root of the front end application
└── api - temporary location for mock api
└── components - basic components
└── containers - container components (i.e using redux/state)
└── infrastructure - Utilities
└── modules - modules represent domain specific components, containers and state
└── sheriffs - deals with sheriffs
└── tasks - deals with sheriff tasks
└── pages - pages that can be accessed through navigation
└── store - the redux store and root reducer setup
└── libs - A place for holding additional typescript definition (d.ts) files
└── server - Eventual resting place of a server for the frontend (if we create one)
See OpenShift Readme
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.
Todo Put links to third party libraries and licenses here
Copyright 2016 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.