2.1 KiB
2.1 KiB
type, title, description, tags, timestamp, story_id, status
| type | title | description | tags | timestamp | story_id | status | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| User Story | Preserve a CloudEvents-style audit trail | Authentication, UI, account, Discord, network, and game actions create searchable immutable-style events. |
|
2026-08-02T00:12:32Z | US-010 | verified |
User Story
As an operator, I want security and identity activity recorded consistently, so that incidents and account changes can be reconstructed and later published to Kafka.
Acceptance Criteria
- Events preserve CloudEvents-style ID, specification version, source, type, subject, time, content type, and JSON data.
- Events can include user actor, IP address, and correlation ID.
- Portal access, magic-link creation and consumption, account changes, nickname changes, VPN blocks, game decisions, and confirmed proxy connections are recorded.
- Username changes learned from Velocity create their own event.
- Administrative actions include the acting SSO identity in event data.
- Events can be filtered by operator-friendly view and selected event types globally and from an individual user view.
- Every listed event links to a detail page showing its complete CloudEvents envelope and formatted JSON data.
published_atreserves an outbox path for future Kafka publishing.
Implementation
packages/database/src/events.tspackages/database/src/schema.tsapps/web/src/lib/audit.tsapps/web/src/app/admin/(console)/events/page.tsxapps/web/src/app/admin/(console)/events/[eventId]/page.tsx
Validation
The shared CloudEvent contract is covered by packages/contracts/test/contracts.test.ts, and event-producing routes pass full type and production-build validation.