This looks great but was there a reason for going with Postgres over something purpose built for analytics like Clickhouse? I am seriously considering building a similar tool for our platform as the cost of Mixpanel/Amplitude is cost prohibitive at our scale. We had to move off Google Analytics and run our own Matomo server, and it brings MariaDB to a grinding halt.
In any case, will be looking closer at this. Looks very interesting. Thanks.