Sign inSign up

hmcts/ccd-case-management-web

By hmcts

•Updated over 5 years ago

An Angular front-end for Core Case Data

Image
0

10K+

hmcts/ccd-case-management-web repository overview

⁠ccd-case-management-web

License: MIT Build Status Docker Build Status codecov Codacy Badge HitCount

An Angular front-end for Core Case Data.

⁠Quick start
# install the dependencies with Yarn
$ yarn install

# (Optional) start the stub API
$ yarn stub-api

# start the development server
$ yarn start

go to http://localhost:3451⁠ in your browser.

⁠Table of Contents

⁠Getting Started

⁠Prerequisites

⁠Environment variables

The following environment variables are required:

NameDescription
IDAM_LOGIN_URLURL for IdAM's login web page. https://idam.dev.ccidam.reform.hmcts.net/login for the dev instance.
CCD_GATEWAY_BASE_URLBase URL for CCD API gateway. https://case-api-gateway-web.dev.ccd.reform.hmcts.net for the dev instance.
CCD_ACTIVITY_BASE_URLBase URL for CCD Case Activity service. https://case-activity-api.dev.ccd.reform.hmcts.net/health for the dev instance.
DM_GATEWAY_BASE_URLBase URL for Document Management gateway. https://api-gateway.dev.dm.reform.hmcts.net for the dev instance.

Environment variables:

NameDescription
CCD_ACTIVITY_NEXT_POLL_REQUEST_MSFrequency of activity requests. A good setting for it is the value of ACTIVITY_TTL_SEC in the activity service backend (avoid setting it lower than ACTIVITY_TTL_SEC)
CCD_ACTIVITY_RETRYNumber of attempts in case of unsuccessful calls to Activity service
CCD_ACTIVITY_MAX_REQUEST_PER_BATCHMax number of cases activity requests batched in a single activity call. A good setting for it is the value of CCD_PAGE_SIZE
CCD_ACTIVITY_BATCH_COLLECTION_DELAY_MSMax delay before a batch activity call is issued

⁠Install dependencies

The project uses yarn⁠.

To install dependencies please execute the following command:

yarn install

⁠Running

Simply run:

yarn start

to start the Case Management app on http://localhost:3451⁠.

As an alternative, you can work using Hot Module Replacement (HMR):

  • yarn start:hmr

And you are all set! You can now modify your components on the fly without having to reload the entire page.

⁠Docker

If you want your code to become available to other Docker projects (e.g. for local environment testing), you need to build the app and then the Docker image:

yarn build
docker-compose build

You can run it by executing following command:

docker-compose up

As a result, the Case Management app will be started and made available on port 3451.

⁠Stubbing

To facilitate development, a stub of CCD Aggregated API can be used instead of a real instance. The stub API can be started with:

  • yarn stub-api

It will start a JSON-Server instance at http://localhost:3453, serving the content of the stubs/aggregated.api.json file.

⁠Testing

⁠1. Unit Tests
  • single run: yarn test
  • live mode (TDD style): yarn test-watch
⁠2. Smoke & Functional Tests

See docs here⁠

⁠Production

To build your application, run:

  • yarn build

You can now go to /dist and deploy that to your server!

⁠Documentation.

You can generate api docs (using TypeDoc⁠) for your code with the following:

  • yarn docs

⁠LICENSE

This project is licensed under the MIT License - see the LICENSE⁠ file for details.

Tag summary

Content type

Image

Digest

Size

72.5 MB

Last updated

over 6 years ago

docker pull hmcts/ccd-case-management-web