This document provides a high-level architectural overview of the Citizen Intelligence Agency (CIA) platform, a volunteer-driven open-source intelligence (OSINT) system for monitoring Swedish political activity. The platform collects, analyzes, and presents political data through a web application built on a multi-layered architecture.
This overview covers:
For detailed information about specific subsystems, see:
Sources: README.md1-223 parent-pom/pom.xml1-47
The CIA platform is structured as a Maven multi-module project orchestrated by parent-pom at the root level. The system follows a clean layered architecture with 75+ modules organized into distinct functional domains.
Sources: parent-pom/pom.xml39-46 parent-service-pom/pom.xml26-39 parent-web-pom/pom.xml26-30
Sources: service.component.agent.impl/pom.xml1-10 jms-broker/pom.xml1-14 service.data.impl/pom.xml1-14
The platform is built on enterprise-grade Java technologies with a focus on maintainability and scalability.
| Layer | Technology | Version | Module(s) |
|---|---|---|---|
| Build System | Maven | 3.9.9+ | parent-pom |
| Runtime | JDK | 25 (Temurin) | All modules |
| Web Framework | Vaadin | 8.14.4 | citizen-intelligence-agency, web-widgets |
| Application Framework | Spring Framework | 5.3.39.hack23java25 | service.impl, citizen-intelligence-agency |
| Security | Spring Security | 5.8.16 | service.impl, citizen-intelligence-agency |
| ORM | Hibernate | 5.6.15.Final | service.data.impl |
| Database | PostgreSQL | 14+ | All service modules |
| Migration Tool | Liquibase | 5.0.2 | service.data.impl |
| Search Engine | Hibernate Search + Lucene | 6.2.4 + 8.11.4 | service.data.impl |
| Message Broker | ActiveMQ Artemis | 2.52.0 | jms-broker |
| Rules Engine | Drools | 10.1.0 | service.impl |
| Scheduler | Quartz | 2.4.0 | service.impl |
| HTTP Client | Apache HttpClient | 4.5.14 | service.external.common |
| XML Binding | JAXB + HyperJAXB3 | 2.3.9 + 0.6.2 | External models |
| Monitoring | JavaMelody | 1.99.4 | citizen-intelligence-agency |
| Web Server | Jetty | 10.0.26 | cia-dist-deb |
Sources: parent-pom/pom.xml63-173 citizen-intelligence-agency/pom.xml1-32 service.data.impl/pom.xml1-36
The CIA platform supports two primary deployment strategies, each targeting different operational environments.
Sources: cia-dist-cloudformation/src/main/resources/cia-dist-cloudformation.yml1-7 cia-dist-deb/pom.xml1-26
The CloudFormation template (cia-dist-cloudformation.yml and .json) provides a production-ready infrastructure with the following key parameters:
| Parameter | Default Value | Purpose |
|---|---|---|
WebServerInstanceType | c7g.2xlarge | EC2 instance type (ARM-based Graviton) |
WebServerAmi | Ubuntu 24.04 ARM64 | Operating system image |
WebServerCount | 2 | Number of web server instances |
DBClass | db.t4g.medium | RDS instance type |
DBAllocatedStorage | 200 GB | Database storage size |
DomainName | hack23.com | Route53 DNS domain |
DomainNamePrefix | cia | Subdomain prefix |
DebPackageUrl | Latest GitHub release | Application package URL |
Sources: cia-dist-cloudformation/src/main/resources/cia-dist-cloudformation.yml4-94 cia-dist-cloudformation/src/main/resources/cia-dist-cloudformation.json4-118
The cia-dist-deb module produces a self-contained Debian package with the following structure:
Installation Path: /opt/cia
Key Components:
citizen-intelligence-agency.war - Main web applicationjetty-home/ - Jetty 10 distributionstart.ini - Jetty configuration with HTTP/2, HTTPS, JMX moduleskeystore.p12 - PKCS12 SSL certificate (generated during build)webapps/ - WAR deployment directorySystem Integration:
cia.service)/etc/default/cia-Xmx4096m default heap sizeSources: cia-dist-deb/pom.xml26-120
Module: parent-pom
Artifact: com.hack23.cia:parent-pom:2025-SNAPSHOT
The root POM coordinates the entire build lifecycle across 75+ modules. It defines:
Key Configuration:
<jdk.src.version>21</jdk.src.version>
<jdk.target.version>21</jdk.target.version>
<cia.project.versions.spring>5.3.39.hack23java25</cia.project.versions.spring>
<cia.project.versions.hibernate>5.6.15.Final</cia.project.versions.hibernate>
<cia.project.versions.vaadin>8.14.4</cia.project.versions.vaadin>
Sources: parent-pom/pom.xml1-174
Module: citizen-intelligence-agency
Artifact: com.hack23.cia:citizen-intelligence-agency:2025-SNAPSHOT:war
The main web application packages all components into a deployable WAR file. It integrates:
Sources: citizen-intelligence-agency/pom.xml1-47
Module: service.impl
Artifact: com.hack23.cia:service.impl:2025-SNAPSHOT
Implements core business logic including:
Key Dependencies:
service.api - Service interface definitionsservice.data.impl - Data access layerservice.component.agent.impl - Background job executionjms-broker - Asynchronous message processingSources: service.impl/pom.xml1-34
Module: service.data.impl
Artifact: com.hack23.cia:service.data.impl:2025-SNAPSHOT
Provides persistence and data access functionality:
db-changelog.xml)The module manages 107 PostgreSQL views for political intelligence analytics, including materialized views for performance optimization.
Sources: service.data.impl/pom.xml1-48
Module: jms-broker
Artifact: com.hack23.cia:jms.broker:2025-SNAPSHOT
Provides asynchronous messaging infrastructure:
The broker uses SERIALIZABLE_PACKAGES whitelist for security to prevent deserialization attacks.
Sources: jms-broker/pom.xml34-470
Module: service.component.agent.impl
Artifact: com.hack23.cia:service.component.agent.impl:2025-SNAPSHOT
Orchestrates scheduled data collection from external sources:
Sources: service.component.agent.impl/pom.xml1-39
Module: service.external.riksdagen (8 sub-modules)
Integrates with Swedish Parliament API at data.riksdagen.se:
Module: service.external.val (3 sub-modules)
Integrates with Swedish Election Authority:
Module: service.external.esv
Parses government financial data:
Module: service.external.worldbank
Integrates with World Bank API:
Common Infrastructure: All external modules share service.external.common for HTTP client functionality and JAXB unmarshalling.
Sources: service.external.riksdagen/pom.xml1-14 service.external.val/pom.xml1-14 service.external.esv/pom.xml1-28 service.external.worldbank/pom.xml1-28 service.external.common/pom.xml1-20
Module: testfoundation
Artifact: com.hack23.cia:testfoundation:2025-SNAPSHOT
Provides shared testing utilities across all modules:
Sources: testfoundation/pom.xml1-54
The project uses a sophisticated CI/CD pipeline managed through GitHub Actions:
The release workflow produces three primary artifacts:
citizen-intelligence-agency-{version}.war - Deployable web applicationcia-dist-deb-{version}.all.deb - Self-contained installation packagecia-dist-cloudformation.json - AWS infrastructure definitionAll releases include:
.intoto.jsonl attestation filesSources: parent-pom/pom.xml158-173 cia-dist-deb/pom.xml47-75
The Citizen Intelligence Agency platform represents a comprehensive OSINT solution built on enterprise Java technologies. Its modular architecture separates concerns across model, service, and presentation layers while maintaining clean dependencies through Maven module management. The dual deployment strategy (AWS CloudFormation for cloud, Debian package for on-premises) provides flexibility for different operational requirements.
The system's 75+ Maven modules are organized into five primary domains:
For detailed exploration of specific components, refer to the subsequent sections of this documentation starting with Getting Started.
Sources: README.md1-38 parent-pom/pom.xml1-47 citizen-intelligence-agency/pom.xml1-14
Refresh this wiki