Skip to content

[P2][Admin][planned] Build privacy-safe admin analytics console #91

Description

@xodapi

Summary

Build a privacy-safe admin analytics console for operational visibility: product usage, feedback, ideas, client errors, drop-off, engagement, and deploy/build diagnostics.

This extends the admin access states already handled in #74 and should build on existing privacy-safe routes and telemetry work.

Why

The product needs a clear place to answer:

  • where users leave the app;
  • where users continue voluntarily;
  • which tests are used most;
  • which feedback/ideas arrived;
  • which client errors happen on which build;
  • whether production is healthy after deploy.

Scope

  • Admin-only UI for aggregated analytics.
  • Feedback and ideas overview with normalized statuses.
  • Client-error summaries by build, route, error class, and timestamp bucket.
  • Training engagement summaries:
    • starts;
    • completions;
    • repeats;
    • drop-off points;
    • recommended-next accepted/skipped where available.
  • Build/deploy visibility:
    • current build id;
    • health state;
    • latest smoke monitor status if available.

Privacy constraints

  • No raw Brain ID in admin analytics tables.
  • No tokens, refresh tokens, passwords, emails, raw localStorage, or private telemetry.
  • Use pseudonym/Brain label or aggregated counts.
  • Admin route must verify current server-side role, not stale JWT-only role.

Acceptance criteria

  • /admin has a clear analytics entry point for authorized admins.
  • Non-admin and unauthenticated states remain explicit and safe.
  • Admin API responses are sanitized through privacy helpers.
  • Feedback/ideas and client errors are visible in one operational workflow.
  • Aggregated engagement metrics support [P1][Analytics][planned] Track practice drop-off and engagement #57 without leaking identity.
  • Tests cover unauthorized, non-admin, and admin access.

Verification

  • pnpm lint
  • pnpm test
  • pnpm build
  • targeted admin route/UI tests
  • manual /admin smoke as admin and non-admin

Related

Status

[planned]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:analyticsAnalytics, EventBus, metrics, WASMarea:observabilityClient/server diagnostics, error reporting, telemetryarea:privacyPrivacy, identity, 152-FZ related workarea:uxUser experience, flows, copy, completion screensenhancementNew feature or requestpriority:P2Medium priority cleanup or hygienestatus:plannedPlanned and not yet implemented

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions