Skip to content

Commit

Permalink
Merge pull request bcgov#285 from WadeBarnes/design-docs
Browse files Browse the repository at this point in the history
Add high level architectural diagrams
  • Loading branch information
WadeBarnes authored Mar 8, 2024
2 parents f780eb2 + e93d59e commit 7a5025a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ Refer to [Running the Application on Docker](./docker/README.md) to details.

The OpenShift build and deployment configurations for the project can be found here; [bcgov/supreme-court-viewer-configurations](https://github.com/bcgov/supreme-court-viewer-configurations)

## High Level Architecture

![Court Viewer Application](./doc/diagrams/Court%20Viewer.drawio.svg)

### API Documentation

For high level View API documentation refer to the diagram above. For details, refer to the [router](./web/src/router/index.ts) and [view components](./web/src/components/) source code.

For backend API documentation refer to the Swagger API documentation page available at the `api/` endpoint of the running application. For example, if you are running the application locally in docker, the Swagger page can be found at https://localhost:8080/scjscv/api/. Refer to [Running in Docker](#running-in-docker) section for details.

## Getting Help or Reporting an Issue

To report bugs/issues/feature requests, please file an [issue](../../issues).
Expand All @@ -21,5 +31,5 @@ To report bugs/issues/feature requests, please file an [issue](../../issues).

If you would like to contribute, please see our [CONTRIBUTING](./CONTRIBUTING.md) guidelines.

Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
Please note that this project is released with a [Contributor Code of Conduct](./CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms.
4 changes: 4 additions & 0 deletions doc/diagrams/Court Viewer.drawio.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 7 additions & 5 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ To get full usage information on the script, run:
```
./manage -h
```

## Building the Images

The first thing you'll need to do is build the Docker images.
The first thing you'll need to do is build the Docker images.

To build the images, run:
```
Expand All @@ -27,6 +27,8 @@ To start the project, run:

This will start the project interactively; with all of the logs being written to the command line. Press `Ctrl-C` to shut down the services from the same shell window.

Any environment variables containing settings, configuration, or secrets can be placed in a `.env` file in the `docker` folder and they will automatically be picked up and loaded by the `./manage` script when you start the application.

## Stopping the Project

To stop the project, run:
Expand All @@ -40,6 +42,6 @@ Since the services are started interactively, you will have to issue this comman

## Using the Application

- The main UI is exposed at; http://localhost:8080/
- The API is available at; http://localhost:8080/api
- The API is also exposed directly at; http://localhost:5000/api
- By default, the main developer UI is exposed at; https://localhost:8080/scjscv/
- The Swagger API and documentation is available at; https://localhost:8080/scjscv/api/
- Which is also exposed directly at; http://localhost:5000/api/
14 changes: 10 additions & 4 deletions docker/manage
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ build-web() {
-f './nginx-runtime/Dockerfile' './nginx-runtime/'
echo -e "===================================================================================================="

# Apparently vue-cli-tools wants WEB_BASE_HREF -> vue.config.js -> publicPath at compile time.
# I tried using __webpack_public_path__, but the CSS file path and JS file path weren't correctly updated.
# Also note we don't load in environment variables from the arguments here.
# Apparently vue-cli-tools wants WEB_BASE_HREF -> vue.config.js -> publicPath at compile time.
# I tried using __webpack_public_path__, but the CSS file path and JS file path weren't correctly updated.
# Also note we don't load in environment variables from the arguments here.
echo -e "\n\n===================================================================================================="
echo -e "Building the scv-web-artifacts image using s2i ..."
echo -e "----------------------------------------------------------------------------------------------------"
Expand Down Expand Up @@ -143,6 +143,12 @@ build-web-dev() {
}

configureEnvironment () {

if [ -f .env ]; then
echo -e "\nLoading environment variables from .env ...\n"
source .env
fi

for arg in $@; do
case "$arg" in
*=*)
Expand All @@ -156,7 +162,7 @@ configureEnvironment () {
export POSTGRESQL_USER=${POSTGRESQL_USER:-scv}
export POSTGRESQL_PASSWORD=${POSTGRESQL_PASSWORD:-jeKEumGzuRVY4EJyfcUk}
export POSTGRESQL_ADMIN_PASSWORD=${POSTGRESQL_ADMIN_PASSWORD:-yM%J]7RZgY@!zb=*#4kB}

# scv-web
export API_URL=${API_URL-http://api:5000/api/}
export WEB_BASE_HREF=${WEB_BASE_HREF-/scjscv/}
Expand Down

0 comments on commit 7a5025a

Please sign in to comment.