Unchained ships an OCSF-compliant, tamper-evident audit log (packages/events/src/audit/) that is currently dormant — never instantiated, never bridged to GraphQL, never surfaced in admin-ui. Login/logout, account changes, role changes, order lifecycle, and payment events are already defined as audited but nothing writes them today.
What to do
- Engine: instantiate the audit log on platform startup, activate
configureAuditIntegration, and expose auditLogs, auditLogsCount, auditChainStatus, failedLoginAttempts via GraphQL behind a new viewAuditLog action gated to admins.
- Admin-UI: add a
/settings/security page (under a new /settings/* shell) showing chain-integrity status, failed-login activity, and a filterable browser over audit entries with per-entry OCSF detail view.
Why
- Compliance-ready out-of-the-box (OCSF v1.4.0 is consumed by Datadog, Splunk, AWS Security Lake, Chronicle).
- Tamper-evident chain status is a differentiator versus Shopify, Medusa, Saleor, commercetools — none surface this.
- First page under
/settings/*, establishing the IA for future consolidation of scattered config pages.
Steps
Engine
Admin-UI
Scope
Additive only. No breaking changes, no migrations.
Unchained ships an OCSF-compliant, tamper-evident audit log (
packages/events/src/audit/) that is currently dormant — never instantiated, never bridged to GraphQL, never surfaced in admin-ui. Login/logout, account changes, role changes, order lifecycle, and payment events are already defined as audited but nothing writes them today.What to do
configureAuditIntegration, and exposeauditLogs,auditLogsCount,auditChainStatus,failedLoginAttemptsvia GraphQL behind a newviewAuditLogaction gated to admins./settings/securitypage (under a new/settings/*shell) showing chain-integrity status, failed-login activity, and a filterable browser over audit entries with per-entry OCSF detail view.Why
/settings/*, establishing the IA for future consolidation of scattered config pages.Steps
Engine
auditLog?: AuditLogConfig | falsetoPlatformOptions; instantiatecreateAuditLoginstartPlatformand callconfigureAuditIntegration.auditLogthroughUnchainedServerOptions→createContextResolver→Context.viewAuditLogandverifyAuditChainto the actions list; grant toadminrole.AuditLogEntry,AuditChainStatus,AuditLogClass/Severity/Statusenums to the schema.auditLogs,auditLogsCount,auditChainStatus,failedLoginAttemptsquery resolvers wrapping the existingAuditLogmethods.AUTHENTICATIONentry; tampered file flipsauditChainStatus.validtofalse.Admin-UI
@unchainedshop/client/auditSDK module (fragment + 4 hooks) and updateclient/package.jsonexports +client/tsconfig.jsonincludes.modules/audit/shared components: chain-status banner, filters, virtualized entry table, entry detail drawer, failed-logins widget, OCSF activity label map./settingsshell (SettingsLayout+ landing) and/settings/securitypage composing the components; manage filters via URL state.Layout.tsx, gated onhasRole('admin').enanddestrings.Scope
Additive only. No breaking changes, no migrations.