This is the repository for https://app.lytics.cloud and comprises these directories:
- lytics-app: Web service and analytics reports, using the Quarkus framework.
- lytics-query: SQL query validator and transpiler, which the reports and the heatmaps use.
- lytics-ping: Analytics collection endpoint.
- tag: Javascript that websites include in their html hrader to collect analytics.
- offsite: Contains the code for offsite heatmap scripting and rendering.
- schemas: Database schemas required by the app.
Running the services requires a relational database (MariaDB or MySQL) and clickhouse. Edit lytics-app/src/main/resources/application.properties with your desired settings. These commands will run the respective services:
java -Dquarkus.config.locations=application.properties -jar lytics-ping/target/lytics-ping-1.0.0-SNAPSHOT-runner.jar
java -Dquarkus.config.locations=application.properties -jar lytics-app/target/lytics-app-1.0.0-SNAPSHOT-runner.jarFor development, it's best to run directly from IntelliJ by installing the Quarkus plugin. Otherwise quarkus dev can be run from the command line. mvn package will build the entire project.
The heatmap script that gets loaded offsite by the tag exists under the offsite/ directory. When performing development run npm run watch inside the offsite directory. It will output to lytics-app/src/main/resources/web/static/offsite/offsite.min.js which Quarkus will serve as a static file.
Run this if you start getting weird issues resolving submodules or if intellij is having issues.
mvn clean install -U