feat(dashboard): refine activity telemetry and maps
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ This OKF bundle is the product record for implemented and proposed behavior. Sto
|
||||
* [US-015 — Deploy and operate securely](us-015-platform-operations.md) - Operators have reproducible builds, migrations, credentials, and security controls.
|
||||
* [US-016 — Build and publish versioned releases](us-016-automated-releases.md) - Gitea Actions publish the Velocity JAR and web and migration images.
|
||||
* [US-017 — Control admission with groups](us-017-group-access.md) - Each user has one effective group that explicitly controls Minecraft access.
|
||||
* [US-018 — Monitor community account activity](us-018-admin-dashboard.md) - Administrators review registrations, monthly activity, denials, and risky networks.
|
||||
* [US-018 — Monitor community account activity](us-018-admin-dashboard.md) - Administrators review daily users, confirmed connections, locations, denials, and risky networks.
|
||||
|
||||
# Tracking
|
||||
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Design Update Log
|
||||
|
||||
## 2026-08-02
|
||||
|
||||
* **Refine**: Replace registration counts with daily active users, collapse enriched VPN activity per user, add opt-in OpenStreetMap zoom, show managed nickname tooltips, and measure active Minecraft accounts from confirmed Velocity connections.
|
||||
* **Governance**: Require user review and explicit confirmation of relevant OKF story changes before future implementation work.
|
||||
|
||||
## 2026-08-01
|
||||
|
||||
* **Extend**: Plot each user's latest approximate location on an accessible, server-rendered Natural Earth world map in the operations dashboard.
|
||||
|
||||
@@ -3,7 +3,7 @@ type: User Story
|
||||
title: Block account additions from anonymized networks
|
||||
description: User Minecraft-account additions fail closed for VPN, proxy, Tor, or unknown IP classifications.
|
||||
tags: [security, vpn, proxy, minecraft]
|
||||
timestamp: 2026-08-01T18:43:58Z
|
||||
timestamp: 2026-08-02T00:12:32Z
|
||||
story_id: US-008
|
||||
status: verified
|
||||
---
|
||||
@@ -21,6 +21,7 @@ As an operator, I want account additions blocked from anonymized networks, so th
|
||||
- [x] Blocked users receive a clear recovery message without provider internals.
|
||||
- [x] Blocked and classification-unavailable attempts create distinct audit events with safe intelligence details.
|
||||
- [x] Administrative account additions remain available as an authorized recovery path.
|
||||
- [x] Administrators see enriched risky-network observations collapsed to one latest summary per user.
|
||||
|
||||
# Implementation
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ type: User Story
|
||||
title: Enforce registration at the Velocity proxy
|
||||
description: Online-mode Java connections are admitted only after a fail-closed account-manager decision.
|
||||
tags: [minecraft, velocity, whitelist, security]
|
||||
timestamp: 2026-08-01T23:10:59Z
|
||||
timestamp: 2026-08-02T00:12:32Z
|
||||
story_id: US-009
|
||||
status: verified
|
||||
---
|
||||
@@ -25,11 +25,14 @@ As a registered player, I want the Velocity proxy to recognize my approved Java
|
||||
- [x] Registered players are allowed only when their single effective group has access enabled; explicit assignments override the default group.
|
||||
- [x] Unknown players, group-disabled players, API failures, malformed responses, and unauthorized requests fail closed with registration guidance.
|
||||
- [x] The plugin records the real Velocity connection IP and supports Java Edition online mode only.
|
||||
- [x] After admission, Velocity reports `PostLoginEvent` as best-effort authenticated telemetry without disconnecting an admitted player when reporting fails.
|
||||
- [x] Confirmed-connection reports use fresh timestamps and database replay protection.
|
||||
|
||||
# Implementation
|
||||
|
||||
- [`plugins/velocity`](../plugins/velocity)
|
||||
- [`apps/web/src/app/api/velocity/access/route.ts`](../apps/web/src/app/api/velocity/access/route.ts)
|
||||
- [`apps/web/src/app/api/velocity/connection/route.ts`](../apps/web/src/app/api/velocity/connection/route.ts)
|
||||
- [`packages/contracts/src/index.ts`](../packages/contracts/src/index.ts)
|
||||
- [`packages/database/src/schema.ts`](../packages/database/src/schema.ts)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ type: User Story
|
||||
title: Preserve a CloudEvents-style audit trail
|
||||
description: Authentication, UI, account, Discord, network, and game actions create searchable immutable-style events.
|
||||
tags: [audit, cloudevents, security, events]
|
||||
timestamp: 2026-08-01T23:10:59Z
|
||||
timestamp: 2026-08-02T00:12:32Z
|
||||
story_id: US-010
|
||||
status: verified
|
||||
---
|
||||
@@ -16,7 +16,7 @@ As an operator, I want security and identity activity recorded consistently, so
|
||||
|
||||
- [x] Events preserve CloudEvents-style ID, specification version, source, type, subject, time, content type, and JSON data.
|
||||
- [x] Events can include user actor, IP address, and correlation ID.
|
||||
- [x] Portal access, magic-link creation and consumption, account changes, nickname changes, VPN blocks, and game decisions are recorded.
|
||||
- [x] Portal access, magic-link creation and consumption, account changes, nickname changes, VPN blocks, game decisions, and confirmed proxy connections are recorded.
|
||||
- [x] Username changes learned from Velocity create their own event.
|
||||
- [x] Administrative actions include the acting SSO identity in event data.
|
||||
- [x] Events can be filtered by operator-friendly view and selected event types globally and from an individual user view.
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
type: User Story
|
||||
title: Monitor community account activity
|
||||
description: Administrators use a server-rendered dashboard to review registrations, monthly activity, denials, and risky networks.
|
||||
tags: [admin, dashboard, metrics, security, ssr]
|
||||
timestamp: 2026-08-01T23:32:54Z
|
||||
description: Administrators use a server-rendered dashboard to review daily activity, confirmed connections, locations, denials, and risky networks.
|
||||
tags: [admin, dashboard, metrics, security, maps, ssr]
|
||||
timestamp: 2026-08-02T00:12:32Z
|
||||
story_id: US-018
|
||||
status: verified
|
||||
---
|
||||
@@ -15,16 +15,17 @@ As an administrator, I want an operational dashboard of account and game activit
|
||||
# Acceptance Criteria
|
||||
|
||||
- [x] The administrator landing page is a dashboard rather than a settings form.
|
||||
- [x] An open-data world map plots each user's latest observation with valid approximate coordinates.
|
||||
- [x] Map markers link to user records and have an accessible text-table equivalent.
|
||||
- [x] Natural Earth boundaries are bundled and server-rendered without disclosing map or location requests to a third party.
|
||||
- [x] The dashboard graphs new registered users by UTC day for the previous 14 days.
|
||||
- [x] A server-rendered Natural Earth overview plots each user's latest observation with valid approximate coordinates.
|
||||
- [x] Administrators can opt into a zoomable OpenStreetMap view without removing the default overview.
|
||||
- [x] OpenStreetMap tiles load only after the administrator selects the interactive view and retain required attribution.
|
||||
- [x] Map markers show the managed Discord nickname on hover or keyboard focus, link to user records, and have an accessible text-table equivalent.
|
||||
- [x] The dashboard graphs distinct daily active users by UTC day for the previous 14 days with understandable date labels.
|
||||
- [x] Monthly active users count distinct users observed through portal or game activity in the previous 30 days.
|
||||
- [x] Monthly active Minecraft accounts count distinct linked accounts observed in the previous 30 days.
|
||||
- [x] Monthly active Minecraft accounts count distinct accounts with a confirmed Velocity post-login connection in the previous 30 days.
|
||||
- [x] The dashboard shows login denials from the previous 24 hours.
|
||||
- [x] Recent VPN, proxy, and Tor observations link to affected user records.
|
||||
- [x] Recent VPN, proxy, and Tor observations use enriched ProxyCheck classifications, collapse repeated rows per user, and show counts, sources, and latest activity.
|
||||
- [x] The graph includes an accessible title, description, point labels, and textual values.
|
||||
- [x] Dashboard queries and rendering execute server-side without client-side data fetching.
|
||||
- [x] Dashboard queries and initial rendering execute server-side; only the opt-in pan-and-zoom map hydrates client-side.
|
||||
- [x] Deployment-managed guild settings and denial messaging remain available on a dedicated settings page.
|
||||
|
||||
# Implementation
|
||||
@@ -33,11 +34,12 @@ As an administrator, I want an operational dashboard of account and game activit
|
||||
- [`apps/web/src/app/admin/(console)/settings/page.tsx`](../apps/web/src/app/admin/%28console%29/settings/page.tsx)
|
||||
- [`apps/web/src/lib/admin-metrics.ts`](../apps/web/src/lib/admin-metrics.ts)
|
||||
- [`apps/web/src/components/user-world-map.tsx`](../apps/web/src/components/user-world-map.tsx)
|
||||
- [`apps/web/src/components/map-view-toggle.tsx`](../apps/web/src/components/map-view-toggle.tsx)
|
||||
- [`apps/web/src/lib/user-location-map.ts`](../apps/web/src/lib/user-location-map.ts)
|
||||
|
||||
# Validation
|
||||
|
||||
- Missing-day chart behavior is covered by [`apps/web/src/lib/admin-metrics.test.ts`](../apps/web/src/lib/admin-metrics.test.ts).
|
||||
- Missing-day chart behavior and per-user VPN collapsing are covered by [`apps/web/src/lib/admin-metrics.test.ts`](../apps/web/src/lib/admin-metrics.test.ts).
|
||||
- Coordinate parsing, projection, linked markers, text fallback, and attribution are covered by the user-world-map tests.
|
||||
- The Next.js production build reports the dashboard and database-backed console pages as dynamic server-rendered routes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user