calternal-plugin-analytics
Analytics Plugin: time tracked, activity counts and habits.
Everything is computed on the server from the Index (DESIGN §35): the
browser only draws. The maths is the calternal.js dashboard engine
(compute), the day data is the Calendar projection of the caller’s own
items (calternal_plugin_calendar::view::own_days), and finished days are
cached per User and time zone (cache).
The Plugin is optional: a User can turn the Analytics mode off, and an administrator can turn it off for the Instance. Off closes the route; the cache is Derived data and is never needed again.
Source: crates/plugins/analytics/src/lib.rs
Functions
Section titled “Functions”migrations
Section titled “migrations”pub fn migrations() -> MigrationSetSQL migrations owned by the Analytics Plugin. They must run after the Files, Notes, Calendar and auth migrations: the cache triggers watch their tables.