brechtvdv/frontend-validation-tool
Tool for validating/monitoring new publications
FRONTEND-VALIDATION-TOOL
Table of Contents
Overview
A publication can have several requirements in order to make structural sense. These are the type of requirements that can be checked by this tool:
Features
Document Type Validation
Publications must meet structural requirements to ensure consistency and readability. The frontend supports validation for the following document types:
- Besluitenlijst
- Notule
- Agenda
In addition to specific document types, each publication is required to have a title, validated as a string to ensure it is present and correctly formatted. For "Notule" documents, there is an additional requirement to validate the maturity level, ensuring that these documents not only meet structural standards but also adhere to designated maturity criteria, adding a layer of depth to the validation process.
Validation Glue
In order to properly validate an agenda item exists in a publication, we need to know the following:
- Agenda item
- title
- resolution
- vote
- decision
- Session
- time
- governing body
Installation
From source
- Clone the frontend-validation-tool repository:
$ git clone git@github.com:lblod/frontend-validation-tool.git
- Change to the project directory:
$ cd frontend-validation-tool
- Install the dependencies:
$ > npm install
- Build the frontend:
$ > npm run buildNote that you can define the environment by creating a
.ENVfile in the root and setENVIRONMENT=developmentfor development.
Usage
Run the application using the command below:
npm run dev
CORS
Due to issues with CORS for publications published by vendors other than Gelinkt Notuleren changes needed to be made to the way the app proxies. We added a CORS-anywhere service in our stack to handle these request.
In our app we added a new path in the dispatcher. When this endpoint is called it will forward the url to the cors service.
Testing
Run the test suite using the command below:
npm run test
Documentation
Link to the full documentation here.