Filter tools at the National Government
Since spring 2017, three colleagues of Luminis Amsterdam are working in a Scrum Team for the National Governement. These are Jettro Coenradie, Jeroen Reijn and me (Sander Meinema). There are just as many self-employed people on the team too, namely Tom Jonkman, Roos Labberton and Farley Samson. The Product Owner Gerrit Berkouwer and his substitute Harold Steenwinkel are of the Ministry of General Affairs. In July 2017 our team got the opportunity to build the very first Content Tool: Filter Tools.
Citizens can filter information with this system, so they only get relevant information tailored for their personal situation. There was a strict deadline though because the current system was going to be switched off. Before the end of the year, the solution needed to be in production and in use. This meant for us that we had to develop the entire solution within four months. We accepted this challenge and together we pulled it off!
The Filter Tools system consists of roughly four components. First of all, there is a Content Management System (CMS) in which editors can write information in so-called content blocks. In addition, they can also formulate questions with answer options. Then they can link the answer options to content blocks. This allows citizens to fill out a questionnaire and in that way only receive the relevant content for her or his personal situation. In the first instance, this system is used to provide citizens with the necessary information for life events. For example, what do you have to do when you start living on yourself or if you’re getting married?
The second component is an API. If the editor has finished entering all the content, questions and links of a filtering tool, she or he can publish it. This makes the data from the filter tool publicly available through an open REST API. Through the API the data can be queried with “curl”, Postman or any another HTTP client. The data is returned as JSON.
Because we had to build the entire system from the ground up in a limited amount of time, we opted for common frameworks with which we could quickly take big steps. ‘Common’ such that the components remain maintainable by ops. ‘Quickly big steps’ because some frameworks take a lot of work off our hands. For example, we have a lot of experience with the Spring Framework, enabling us to quickly put modules from it to good use. Furthermore, for the CMS we used React in combination with redux-form, react-bootstrap, and flexbox, which offered us the opportunity to quickly create something beautiful.
The API is a Spring Boot application which exposes the data via Spring Data REST. The data is stored in a MongoDB. We used Spring REST Docs to document the API. For this, we only needed to write JUnit tests. Thus, we have at the same time unit test coverage and automatically generated technical documentation. We only needed to place these on our website.
A lot of data is entered into the CMS. When changes are made, you want those to be immediately visible. For example, if links are made or if the order changes this must be made clear. We did this by storing the data in a Redux store. I have written a blog about this before. The front-end consists of React components that render the data from it. The backend also consists of a Spring Boot application. We also used Spring Security to block various attack vectors. We have thought carefully about blocking code injection, XSS, CSRF, and Man-in-the-Middle.
You can see the result in action on the website of the national government. That’s how we did it. Do you have more questions, you know how to reach us. 😉