An Angular front-end for Core Case Data
# 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.
The following environment variables are required:
Name | Description |
---|---|
IDAM_LOGIN_URL | URL for IdAM's login web page. https://idam.dev.ccidam.reform.hmcts.net/login for the dev instance. |
CCD_GATEWAY_BASE_URL | Base URL for CCD API gateway. https://case-api-gateway-web.dev.ccd.reform.hmcts.net for the dev instance. |
CCD_ACTIVITY_BASE_URL | Base URL for CCD Case Activity service. https://case-activity-api.dev.ccd.reform.hmcts.net/health for the dev instance. |
DM_GATEWAY_BASE_URL | Base URL for Document Management gateway. https://api-gateway.dev.dm.reform.hmcts.net for the dev instance. |
Environment variables:
Name | Description |
---|---|
CCD_ACTIVITY_NEXT_POLL_REQUEST_MS | Frequency 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_RETRY | Number of attempts in case of unsuccessful calls to Activity service |
CCD_ACTIVITY_MAX_REQUEST_PER_BATCH | Max 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_MS | Max delay before a batch activity call is issued. |
The project uses yarn.
To install dependencies please execute the following command:
yarn install
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.
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
.
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.
- single run:
yarn test
- live mode (TDD style):
yarn test-watch
See docs here
To build your application, run:
yarn build
You can now go to /dist
and deploy that to your server!
You can generate api docs (using TypeDoc) for your code with the following:
yarn docs
This project is licensed under the MIT License - see the LICENSE file for details.