The application consists of a UI for searching documents related to norms, laws and sectorial reports from the documentation repository of AIDIMME through a dedicated API.
The code of this repository represents a public frontend to access the documents stored in the regulation and legislation system managed by AIDIMME. This has been developed in Angular 7.2.15 including additional libraries for specific components and functionalities, i.e.: ng-bootstrap, ngx-translate and jquery.
Although this application has been designed to be integrated in a NIMBLE platform instance, this can be compiled and deployed as an standalone web application.
In development environment, this can be runned through ng serve for a dev server and then navigate to http://localhost:4200/ to enter the application.
To build the application, run ng build so the build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
The file 'app/globals.ts' contains relevant properties to configure the application:
- root: the base URL where the server application hosting the API is running
- authMode: if its value is 'nimble', then the login is done through the nimble identity service. If its value is 'internal', then the login is done by the default authentication service provided by the API.
- nimbleIdentityServiceUrl: the url of the nimble login identity service
static nimbleIdentityServiceUrl: string /* The endpoint of the Nimnble identity service for login */
static urlServiceRoot: string /* The url endpoint root of the legislation API services */
static authMode: string /* The authentication mode can be internal or against the Nimble identity service */
static datePlaceholder: string /* The format of dates */
static registrationLink: string /* The link to register in the Nimble platform */
static availableLanguages /* The list of available languages */
static defaultLanguage /* The default language when entering the application */The API manages an AuthenticationFilter class that filters the API requests in the server validating the authentication token provided by the user. The requests to the services of the API may include the parameter 'authMode' indicating if the sent token is an internal token or a token generated by nimble (default option).
The main styles of the application are defined in assets/css/styles.css. They are mainly the styles of the Nimble Frontend Service with some new particular additions for this Legislation Frontend (see the section commented as "Legislation Frontend" in the css file).
This issue may depend on the integration. The code is designed in order to allow access to the services to those permitted origins. Besides this, the access to the services are secured with an authentication filter. Actually the combination of both mechanisms is under testing, so maybe some adaptations could be required on server and client sides to enable a succesful access. It is needed to provide the domain where the frontend is published to give it access in the server side enabling the CORS.
The API defined and deployed in the web server enables the creation of any other custom frontend to access the system.
- The downloading of documents is not supported yet so further internal server authentications are involved.
- The code is actually subject to change to cover further functionalities as well as fixing detected bugs.