Skip to content

apspestana/cerberus-angular

 
 

Repository files navigation

cerberus-angular

Brand new Cerberus front-end implementation

Test Status

get started

dev environment

Current codebase is being developed with the following tools:

  • node 14.16.1 (node -v)
  • npm 6.14.12 (npm -v)
  • Angular 8.2.0 (ng version)
  • Typescript 3.5.3 (tsc -v)

For Linux and macOS, you can use nvm to install and use different versions of node through the command line (npm is included in node). For Windows, you can use nvm-windows.

To install Angular 8.2.0, run:

  • npm install -g @angular/cli@8.2.0
  • npm install -g @angular-devkit/build-angular@0.803.24
  • npm install -g @angular/compiler-cli@8.2.0
  • npm install -g @angular/language-service@8.2.0
  • npm install -g @angular/compiler@8.2.0

To install Typescript 3.5.3, run:

-npm install -g typescript@3.5.3

run

After your dev environment is all set up (see previous section), just do:

  • npm install
  • ng serve

If after running ng serve you get the error "You seem to not be depending on "@angular/core" and/or "rxjs". This is an error.", run npm link and try again.

installation guide

This application is secured by keycloak (https://www.keycloak.org).

You can both :

You just have to clone the repo and you're good to go. An internet connection is therefore necessary. NB: You must deploy the application on default port 4200 (only this URL is configured on the online keycloak)

  • connect it to a local Cerberus instance that you have to deploy locally

Please follow the instructions on cerberus-source repository (https://github.com/cerberustesting/cerberus-source/blob/master/INSTALL.tomcat) to deploy Cerberus and Keycloak on your local environment.

In cerberus-angular, edit environment.ts file with your corresponding URLs :

  • keycloak auth URL in the keycloakConfig object
// KEYCLOAK INFORMATION
let keycloakConfig: any = {
  url: 'http://localhost:38080/auth', //right here
  realm: 'Cerberus',
  clientId: 'cerberus-angular'
};
  • the cerberus source URL in the same object
// CERBERUS API ENDPOINT
let API_endpoint: string = "http://localhost:8080";

The application is configured by default to work with cerberus-angular keycloak client with the following configuration :

  • Enabled : ON
  • Client protocol : openid-connect
  • Access Type : public
  • Standard Flow Enabled : ON
  • Valid Redirect URIs : your cerberus angular URL (or URI if Root URL is configured) (e.g. http://localhost:4200/*)
  • Web Origins : add "+"

developer guide

application architecture

Configurations by environment are here: src/environments

contributing

Contributions to the source code are welcome. Before submitting your contribution, please make sure that:

  • ng lint returns no error
  • ng build --prod runs flawlessly

The latest developements are available at: https://front-qa.cerberus-testing.org

docker

In order to run it inside a docker container you can use :

# Build the image
sudo docker build -t cerberus-angular .
# Run it
sudo docker run -it -v ${PWD}:/usr/src/app -v /usr/src/app/node_modules -p 4200:4200 --rm cerberus-angular

About

Cerberus front-end application

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 43.0%
  • TypeScript 23.2%
  • SCSS 19.7%
  • HTML 14.0%
  • JavaScript 0.1%
  • Shell 0.0%