Developer Guide
This developer's guide provides documentation on how to build, deploy & test the application.
Requirements
To build and run the Citizen Intelligence Agency you need to install the following software.
- Compiler & Runtime : JDK 26 (source level 21) Eclipse Temurin.
- Database : PostgreSQL 18 download
- Build System : Maven 3.9+ download
- Documentation generation : Graphviz homepage
Getting the Source Code
The source can be cloned from GitHub with this command:
$ git clone https://github.com/Hack23/cia.git
Setting up the PostgreSQL database user
The command below describes how you set up a database user that will be used by the application. Use a strong, unique password and consider using environment-based configuration for credentials.
Use the command line to access PostgreSQL or through pgAdmin. > sudo su - postgres > psql
postgres=# CREATE USER eris WITH password 'YOUR_STRONG_PASSWORD_HERE';
postgres=# CREATE DATABASE cia_dev;
postgres=# GRANT ALL PRIVILEGES ON DATABASE cia_dev to eris;
Build the application & run tests
Now everything should be ready for you to build the application, execute the following commands to build & run:
$ cd cia
$ mvn clean install
$ mvn clean install -DskipTests (to skip tests)
Run the application
After building, deploy using the Debian package or run with an embedded server. See the README for installation instructions.
IDE development
Import the Maven project into your preferred IDE (IntelliJ IDEA, Eclipse, VS Code). The project uses standard Maven conventions and should import cleanly.
Useful Maven commands for development:
$ mvn clean compile (compile only)
$ mvn test (run unit tests)
$ mvn clean test jacoco:report (tests with coverage)
$ mvn site (generate site documentation)
