We assume that the server backend hosts a postgreql eventDB. See the corresponding IntelMQ output bot as well as the scripts to create the eventDB structure.
From the eventDB, we can create aggregation tables and copy them over to a separate server. There, we convert the aggregation tables to timescaleDB in order to speed up time window based searches. Have a look at the make_all.sh script.
The constituency portal source code resides in this repo
The whole process can be seen in the architecture sketch below: