Skip to content

JyotiJaiswal169/innovation-service-transactional-frontend

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NHS Service Transaccional Frontend

NHS Service Transactional Frontend is a visual gateway to the NHS Innovation Service, in the transactional component. It will be used by the following user profiles: Unregistered Innovators Registered innovators Accessors

This project is build in JavaScript + TypeScript, with the Angular framework (angular.io), configured as Server Side Rendering ([angular.io/guide/universal](Angular Universal)).

Dependencies

  • Node
  • NPM

Installation

Set environment variables file

Name Required Default Possibilities Description
BASE_URL Yes
BASE_PATH /
API_URL Yes
LOG_LEVEL ERROR TRACE DEBUG INFO LOG WARN ERROR FATAL OFF
STATIC_CONTENT_PATH Yes
VIEWS_PATH Yes Path to browser directory
OAUTH_TENANT_NAME Yes
OAUTH_CLIENT_ID Yes
OAUTH_CLIENT_SECRET Yes
OAUTH_SIGNUP_POLICY Yes
OAUTH_SIGNIN_POLICY Yes
OAUTH_REDIRECT_URL_SIGNUP Yes
OAUTH_REDIRECT_URL_SIGNIN Yes
OAUTH_REDIRECT_URL_SIGNOUT Yes
OAUTH_SCOPE Yes
OAUTH_ALLOW_HTTP_REDIRECT Yes
SESSION_SECRET Yes

Create a new file ".env" file on the root's project with the above variables

Run the following commands:

npm install

Running the app

Development mode

npm run start:dev:spa # Run like a Single Page Application (client side)
npm run start:dev:ssr # Run like a Server Side Rendering

Building

npm run build:spa # Build like a Single Page Application (client side)
npm run build:ssr # Build like a Server Side Rendering

Output file will be on dist folder

Logging

There is a custom LoggerService that will log traces to AppInsights. To use it, you must inject it in the component you wish to create logs on:

class TheComponent {
  private loggerService: LoggerService;

  constructor(loggerService: LoggerService) {
    this.loggerService = loggerService;
  }

  ...

  someMethod() {
    this.loggerService.trackTrace('message', Severity.INFORMATION, {custom_prop: 'some value' });
  }
}

This service also exposes an enum with Severity levels.

enum Severity {
  VERBOSE = 0,
  INFORMATION = 1,
  WARNING = 2,
  ERROR = 3,
  CRITICAL = 4
}

Currently the only existing method is trackTrace which creates a trace log in AppInsights.

About

Transactional Frontend for the innovation service - https://innovation.nhs.uk

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE
MIT
MIT-LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 82.1%
  • HTML 15.4%
  • SCSS 2.3%
  • JavaScript 0.2%