This document provides a comprehensive overview of the Citizen Intelligence Agency (CIA) system architecture, its core components, and how they integrate to deliver political transparency through data analysis. The CIA project is a Java-based web application that aggregates, analyzes, and visualizes data from Swedish governmental sources including the Parliament (Riksdagen), election authorities (Val), economic verification board (ESV), and World Bank indicators.
For detailed information about specific subsystems:
The Citizen Intelligence Agency implements political activity monitoring and transparency reporting through automated data collection, storage, and analysis. The system tagline "Tracking Politicians Like Bugs!" reflects its core mission: providing citizens with comprehensive, searchable information about Swedish political activities including voting records, document handling, party affiliations, and financial data.
Sources: parent-pom/pom.xml8 citizen-intelligence-agency/pom.xml13
The CIA system implements a multi-tier enterprise Java architecture with clear separation between presentation, business logic, data access, and external integration layers. The system is built on 75+ Maven modules organized into five primary hierarchies.
Sources: parent-pom/pom.xml39-46 parent-service-pom/pom.xml26-39 parent-web-pom/pom.xml26-30
The following table summarizes the primary technologies and their versions used throughout the system:
| Layer | Technology | Version | Purpose |
|---|---|---|---|
| Web Server | Eclipse Jetty | 10.0.26 | HTTP/2, SSL/TLS termination |
| UI Framework | Vaadin | 8.14.4 | Server-side UI components |
| Web Framework | Spring MVC | 5.3.39 | Request handling, DI |
| Security | Spring Security | 5.8.16 | Authentication, authorization |
| ORM | Hibernate | 5.6.15.Final | JPA 2.2 persistence |
| Full-Text Search | Hibernate Search | 6.2.4.Final | Search indexing |
| Search Engine | Lucene | 8.11.4 | Text indexing |
| Database | PostgreSQL | 16 | Relational storage |
| Schema Migration | Liquibase | 5.0.1 | Database versioning |
| Audit | Javers | 7.10.0 | Entity change tracking |
| Rules Engine | Drools | 10.1.0 | Business rules |
| Scheduler | Quartz | 2.4.0 | Job scheduling |
| Messaging | Apache Artemis | 2.51.0 | Async message broker |
| Caching | Ehcache | 2.10.5 | L2 cache, 100+ regions |
| Build | Maven | 3.9.1+ | Multi-module build |
| Runtime | JDK | 21+ (target) | Java runtime |
Sources: parent-pom/pom.xml83-158 citizen-intelligence-agency/pom.xml31
The CIA project is organized as a Maven multi-module build with 75+ modules structured in four levels of inheritance. The parent-pom serves as the root, defining dependency versions and plugin configurations that cascade to all child modules.
Sources: parent-pom/pom.xml39-46 parent-model-pom/pom.xml26-28 parent-service-pom/pom.xml26-39 parent-web-pom/pom.xml26-30
The parent-pom module centralizes:
${cia.project.versions.spring}, ${cia.project.versions.hibernate})Sources: parent-pom/pom.xml63-173 parent-pom/pom.xml174-686 parent-pom/pom.xml722-1436
The system uses 199 JPA entities organized into external and internal model hierarchies. All model modules extend parent-model-jpa2-pom which provides Hibernate JPA 2.2 support and JAXB/Hyperjaxb3 bindings for XML marshalling.
| Module Group | Modules | Entity Count | Purpose |
|---|---|---|---|
| Riksdagen | 8 modules | ~120 entities | Parliamentary documents, votes, persons, committees, proposals |
| Val | 3 modules | ~30 entities | Political parties, electoral districts (municipal, county, national) |
| WorldBank | 4 modules | ~40 entities | Country data, economic indicators, topics |
All external models include Hibernate Search @Indexed annotations for full-text search capabilities.
Sources: parent-model-external-pom/pom.xml26-30 model.internal.application.user.impl/pom.xml109-221
The model.internal.application.user.impl module contains application-specific entities:
Sources: model.internal.application.user.impl/pom.xml30-107
The system implements an event-driven data import architecture using JMS messaging to decouple external API polling from persistence operations.
Sources: service.component.agent.impl/pom.xml51-53 service.impl/pom.xml239-274 service.data.impl/pom.xml523-536 jms-broker/pom.xml34-129
The citizen-intelligence-agency module is the main web application WAR that integrates all layers. It uses Vaadin 8 for server-side UI rendering with custom widgets for data visualization.
| Component | Module/Technology | Description |
|---|---|---|
| UI Framework | Vaadin 8.14.4 | Server-side component model |
| Custom Widgets | web-widgets | Charts (DCharts, Sankey), statistics cards, Gantt charts, PDF viewer |
| Spring MVC | Spring WebMVC 5.3.39 | Request routing, REST controllers |
| Spring Security | Spring Security 5.8.16 | Authentication, session management, CSRF protection |
| JavaMelody | 1.99.4 | Application performance monitoring |
| Themes | Custom Valo extension | SCSS-based theming |
Sources: citizen-intelligence-agency/pom.xml219-243 web-widgets/pom.xml29-339 parent-web-pom/pom.xml43-194
The data layer implements multiple persistence and indexing strategies for different query patterns.
Sources: service.data.impl/pom.xml61-109 service.data.impl/pom.xml452-468
Sources: service.data.impl/pom.xml122-175 service.data.impl/pom.xml248-305 service.data.impl/pom.xml391-449
The service.impl module implements business rules, scheduling, and orchestration logic.
Sources: service.impl/pom.xml52-81 service.impl/pom.xml113-158 service.impl/pom.xml338-347
The CIA application supports three deployment models, all building from the same source artifacts.
| Method | Artifact | Target Environment |
|---|---|---|
| Debian Package | cia-dist-deb.deb | Ubuntu 20.04+ with Jetty 10 embedded |
| AWS CloudFormation | cia-dist-cloudformation.json | Multi-AZ VPC with EC2 Auto Scaling, RDS PostgreSQL |
| Docker | cia-dist-docker images | Container orchestration platforms |
Sources: cia-dist-deb/pom.xml10-12 parent-pom/pom.xml44-46
The .deb package includes:
/opt/cia/opt/cia/cia-base/webapps/cia/etc/default/cia environment fileSources: cia-dist-deb/pom.xml114-251
The system implements defense-in-depth security across multiple layers:
Sources: citizen-intelligence-agency/pom.xml270-369 service.data.impl/pom.xml61-109
The project uses GitHub Actions for comprehensive CI/CD with security-first approach.
Sources: parent-pom/pom.xml72-81 parent-pom/pom.xml744-796
-T flag for concurrent compilation.m2/repositorySources: parent-pom/pom.xml63-73
Production deployments include comprehensive observability:
Sources: citizen-intelligence-agency/pom.xml270-287 citizen-intelligence-agency/pom.xml289-369
Developers interact with the system through:
mvn clean install for full build, mvn test for testsThe testfoundation module provides AbstractSystemIntegrationTest base class for integration testing with shared test infrastructure.
Refresh this wiki
This wiki was recently refreshed. Please wait 5 days to refresh again.