1. Docs
  2. Developers
  3. Features

Statistics and widgets

The schema-validated statistics store and the dashboard widget framework.

These two systems pair up: statistics record what the user does, and the Overview dashboard widgets are their main consumer.

Statistics

The statistics system is a namespaced, schema-validated store in mnemo.db (its own Statistics table, not the key-value Storage table). Records are addressed by namespace, kind, and key, with JSON field payloads.

NamespaceKindsRecords
flashcardsdaily.summary, deck.summary, session.log, totalsPractice activity, per-deck summaries, streaks
notesdaily.summary, totalsCreate, edit, delete counts
pathdaily.summary, path.summary, totalsPath creation and unit generation
appdaily.summary, totalsLaunches, per-route dwell time, XP

StatisticsManager validates writes against registered schemas, including which source modules may write a namespace, and serializes writes behind a semaphore. StatisticsModule registers the built-in schemas at startup; it has no UI of its own. StatisticsRecorder is the convenience layer features actually call (record a flashcard session, record app launch). Route dwell times arrive via NavigationStatisticsTracker.

When the AI assistant is enabled, the Analytics skill exposes a sizable stats_* tool surface (StatisticsToolService) so the assistant can query and write records.

There is no statistics page in the UI. Consumers today are the Overview widgets and the optional gamification badge in the top bar (XP and streak, behind App.EnableGamification).

Widgets

The Overview dashboard is a widget grid. IWidgetRegistry holds widget metadata and factories; OverviewViewModel renders registered widgets in a drag-and-drop grid with resize and an add-widget gallery, persisting the layout to the overview_dashboard_layout storage key.

Any module can register widgets in IModule.RegisterWidgets, which runs after the service provider is built so factories can resolve dependencies. In practice only OverviewModule registers any, five of them:

WidgetData source
Flashcard statsLifetime and daily flashcard totals
Recent decksPer-deck summaries plus live deck data
Study goalsToday’s summary against hardcoded targets (50 cards, 3 sessions, 30 minutes)
Recent notesSix most recently modified notes
Usage summaryApp launches and per-feature time today

The study goal targets being hardcoded is a known limitation, not a settings bug.

Where the code lives

ConcernPath
Schemas and typesMnemo.Core/Models/Statistics/
Manager and storeMnemo.Infrastructure/Services/ (StatisticsManager, SqliteStatisticsStore, StatisticsRecorder)
ModuleMnemo.UI/Modules/Statistics/StatisticsModule.cs
Widget frameworkMnemo.Core/Models/Widgets/, widget registry in Core services
Dashboard and widgetsMnemo.UI/Modules/Overview/
TestsStatisticsManagerTests, StatisticsToolServiceTests