Audit Log
stackfoundry/audit-logFreeBlock
Append-only activity table, event helpers, and admin timeline UI.
Install it
npx shadcn@latest add https://stackfoundry.dev/r/audit-log.jsonSource
1import { index, jsonb, pgTable, text, timestamp, uuid } from "drizzle-orm/pg-core";23export const auditLogEvents = pgTable(4 "audit_log_events",5 {6 id: uuid("id").primaryKey().defaultRandom(),7 actorId: text("actor_id"),8 actorType: text("actor_type").notNull().default("user"),9 action: text("action").notNull(),10 resourceType: text("resource_type").notNull(),11 resourceId: text("resource_id"),12 organizationId: text("organization_id"),13 metadata: jsonb("metadata").$type<Record<string, unknown>>().notNull().default({}),14 createdAt: timestamp("created_at", { withTimezone: true }).defaultNow().notNull(),15 },16 (table) => [17 index("audit_log_events_org_idx").on(table.organizationId),18 index("audit_log_events_resource_idx").on(table.resourceType, table.resourceId),19 ]20);
What it pulls in
Other registry items
Files it writes
More from stackfoundry
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Account Deletionaccount-deletion | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Modesaccount-modes | stackfoundry | Blocks | Free | no deps · 3 files | |
| Account Settingsaccount-settings | stackfoundry | Blocks | Free | no deps · 2 files | |
| Admin Consoleadmin-console | stackfoundry | Blocks | Free | no deps · 2 files | |
| Agent-Ready Installsagent-ready-installs | stackfoundry | Blocks | Free | no deps · 13 files | |
| AI Chatai-chat | stackfoundry | Blocks | Free | 3 deps · 4 files | |
| AI Chatbot SDKai-chatbot-sdk | stackfoundry | Blocks | Free | 3 deps · 2 files | |
| AI Elementsai-elements | stackfoundry | Blocks | Free | no deps · 5 files |
