Initial commit: YouTube Studio Flow (backend, frontend, infrastructure, docs)

This commit is contained in:
2026-08-11 12:27:44 +02:00
commit d5af006443
304 changed files with 74604 additions and 0 deletions
@@ -0,0 +1,34 @@
# Audit Log
## User Perspective
The Change History page (`/audit`) shows a chronological log of all user-initiated changes to the workspace. Useful for tracking who changed what and when.
Each entry shows: actor, entity type, entity ID, action (create/update/delete), timestamp, and before/after JSON snapshots (expandable).
## Developer Perspective
### AuditService
```typescript
AuditService.log(
actorId: string,
entityType: string, // 'Video', 'Template', 'DescriptionBlock', etc.
entityId: string,
action: string, // 'create', 'update', 'delete'
before?: object,
after?: object
)
```
### When to Log
Every user-facing mutation (create/update/delete) must call `AuditService.log()`. Background/system operations (queue processors, channel import) do NOT log.
### Adding Audit Logging to a Module
1. Import `AuditModule` in the module's `@Module({ imports: [...] })` array
2. Inject `AuditService` in the service constructor
3. Call `AuditService.log()` in each mutation method
### Tracked Entities
`Video`, `VideoConfig`, `DescriptionBlock`, `Template`, `Collaborator`, `TeamVariable`, `SavedView`, `TeamMember`
## Related
- [[02 - Backend]] (architecture)